ユーザーは、すでにアクセスできるコンテンツを視聴することを好みます。視聴できるコンテンツには、 既存の定期購読コンテンツを 表示したりできますユーザーが表示可能なコンテンツを Google が把握している場合 アクセスできれば、Google がより優れた検索結果を構築できます。 または応答を返してユーザーをそのコンテンツに誘導します。
![](https://developers.google.cn/static/actions/media/images/image-entitlements-4.png?authuser=0&hl=ja)
コンテンツ アクセスの要件を特定する
コンテンツ パッケージごとにアクセス要件を カタログですその際は、次の点を考慮してください。
- ユーザーがコンテンツにアクセスするには、アプリやプラットフォームにログインする必要があるか。
有料会員登録は必要か。
ウォッチ アクションのみ:
- ユーザーは外部サービス プロバイダからのサブスクリプションが必要ですか?
- 階層型、複数パッケージ、アドオンのサブスクリプションを提供していますか?
ウォッチ アクションのみ: ユーザーはコンテンツをレンタルまたは購入する必要がありますか?
アクセス要件は時間とともに変化するか。
アクセス要件はデバイスの位置情報によって異なりますか?
アクセス制限のタイプ
アクセス制限には次の 2 種類があります。
ペイウォールの種類
ペイウォールの種類によってコンテンツへのアクセスを制限できます。次の表に ペイウォールの種類について詳しく説明します
ペイウォールの種類 | 例 | カテゴリ |
---|---|---|
購入やログインは必要ありません。 | Crackle | nologinrequired |
ユーザーはログインする必要がありますが、有料登録は必要ありません。 | Vudu(AVOD) | free |
有効な定期購入が必要です。アクセスは 設定します。 | Netflix |
|
有効な定期購入が必要です。アクセス権は、 提供します | Hulu(アドオン) |
|
終了後は、コンテンツを一定時間利用できます。 購入します | Vudu | rental |
終了後は、コンテンツを無期限に利用できる 購入します | Vudu | purchase |
このコンテンツは、ケーブルテレビを定期購入すると視聴できます。 | HBO GO | externalSubscription |
ウォッチ アクションのペイウォールの種類
ウォッチ アクションのコンテンツ ペイウォール タイプを指定するには、
category
プロパティを
アクション アクセスの仕様:
"potentialAction": {
"@type":"WatchAction",
"target": { … },
"actionAccessibilityRequirement": {
"@type": "ActionAccessSpecification",
"category": "subscription",
"availabilityStarts": "2018-06-01T10:35:29Z",
"availabilityEnds": "2019-05-31T10:35:29Z",
"eligibleRegion": {
"@type": "Country",
"name": "US"
}
},
...
}
リッスン アクションのペイウォール タイプ
リッスン アクションのコンテンツ ペイウォール タイプを指定するには、
category
プロパティを
特典オブジェクト:
"potentialAction": {
"@type":"ListenAction",
"target": { … },
"expectsAcceptanceOf":{
"@type":"Offer",
"category":"subscription",
"availabilityStarts": "2018-06-01T10:35:29Z",
"availabilityEnds": "2019-05-31T10:35:29Z",
"eligibleRegion": {
"@type":"Country",
"name":"US"
}
},
...
}
地理的エリア
コンテンツを利用できる地域を指定する必要があります。1 つ以上の 次の両方のプロパティを指定します。
eligibleRegion
プロパティは、 アクション アクセスの指定 渡されます。このプロパティは必須です。ineligibleRegion
プロパティは、 アクション アクセスの指定 渡されます。
デバイスの位置が特定の国 / 地域内にあれば、ユーザーはコンテンツにアクセスできます。
eligibleRegion
で指定されていて、かつ指定されたリージョン内にない
ineligibleRegion
。
eligibleRegion
プロパティと ineligibleRegion
プロパティを使用すると、次のことができます。
values:
- リスト
Country
City
、State
。 GeoShape
オブジェクト。詳しくは、GeoShape
プロパティ をご覧ください。GeoShape
オブジェクトのリスト。
コンテンツがグローバルに提供されている場合は、
eligibleRegion
:
"eligibleRegion": "EARTH",
対象となるリージョンのユースケース
eligibleRegion
プロパティのユースケースの例を次に示します。
- 例 1: 国のリストを含む
eligibleRegion
。 - 例 2:
eligibleRegion
を、次のGeoShape
オブジェクトに置き換えます。 には郵便番号のリストが含まれます。 - 例 3:
eligibleRegion
を、次のGeoShape
オブジェクトに置き換えます。 には、Forward Sortation Area(FSA)コードのリストが含まれています。 - 例 4:
eligibleRegion
を、次のGeoShape
オブジェクトに置き換えます。 DMA ID が含まれています。 - 例 5:
GeoShape
オブジェクトのリストを含むeligibleRegion
。 それぞれに DMA ID が含まれています。 - 例 6: ブロックした郵便番号を含む
ineligibleRegion
。
例 1
eligibleRegion
は、国のリストに置き換えます。
"actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "requiresSubscription": { "@type": "MediaSubscription", "@id": "http://www.example.com/north_america_network/subscription", "name": "Example Subscription", "commonTier": true }, "eligibleRegion": [ { "@type": "Country", "name": "US" }, { "@type": "Country", "name": "CA" } ] }
例 2
eligibleRegion
は、次の GeoShape
オブジェクトで置き換えます。
には、郵便番号のリストが含まれます。
"actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "requiresSubscription": { "@type": "MediaSubscription", "@id": "http://www.example.com/local_tv_network/subscription", "name": "Example Subscription", "commonTier": true }, "eligibleRegion": { "@type": "GeoShape", "@id": "http://example.com/area1", "addressCountry": "US", "postalCode": [ "94118", "94119" ] } }
例 3
eligibleRegion
は、次の GeoShape
オブジェクトで置き換えます。
には、Forward Sortation Area(FSA)コードのリストが含まれます。
"actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "requiresSubscription": { "@type": "MediaSubscription", "@id": "http://www.example.com/local_tv_network/subscription", "name": "Example Subscription", "commonTier": true }, "eligibleRegion":{ "@type": "GeoShape", "@id": "http://example.com/area2", "addressCountry": "CA", "postalCode": [ "1A1", "K1A" ] } }
例 4
eligibleRegion
は、次の GeoShape
オブジェクトで置き換えます。
に DMA ID が含まれています。
"actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "requiresSubscription": { "@type": "MediaSubscription", "@id": "http://www.example.com/abcd/subscription", "name": "Example Subscription", "commonTier": true }, "eligibleRegion":{ "@type": "GeoShape", "@id": "http://example.com/area3", "addressCountry": "US", "identifier": [ { "@type": "PropertyValue", "propertyID": "DMA_ID", "value": "501" } ] } }
例 5
eligibleRegion
は、GeoShape
オブジェクトのリストに置き換えます。
それぞれに DMA ID が含まれています。
"actionAccessibilityRequirement" : { "@type" : "ActionAccessSpecification", "eligibleRegion" : [ { "@id" : "http://example.com/dma/601", "@type" : "GeoShape", "addressCountry" : "US", "identifier" : { "@type" : "PropertyValue", "propertyID" : "DMA_ID", "value" : "601" } }, { "@id" : "http://example.com/dma/602", "@type" : "GeoShape", "addressCountry" : "US", "identifier" : { "@type" : "PropertyValue", "propertyID" : "DMA_ID", "value" : "602" } } ] }
例 6
ブロックされている郵便番号の ineligibleRegion
:
"actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "requiresSubscription": { "@type": "MediaSubscription", "@id": "http://www.example.com/local_tv_network/subscription", "name": "Example Subscription", "commonTier": true }, "eligibleRegion": { "@type": "Country", "name": "US" }, "ineligibleRegion": { "@type": "GeoShape", "@id": "http://example.com/area1", "addressCountry": "US", "postalCode": [ "94118", "94119" ] } }
登録情報 ID
利用資格 ID entitlementId
は、以下を表す文字列を参照しています。
メディア カタログ内のコンテンツのグループに対するアクセス権。ユーザーが
コンテンツにアクセスできない場合、Google では次の処理を行います。
- バックエンドサービスに Entitlements エンドポイントに、ユーザーの 利用資格 ID。
- Google は、メディアからコンテンツに必要な利用資格 ID を検索します。 アクション フィード。
- ユーザーの
entitlementId
をidentifier
プロパティの フィード内のメディアのチャンネル登録オブジェクト。少なくとも 1 つのentitlementId
が一致すると、ユーザーは 説明します。
![](https://developers.google.cn/static/actions/media/images/image-entitlements-5.png?authuser=0&hl=ja)
entitlementId
には次の構文を使用することをおすすめします。
<domain name> + colon (:) + <access level to content>
構文の例:
example.com:basic
example.com:premium
example.com:sports
利用資格 ID の例
MediaExampleCompany のフィードでは、Movie XYZ
では
次に示すように、example.com:basic
entitlementId
にします。
{ "@context": ["http://schema.org", {"@language": "en"}], "@type": "Movie", "@id": "www.example.com/movie_xyz", "url": "www.example.com/movie_xyz", "name": "Movie XYZ", "potentialAction": { "@type": "WatchAction", "target": [ … ], "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "requiresSubscription": { "@type": "MediaSubscription", "@id": "http://www.example.com/basic_subscription", "name": "Basic subscription", "commonTier": true ... }, ... } }, ... }
一般的なアクセスのユースケース
一般的なアクセスのユースケースは次のとおりです。
- 無料(ログイン不要): コンテンツを利用できる点が異なります。
- 無料(ログインが必要): コンテンツにはユーザーのログインが必要ですが、購読は必要ありません。
- 単一階層型サブスクリプション: コンテンツを利用するには有料会員登録が必要です。すべての購読者が同じ (定期購入に関係なく)は映画でもエピソードでも、 パッケージ化されています。
- 多層サブスクリプション: コンテンツには有料会員登録が必要です。チャンネル登録者は 映画かエピソードかを選択しますたとえば シルバーとゴールド。
- アドオン サブスクリプション: コンテンツ サブスクリプションが必要です。定期購入者は自分のコンテンツ上にプレミアム コンテンツを追加できます 通常のサブスクリプション。
- 1 回だけの購入: コンテンツには 購入すると、ユーザーは無期限にアクセスできます。
- ライブテレビ: 定期購入では以下を利用できます。 ローカル、全国、プレミアム チャンネル。
- サードパーティの定期購入: このコンテンツを利用するには、ユーザーがケーブルテレビ会社にログインする必要があります。
無料(ログイン不要)
ログイン不要
コンテンツはログインまたはサブスクリプションなしで利用できます。
{ "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "nologinrequired", "availabilityStarts": "2015-01-01T00:00Z", "availabilityEnds": "2015-12-31T00:00Z", "eligibleRegion": { "@type": "Country", "name": "US" } } }
category
をnologinrequired
に設定する。expectAcceptanceOf
は含めないでください。
無料(ログインが必要です)
ログインしてください
コンテンツにはユーザーのログインが必要ですが、 。
{ "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "free", "availabilityStarts": "2015-01-01T00:00Z", "availabilityEnds": "2015-12-31T00:00Z", "eligibleRegion": { "@type": "Country", "name": "US" } } }
category
をfree
に設定する。expectAcceptanceOf
は含めないでください。
単一階層型のサブスクリプション
単一階層のサブスクリプション モデルでは、サービス プロバイダが 1 つのサブスクリプションを 提供しますすべての購読者が同じコンテンツにアクセスできるのは、 映画またはエピソードを視聴できます。
{ "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "availabilityStarts": "2015-01-01T00:00Z", "availabilityEnds": "2015-12-31T00:00Z", "requiresSubscription": { "@type": "MediaSubscription", "name": "Example Package", "commonTier": true, "@id": "http://www.example.com/example_package" }, "eligibleRegion": { "@type": "Country", "name": "US" } } }
多層サブスクリプション
階層型サブスクリプション モデルでは、サービス プロバイダは複数の (ゴールド、シルバー、 ブロンズ。上位の定期購入を利用しているユーザーは、すべてにアクセスできます 下位層のコンテンツに配信します下位のティアのユーザーは アクセスできません。
![](https://developers.google.cn/static/actions/media/images/image-entitlements-2.png?authuser=0&hl=ja)
次のシナリオを考えてみます。
- Jane はゴールド階層に登録されています。お客様の利用資格
エンドポイントは、次の
entitlementId
識別子を返します。 <ph type="x-smartling-placeholder">- </ph>
example.com:bronze
example.com:silver
example.com:gold
- John はブロンズ階層に登録しています。お客様の利用資格
エンドポイントから次の
entitlementId
が返されます。 <ph type="x-smartling-placeholder">- </ph>
example.com:bronze
- メディア アクション フィードで次の要件を満たしている必要があります。
<ph type="x-smartling-placeholder">
- </ph>
- Movie A には
example.com:bronze
が必要です。 - Movie B には
example.com:silver
が必要です。
- Movie A には
このシナリオでは、Google は Jane に対して次のアクセスレベルを判断します。 John:
- Jane と John はどちらも Movie A にアクセスできます。
- Jane は Movie B にアクセスできますが、John はアクセスできません。
{ "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "requiresSubscription": { "@type": "MediaSubscription", "@id": "http://www.example.com/basic_subscription", "name": "Bronze", "commonTier": true ... }, ... } }
アドオン サブスクリプション
アドオン サブスクリプション モデルでは、サービス プロバイダが 利用資格を拡大し、基本の定期購入にチャンネルを追加できます。ユーザー いくつでもチャンネルを追加できます。
![](https://developers.google.cn/static/actions/media/images/image-entitlements-3.png?authuser=0&hl=ja)
次のシナリオを考えてみます。
- Jane は PRO と Sportz のほかに
Basic サブスクリプション利用資格エンドポイントは、
次の
entitlementId
識別子: <ph type="x-smartling-placeholder">- </ph>
example.com:basic
example.com:pro
example.com:sportz
- John はベーシック サブスクリプションしか持っていません。お客様の利用資格
エンドポイントから次の
entitlementId
が返されます。 <ph type="x-smartling-placeholder">- </ph>
example.com:basic
- メディア アクション フィードで次の要件を満たしている必要があります。
<ph type="x-smartling-placeholder">
- </ph>
- Movie A には
example.com:basic
が必要です。 - Movie B には
example.com:pro
が必要です。
- Movie A には
このシナリオでは、Google は Jane に対して次のアクセスレベルを判断します。 John:
- Jane と John はどちらも Movie A にアクセスできます。
- Jane は Movie B にアクセスできますが、John はアクセスできません。
{ "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "subscription", "availabilityStarts": "2015-01-01T00:00Z", "availabilityEnds": "2015-12-31T00:00Z", "eligibleRegion": { "@type": "Country", "name": "US" "requiresSubscription": [ { "@type": "MediaSubscription", "@id": "https://www.example.com/package/basic", "name": "Basic", "sameAs": "https://www.example.com/package/basic", "commonTier": true }, { "@type": "MediaSubscription", "@id": "https://www.example.com/packages/basic/pro", "name": "PRO", "sameAs": "https://www.example.com/package/pro", "identifier": "example.com:pro", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/sportz", "name": "Sportz", "sameAs": "https://www.example.com/package/sports", "identifier": "example.com:sportz", "commonTier": false } } } }
1 回だけの購入
購入
終了後は、コンテンツを無期限に利用できる 購入します
{ "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "purchase", "availabilityStarts": "2015-01-01T00:00Z", "availabilityEnds": "2015-12-31T00:00Z", "eligibleRegion": { "@type": "Country", "name": "US" }, "expectsAcceptanceOf": { "@type": "Offer", "price": 7.99, "priceCurrency": "USD", "seller": { "@type": "Organization", "name": "Example", "sameAs": "http://www.example.com/" } } } }
category
をpurchase
に設定する。expectAcceptanceOf
を含める 価格を示すactionAccessibilityRequirement
購入します
レンタル
終了後は、コンテンツを一定時間利用できます。 購入します
{ "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "rental", "availabilityStarts": "2015-01-01T00:00Z", "availabilityEnds": "2015-12-31T00:00Z", "eligibleRegion": { "@type": "Country", "name": "US" }, "expectsAcceptanceOf": { "@type": "Offer", "price": 7.99, "priceCurrency": "USD", "seller": { "@type": "Organization", "name": "Example", "sameAs": "http://www.example.com/" } } } }
category
をrental
に設定する。expectAcceptanceOf
を含める 価格を示すactionAccessibilityRequirement
あります。
ライブテレビ
メディア アクション フィードでは、ライブテレビへのアクセスを制限できます チャンネルまたは イベントに基づいて 次の 2 つの条件があります
-
ユーザーのデバイスの位置情報
テレビ チャンネルへのアクセスを制限するには、ユーザーが あります。この条件は通常、ローカル ブロードキャストに適用されます。 テレビ チャンネル。
-
ユーザーのアカウントのステータス
テレビ チャンネルへのアクセスがユーザーのアカウント レベルの設定に依存している場合は、 利用資格 ID を 制限を表します。
この条件は通常、次のユースケースに適用されます。
- バンドル: 全国チャンネルは通常、 ユーザーが登録するバンドルを選択できます。
- アドオン: 一部のプレミアム チャンネルでは、ユーザーが次の操作を 選択的にチャンネル登録に他のチャンネルを追加する。
- 地域スポーツ ネットワーク(RSN): 通常、RSN は ユーザーの「自宅」に関連付けられたあります。ユーザーはコンテンツを視聴できます ユーザーが「自宅」外に出張した場合でも RSN に表示させることができるあります。
サードパーティ サブスクリプション
サードパーティの定期購入
登録者は別のサービスのコンテンツを利用できます。
{ "actionAccessibilityRequirement": { "@type": "ActionAccessSpecification", "category": "externalsubscription" "availabilityStarts": "2015-01-01T00:00Z", "availabilityEnds": "2015-12-31T00:00Z", "requiresSubscription":{ "@type": "MediaSubscription", "@id": "https://www.example.com/faq", "name": "Example", "sameAs": "https://www.example.com/faq", "authenticator": { "@type": "Organization", "name": "TVE" } }, "eligibleRegion": { "@type": "Country", "name": "US" } } }
- 別のサービスであることを示す
authenticator
を追加 サブスクライバーを認証しますたとえば、HBO GO には ケーブル プロバイダの契約期間です。
コモン ティア パッケージ
コモン ティアのコンテンツは、
サブスクリプション パッケージ。共通階層は、category
を持つすべてのコンテンツに適用されます。
/subscription
。category
プロパティの詳細については、以下をご覧ください。
[ペイウォールのタイプ] セクション
共通階層のパッケージが必要なのはなぜですか?
複数の Google プロダクトでテレビとユーザーに映画をおすすめする。 には、Google 検索、Android TV、Google アシスタントが含まれます。ユーザーを設定するには 料金に関する期待値について Google は、 共通のティアで購読者数を減らすことができますまた Google は 特定の定期購入パッケージに登録している購読者のみが利用できます。
Google は、 Entitlements API。 この API により、Google は一般的でないタイトルを、それぞれの特定の できます。
共通階層のパッケージは、どのような場合に作成すればよいですか?
共通階層パッケージは、サービスで すべての購読者に公開されますこれには、1 つのパッケージのみを提供するサービスも含まれます。 複数のパッケージやアドオンを提供する サービスを提供しています
すべての購読者が利用できるコンテンツがないプロバイダは、 一般的な階層のパッケージです相互に排他的なサービスを提供するサービスプロバイダが すべてのパッケージのコンテンツに 再びアクセスできるようになります
一般的なティアの例
一般的な階層の例を次に示します。
段階的な定期購入
階層型サブスクリプション モデルでは、サービス プロバイダは複数のサブスクリプションを使用する ゴールド、シルバー、ブロンズなどのティアがあります。以下を持つユーザー 上位階層のサブスクリプションは、下位階層のすべてのコンテンツにアクセスできます。ユーザー 上位のサブスクリプションでは、上位のサブスクリプションのコンテンツにはアクセスできません。 構成されます。次の図は、パッケージ構造の例を示しています。
![ゴールド ティアには、シルバー ティアのすべてのコンテンツが含まれます。
ブロンズ階層がすべて含まれます。](https://developers.google.cn/static/actions/media/images/tieredsub.png?authuser=0&hl=ja)
次のコード例では、ブロンズ パッケージが共通の階層です。これは、 すべてのコンテンツにアクセスできます。
"requiresSubscription": [ { "@type": "MediaSubscription", "@id": "https://www.example.com/package/bronze", "name": "Bronze", "sameAs": "https://www.example.com/package/bronze", "commonTier": true }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/silver", "name": "Silver", "sameAs": "https://www.example.com/package/silver", "identifier": "example.com:silver", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/gold", "name": "Gold", "sameAs": "https://www.example.com/package/gold", "identifier": "example.com:gold", "commonTier": false } ],
アドオン
アドオン サブスクリプション モデルでは、サービス プロバイダが 基本の定期購入にチャンネルを追加することができます。次のユーザーとして追加可能: 柔軟にチャネルを選べます以下の画像は、このパッケージの例を示しています。 構成します。
![どのユーザーも Basic チャンネルから始めて、必要に応じて
PRO、Sportz、Moviemax チャンネルの任意の組み合わせ](https://developers.google.cn/static/actions/media/images/addonssub.png?authuser=0&hl=ja)
すべてのユーザーが利用できるチャンネルを運営していて、 共通階層のパッケージと統合できます。
次のコードサンプルでは、すべての基本パッケージが共通の階層になっています。 ユーザーはこのパッケージのすべてのコンテンツにアクセスできます。
"requiresSubscription": [ { "@type": "MediaSubscription", "@id": "https://www.example.com/package/basic", "name": "Basic", "sameAs": "https://www.example.com/package/basic", "commonTier": true }, { "@type": "MediaSubscription", "@id": "https://www.example.com/packages/basic/pro", "name": "PRO", "sameAs": "https://www.example.com/package/pro", "identifier": "example.com:pro", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/sportz", "name": "Sportz", "sameAs": "https://www.example.com/package/sports", "identifier": "example.com:sportz", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/moviemax", "name": "Moviemax", "sameAs": "https://www.example.com/package/moviemax", "identifier": "example.com:moviemax", "commonTier": false } ],
コンテンツが交差するパッケージ
パッケージのコンテンツが交差するコンテンツ モデルでは、 プロバイダが他のパッケージのコンテンツを一部含むパッケージを販売している。「 次の画像は、パッケージ構造の例を示しています。
![パッケージ 1、2、3 の重複が
「Common Tier」というラベルが付けられています。](https://developers.google.cn/static/actions/media/images/intersect.png?authuser=0&hl=ja)
次のコードサンプルでは、プロバイダが 3 つのパッケージを提供しており、 すべてのパッケージにまたがって一致します。この例では 4 番目のパッケージは 必須です。すべてのコンテンツを含む必要があります。 3 つのパッケージで利用可能です
"requiresSubscription": [ { "@type": "MediaSubscription", "@id": "https://www.example.com/package/1", "name": "Package 1", "sameAs": "https://www.example.com/package/1", "identifier": "example.com:package1", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/2", "name": "Package 2", "sameAs": "https://www.example.com/package/2", "identifier": "example.com:package2", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/3", "name": "Package 3", "sameAs": "https://www.example.com/package/3", "identifier": "example.com:package3", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/common", "name": "Common Tier Package", "sameAs": "https://www.example.com/package/common", "commonTier": true } ],
交差するコンテンツがないパッケージ
すべてのコンテンツ パッケージが交差しないコンテンツ モデルでは、 プロバイダが他のパッケージのコンテンツを含むパッケージを販売している場合。「 次の画像は、パッケージ構造の例を示しています。
![パッケージ 1、2、3 は完全に独立しています。](https://developers.google.cn/static/actions/media/images/nointersect.png?authuser=0&hl=ja)
次の例では、プロバイダがコンテンツのない 3 つのパッケージを提供しています。 すべてのパッケージにまたがって一致する場合があります。共通階層パッケージは必要ありません。
"requiresSubscription": [ { "@type": "MediaSubscription", "@id": "https://www.example.com/package/1", "name": "Package 1", "sameAs": "https://www.example.com/package/1", "identifier": "example.com:package1", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/2", "name": "Package 2", "sameAs": "https://www.example.com/package/2", "identifier": "example.com:package2", "commonTier": false }, { "@type": "MediaSubscription", "@id": "https://www.example.com/package/3", "name": "Package 3", "sameAs": "https://www.example.com/package/3", "identifier": "example.com:package3", "commonTier": false } ],
登録情報のエンドポイント
このセクションの情報を使用して、HTTPS エンドポイントをホスト アクセスできるようになります。
前提条件
開始する前に、ご使用のサービスが Google での OAuth 2.0 フロー
リクエスト
ユーザーの利用資格を受け取るために、Google は ユーザーの OAuth トークンで識別されます。エンドポイントでは、その OAuth に基づいてユーザーを識別する必要があります。 あります。次の例をご覧ください。
GET /resource HTTP/1.1
Host: server.example.com
Authorization: Bearer <OAuthToken>
レスポンス
エンドポイントでは、次のプロパティを指定したレスポンスを返す必要があります。
プロパティ | |
---|---|
subscription |
必須 これはルート レスポンス内のフィールドです。 |
subscription.type |
必須 このプロパティには以下の値を指定できます。
|
subscription.expiration_date |
任意 このエンタイトルメントの有効期限( ISO 8601 形式 タイムゾーンが含まれます。詳しくは、 有効期限。 |
entitlements |
任意 このルート プロパティには、ルート モジュールで使用されている |
entitlements.entitlement |
ストリーミング カタログへのアクセスの種類が異なる場合は必須 定期購入のタイプに応じて異なります。 このプロパティには |
entitlements.expiration_date |
任意 このサブスクリプションの有効期限 ISO 8601 形式 タイムゾーンが含まれます。詳しくは、 有効期限。 |
有効期限
エンドポイント レスポンスには有効期限を扱う 2 つのプロパティがある
日付: subscription.expiration_date
、entitlements.expiration_date
。マイページ
いずれか一方を含めることも、どちらも指定せずに、両方を含めることはできません。どちらを使用するかは、
選択できます
サブスクリプション モデル | |
---|---|
ストリーミング カタログへのアクセスは、すべての定期購入者が同じです。 | entitlements を指定する必要がないため
プロパティには subscription.expiration_date を指定します。 |
ストリーミング カタログへのアクセスは、 表示されます。 |
サブスクリプション モデルに複数の階層やアドオンがあり、 時間が経つと期限切れになる場合は、次のいずれかを行います。
|
回答例
定期購入のステータスに応じたレスポンスの例を次に示します。
- 有効な定期購入
- 有効期限のある有効なサブスクリプション
- 定期購入なし
- 複数のティアまたはアドオンへの有効な定期購入
有効な定期購入
有効な定期購入
ユーザーに example.com の有効なサブスクリプションがあります。この すべてのサブスクライバーが ストリーミングカタログ全体にアクセスできる すべての購読プランがあります
{ "subscription" : { "type": "ActiveSubscription", } }
有効期限のある有効なサブスクリプション
有効期限のある有効なサブスクリプション
ユーザーに example.com の有効な定期購入があり、かつ サブスクリプションに有効期限が設定されています。この場合、すべてのサブスクライバーに サブスクリプションに関係なく、ストリーミング カタログ全体にアクセスできます あります。
{ "subscription" : { "type": "ActiveSubscription", "expiration_date": "2019-11-10T10:00:00Z" } }
定期購入なし
定期購入なし
ユーザーに example.comexample.com の定期購入がない。
{ "subscription" : { "type": "InactiveSubscription" } }
複数のティアまたはアドオンへの有効な定期購入
複数のティアまたはアドオンの有効な定期購入
ユーザーは特定の日付まで example.com:premium
を定期購入しています。
{ "subscription" : { "type": "ActiveSubscription", } "entitlements": [ { "entitlement": "example.com:premium", "expiration": "2019-11-10T10:00:00Z" } ] }
レート上限
Google では最大 6 時間ごとにユーザーの利用資格情報を更新します。宛先 最大秒間クエリ数(QPS)を平滑化すると、Google が エンドポイントに均等に分散されます。したがって エンドポイントの QPS は次の式になります。
予想される平均 QPS = <ユーザーの総数> / 21,600 秒(6 時間 x 60 分 x 60 秒)
多数のユーザーをサポートする場合は、Google が 6 時間の間隔を調整します。 必要に応じて、構成について Google にお問い合わせください。
Google に問い合わせ
エンドポイントの準備が整ったら、Google にエンドポイントの URL を通知してください。
アクション アクセス指定プロパティ
詳しくは、 参照用のアクション アクセス仕様のプロパティ セクション 情報です。