Introduction
The Google Play Movies Partner API allows partners to manage the digital assets they publish on Google Play.
General rules
Every method in this API follows the set of rules defined below.
Calls made to this API must be authenticated using OAuth2 tokens associated with Service Accounts (like
project_id@developer.gserviceaccount.com
).The Service Account must be associated to the proper Partner Account, as defined in the Share Settings in the Partner Portal. The Partner Portal also displays the
account_id
associated with the Partner Account.Each method has a required
account_id
field:- If this field is not set, the call will fail with error 400 (
Bad Request
). - If the Service Account making the call is not associated with the Partner Account associated with the
account_id
(see item above), the call will fail with error 401 (Unauthorized
).
- If this field is not set, the call will fail with error 400 (
The results returned by the call will be restricted to the resources the Partner Account (defined by the
account_id
) has access to:- Studio Accounts have access to the resources the studio own.
- Post-Production House accounts have access to the resources they manage on behalf of Studios.
Common methods
There are typically 2 methods for each resource type:
Get
: gets a specific resource given its id.List
: lists all resources that match a given criteria.
The 2 sections below define the common rules that apply to these types of methods (unless otherwise specified in the method itself).
Get
methods rules
- If the resource with the given id exists and the Partner Account has access to it (see Authentication and Authorization rules] section above), the resource is returned; otherwise, the call will fail with error 404 (
Not found
).
List
methods rules
Unless otherwise specified in the their documentation, all List
methods follow the rules below:
All fields in a
List
request are optional.There are typically 2 types of fields in the request: Page Settings (fields prefixed with
page_
) and Filter Criteria (every other field, unless specified otherwise).Page Settings fields are used to paginate the call so it returns a reasonable number of resources. They are:
`page_size`: Requested page size. Server may return fewer resources than
requested. If unspecified, server will pick an appropriate default value (like 100).
`page_token`: A token identifying a page of results the server should
return. Typically, this is the value of next_page_token
returned in the response from the previous call to the same List
method. If unspecified, server will start a new request.
Filter Criteria fields are used to limit the number of resources returned based on the given criteria. If no filter criteria field is set, then it returns all resources; otherwise all fields will be logically
AND
'ed to filter the results.If a Filter Criteria field is repeated, then its values are
OR
'ed to count as single field, which in turn isAND
'ed with the other fields. For example, aList
request like:{name:['GoO', '42'] country: ['US', 'CA']}
would be the equivalent to the following pseudo-SQL code:WHERE (Lower(name) LIKE '%goo%' OR Lower(name) LIKE '%42%')
AND (Lower(country) IN ['us', 'ca'])
There are 2 Filter Criteria fields that are common to all
List
requests:
`pph_names`: filters resources managed by any of the given
Post-Production Houses (case-insensitive, sub-string match). Should be set only when the caller's Partner Account belongs to a Studio, otherwise the method will return no resources (unless one of its values matches the name of the caller's Post-Production House Partner Account).
`studio_names`: filters resources owned by any of the given Studios
(case-insensitive, sub-string match). Should be set only when the caller's Partner Account belongs to a Post-Production House, otherwise the method will return no resources (unless one of its values matches the name of the caller's Studio Partner Account).
Regardless of which Filter Criteria fields are used, all resources returned are restricted to the resources the Partner Account have access to (as defined in the Authentication and Authorization rules section above).
List
responses always include atotal_size
field indicating how many resources matched the filter criteria.
Client Libraries
Client libraries provide a high-level view of Google Play Movies Partner API functionality, making it easier to quickly develop applications.
The Google Play Movies Partner API is built on HTTP and JSON, so any standard web stack can send requests to it and parse the responses. We have provided the following client libraries that you can use for access to the API, instead of creating HTTP requests and parsing responses manually:
Language | Client Library | Samples |
---|---|---|
Java | Google Play Movies Partner API Client Library for Java | Samples on GitHub |
Python | Google Play Movies Partner API Client Library for Python | |
.NET | Google Play Movies Partner API Client Library for .NET |