Method: monetization.subscriptions.basePlans.offers.list
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
packageName |
string
必要欄位。應讀取訂閱項目的父項應用程式 (套件名稱)。
|
productId |
string
必要欄位。應讀取優惠的父項訂閱項目 (ID)。可指定為「-」,以便讀取應用程式下的所有優惠。
|
basePlanId |
string
必要欄位。應讀取優惠的父項基本方案 (ID)。如要讀取訂閱項目或應用程式中的所有優惠,可以指定為「-」。如果 productId 指定為「-」,則必須將此參數也指定為「-」。
|
查詢參數
參數 |
pageSize |
integer
要傳回的訂閱項目數量上限。服務傳回的產品數量可能會少於這個值。如未指定,最多將傳回 50 個訂閱項目。許可的最大值為 1000;超出的數值將一律指定為 1000。
|
pageToken |
string
來自先前 ListSubscriptionsOffers 呼叫的網頁權杖。提供此項目即可擷取後續網頁。 進行分頁時,提供至 offers.list 的所有其他參數須與提供網頁權杖的呼叫相符。
|
回應主體
offers.list 的回應訊息。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"subscriptionOffers": [
{
object (SubscriptionOffer )
}
],
"nextPageToken": string
} |
欄位 |
subscriptionOffers[] |
object (SubscriptionOffer )
指定訂閱項目的訂閱優惠。
|
nextPageToken |
string
可做為 pageToken 傳送的權杖,用於擷取後續網頁。如果省略這個欄位,就不會有後續頁面。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/androidpublisher
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-17 (世界標準時間)。
[[["容易理解","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-12-17 (世界標準時間)。"],[[["Lists all subscription offers under a given base plan, subscription, or app."],["The request is a standard `GET` request with path and query parameters for filtering."],["The response includes an array of `SubscriptionOffer` objects and a token for pagination."],["Requires authorization with the `https://www.googleapis.com/auth/androidpublisher` scope."]]],["This document details how to retrieve a list of subscription offers for an Android app. The core action is a `GET` HTTP request to a specific URL: `https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/subscriptions/{productId}/basePlans/{basePlanId}/offers`. The request requires specifying the app's package name, subscription ID, and base plan ID as path parameters. Optional query parameters `pageSize` and `pageToken` control the number of results and pagination. The response body returns a list of subscription offers and a potential token for the next page. It requires specific authorization scopes.\n"]]