安裝用戶端程式庫
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Google Digital Asset Links 是以 HTTP 和 JSON 為基礎建構而成,因此所有標準 HTTP 用戶端都能向這個 API 傳送要求並剖析回應。
不同的是,Google API 用戶端程式庫可以提供更好的語言整合環境、更高的安全性,並支援需要使用者授權的呼叫要求。用戶端程式庫支援多種程式設計語言,只要善加利用,您就不必再手動設定 HTTP 要求及剖析回應。
首先,請選擇要用於開發作業的程式設計語言。
Java
本頁提供了透過適用於 Java 的 Google API 用戶端程式庫,開始使用 Digital Asset Links API 的資訊。詳情請參閱下列說明文件:
在專案中加入用戶端程式庫
從下列分頁選取您的建構環境 (Maven 或 Gradle):
請將以下內容新增到 pom.xml
檔案中:
您可以在這裡找到 Maven Central Repository 提供的所有版本。
請將以下內容新增到 build.gradle
檔案中:
您可以在這裡找到 Maven Central Repository 提供的所有版本。
.NET
本頁說明如何透過適用於 .NET 的 Google API 用戶端程式庫開始使用 Digital Asset Links API。詳情請參閱以下說明文件:
Python
本頁說明如何透過適用於 Python 的 Google API 用戶端程式庫開始使用 Digital Asset Links API。詳情請參閱下列說明文件:
小茹
本頁提供透過適用於 Ruby 的 Google API 用戶端程式庫,開始使用 Digital Asset Links API 的資訊。詳情請參閱下列說明文件:
安裝 google-api-client
Gem
視您的系統而定,您可能必須在這些指令前加上 sudo
。
如果您從未安裝適用於 Ruby 的 Google API 用戶端程式庫,請使用 RubyGems
進行安裝:
gem install google-api-client
如果您已安裝 Gem,請更新至最新版本:
gem update -y google-api-client
開始使用 Ruby 專用的 Google API 用戶端程式庫
如要瞭解如何提出第一個要求,請參閱入門指南。
存取 Google Digital Asset Links 的其他方式
請參閱下表,瞭解存取 Google Digital Asset Links 的其他方式:
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-06-26 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2024-06-26 (世界標準時間)。"],[],[],null,["The Google Digital Asset Links is built on HTTP and JSON, so any standard HTTP client\ncan send requests to it and parse the responses.\n\nHowever, the Google API client libraries provide better language\nintegration, improved security, and support for making calls that require\nuser authorization. The client libraries are available in a number of\nprogramming languages; by using them you can avoid the need to manually set\nup HTTP requests and parse the responses.\n\nTo get started, select the programming language that you are using for\ndevelopment. \n\nGo\n\nGet the latest [Google Digital Asset Links client library for Go ()](https://github.com/google/google-api-go-client). Read the\nclient library's [developer's guide](https://github.com/google/google-api-go-client).\n\nJava\n\n\u003cbr /\u003e\n\n\nThis page contains information about getting started with the Digital Asset Links API by using\nthe Google API Client Library for Java. For more information, see the following documentation:\n\n- Browse the [Javadoc reference for the Digital Asset Links API](https://googleapis.dev/java/google-api-services-digitalassetlinks/latest/).\n- Read the [Developer's Guide for the Google API Client Library for Java](https://github.com/googleapis/google-api-java-client/).\n- Interact with this API in your browser using the [APIs Explorer for the Digital Asset Links API](https://developers.google.com/apis-explorer/#p/digitalassetlinks/v1/).\n\nAdd the client library to your project\n\nSelect your build environment (Maven or Gradle) from the following tabs:\n\n\nMaven\n\nAdd the following to your `pom.xml` file:\n\n```\nRefreshing Maven content...\n```\n\nSee [all versions available on the Maven Central Repository](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.google.apis%22%20AND%20a%3A%22google-api-services-digitalassetlinks%22).\nGradle\n\nAdd the following to your `build.gradle` file:\n\n```\nRefreshing Gradle content...\n```\n\nSee [all versions available on the Maven Central Repository](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22com.google.apis%22%20AND%20a%3A%22google-api-services-digitalassetlinks%22).\n\nJavaScript\n\nRead the client library's [developer's guide](/api-client-library/javascript/start/start-js).\n\n.NET\n\n\nThis page contains information about getting started with the Digital Asset Links API by using\nthe Google API Client Library for .NET. For more information, see the following documentation:\n\n- Browse the [.NET reference documentation for the Digital Asset Links API](https://googleapis.dev/dotnet/Google.Apis/latest/api/Google.Apis.html).\n- Read the [Developer's guide for the Google API Client Library for .NET](/api-client-library/dotnet/get_started).\n- Interact with this API in your browser using the [APIs Explorer for the Digital Asset Links API](https://developers.google.com/apis-explorer/#p/digitalassetlinks/v1/).\n\nDownloading the library\n\nInstall the NuGet package:\n[Google.Apis](https://www.nuget.org/packages/Google.Apis).\n\nNode.js\n\nGet the latest [Google Digital Asset Links client library for Node.js](https://github.com/google/google-api-nodejs-client/). Read the\nclient library's [developer's guide](https://github.com/google/google-api-nodejs-client/).\n\nObj-C\n\nGet the latest [Google Digital Asset Links client library for Objective-C](https://github.com/google/google-api-objectivec-client-for-rest). Read the\nclient library's [developer's guide](https://github.com/google/google-api-objectivec-client-for-rest/wiki).\n\nPHP\n\nGet the latest [Google Digital Asset Links client library for PHP](https://github.com/google/google-api-php-client). Read the\nclient library's [developer's guide](/api-client-library/php).\n\nPython\n\n\nThis page contains information about getting started with the Digital Asset Links API by using\nthe Google API Client Library for Python (v1/v2). For more information, see the following documentation:\n\n- Browse the [PyDoc reference for the Digital Asset Links API](https://googleapis.github.io/google-api-python-client/docs/dyn/digitalassetlinks_v1.html).\n- Read the [Developer's guide for the Google API Client Library for Python (v1/v2)](/api-client-library/python).\n- Interact with this API in your browser using the [APIs Explorer for the Digital Asset Links API](https://developers.google.com/apis-explorer/#p/digitalassetlinks/v1/).\n\nSystem requirements\n\n- Operating systems:\n - Linux\n - macOS X\n - Windows\n- [The v1 client library requires Python 2.7 or higher. The v2 client library requires 3.7 or higher.](http://python.org/download/)\n\nInstall the client library\n\nYou can either use a package manager or manually download and install the Python client library:\n\nManaged install\n\nUse pip or setuptools to manage your installation. You might\nneed to run `sudo` first.\n\n- [pip](http://pypi.python.org/pypi/pip) (preferred): \n\n ```\n pip install --upgrade google-api-python-client\n ```\n- [Setuptools](http://pypi.python.org/pypi/setuptools): \n\n ```\n easy_install --upgrade google-api-python-client\n ```\n\nManual install\n\n1. [Download the latest client\n library for Python](https://pypi.python.org/pypi/google-api-python-client/).\n2. Unpack the code.\n3. Install: \n\n ```\n python setup.py install\n ```\n\nApp Engine\n\nBecause the Python client libraries aren't installed in the\n[App Engine Python runtime environment](https://cloud.google.com/appengine/docs/python/),\nyou must [copy them into your application](https://cloud.google.com/appengine/docs/python/tools/libraries27#vendoring) just like third-party libraries.\n\n\u003cbr /\u003e\n\nRuby\n\n\nThis page contains information about getting started with the Digital Asset Links API by using\nthe Google API Client Library for Ruby. For more information, see the following documentation:\n\n- Read the [Get started guide for the Google API Client Library for Ruby](/api-client-library/ruby/start/get_started).\n- Interact with this API in your browser using the [APIs Explorer for the Digital Asset Links API](https://developers.google.com/apis-explorer/#p/digitalassetlinks/v1/).\n\nInstall the `google-api-client` gem\n\n\nDepending on your system, you might need to prepend these commands with `sudo`.\n\n\nIf you haven't installed the Google API Client Library for Ruby before, install by using `RubyGems`: \n\n```\ngem install google-api-client\n```\n\n\u003cbr /\u003e\n\n\nIf you already have the gem installed, update to the latest version: \n\n```\ngem update -y google-api-client\n```\n\n\u003cbr /\u003e\n\nGet started with the Google API Client Library for Ruby\n\n\nTo learn how to make your first request, see the\n[Get started guide](/api-client-library/ruby/start/get_started).\n\n\u003cbr /\u003e\n\nOther ways to access the Google Digital Asset Links\n\nThe following table lists other ways to access the Google Digital Asset Links:\n\n| Access method | Description |\n| [APIs Explorer](https://developers.google.com/apis-explorer/#p/digitalassetlinks/v1/) | An interactive tool that lets you try out Google APIs right from your browser. |\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|"]]