在大多數說明文件頁面中,畫面右側會顯示已展開的 APIs Explorer。如果 API Explorer 未顯示,請按一下 [Try it!] (試用!) 以顯示 API Explorer 的簡化版本。
如果參考資料說明文件頁面的右側並未顯示 [立即試用],表示 APIs Explorer 不支援這個方法。例如 API API Explorer 與需要服務帳戶的 API 不相容,因此這類 API 的說明文件頁面不會顯示該 API。
顯示展開的 APIs Explorer 版本
API Explorer 的展開版本包含 cURL、HTTP 以及其他可能的程式碼範例。如要顯示展開版本的 APIs Explorer,請按一下「全螢幕」圖示 fullscreen。
執行方法
API Explorer 可讓您輸入必要參數、選用參數,以及 API 方法的要求主體 (如適用)。以許多 REST 方法 (例如清單方法) 來說,您只需要填入一兩個欄位,然後就能執行該方法。例如, Books API 的 books.volumes.list 方法只需使用查詢參數 (q) 即可列出書籍。如何試用 books.volumes.list 方法:
[[["容易理解","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"]],["上次更新時間:2022-04-27 (世界標準時間)。"],[[["The APIs Explorer allows you to test API methods directly in the documentation by providing parameters and executing requests."],["To use the APIs Explorer with methods requiring authorization, you need to generate and use your own credentials."],["The expanded APIs Explorer provides code samples in various formats like cURL and HTTP for easier integration."],["If you encounter a 401 or 403 error, verify the authorization type and scope, as they are the most common causes."],["The APIs Explorer uses popups for authorization, so ensure your browser settings allow them to function correctly."]]],[]]