Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of games v1 client #1635

Merged
merged 1 commit into from Dec 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions api_names_out.yaml
Expand Up @@ -105468,6 +105468,11 @@
"/games:v1/CategoryListResponse/items/item": item
"/games:v1/CategoryListResponse/kind": kind
"/games:v1/CategoryListResponse/nextPageToken": next_page_token
"/games:v1/ContentHash": content_hash
"/games:v1/ContentHash/digest": digest
"/games:v1/ContentHash/version": version
"/games:v1/EndPoint": end_point
"/games:v1/EndPoint/url": url
"/games:v1/EventBatchRecordFailure": event_batch_record_failure
"/games:v1/EventBatchRecordFailure/failureCause": failure_cause
"/games:v1/EventBatchRecordFailure/kind": kind
Expand Down Expand Up @@ -105910,13 +105915,15 @@
"/games:v1/Snapshot/uniqueName": unique_name
"/games:v1/SnapshotCoverImageResource": snapshot_cover_image_resource
"/games:v1/SnapshotCoverImageResource/contentHash": content_hash
"/games:v1/SnapshotCoverImageResource/contentHash/content_hash": content_hash
"/games:v1/SnapshotCoverImageResource/downloadUrl": download_url
"/games:v1/SnapshotCoverImageResource/height": height
"/games:v1/SnapshotCoverImageResource/mimeType": mime_type
"/games:v1/SnapshotCoverImageResource/resourceId": resource_id
"/games:v1/SnapshotCoverImageResource/width": width
"/games:v1/SnapshotDataResource": snapshot_data_resource
"/games:v1/SnapshotDataResource/contentHash": content_hash
"/games:v1/SnapshotDataResource/contentHash/content_hash": content_hash
"/games:v1/SnapshotDataResource/downloadUrl": download_url
"/games:v1/SnapshotDataResource/resourceId": resource_id
"/games:v1/SnapshotDataResource/size": size
Expand Down Expand Up @@ -106079,6 +106086,9 @@
"/games:v1/games.applications.get/consistencyToken": consistency_token
"/games:v1/games.applications.get/language": language
"/games:v1/games.applications.get/platformType": platform_type
"/games:v1/games.applications.getEndPoint": get_application_end_point
"/games:v1/games.applications.getEndPoint/applicationId": application_id
"/games:v1/games.applications.getEndPoint/endPointType": end_point_type
"/games:v1/games.applications.played": played_application
"/games:v1/games.applications.played/builtinGameId": builtin_game_id
"/games:v1/games.applications.played/consistencyToken": consistency_token
Expand Down
2 changes: 1 addition & 1 deletion generated/google/apis/games_v1.rb
Expand Up @@ -26,7 +26,7 @@ module Apis
# @see https://developers.google.com/games/
module GamesV1
VERSION = 'V1'
REVISION = '20201022'
REVISION = '20201125'

# View and manage its own configuration data in your Google Drive
AUTH_DRIVE_APPDATA = 'https://www.googleapis.com/auth/drive.appdata'
Expand Down
81 changes: 67 additions & 14 deletions generated/google/apis/games_v1/classes.rb
Expand Up @@ -644,6 +644,55 @@ def update!(**args)
end
end

# Hash-like weak identifier of uploaded content bytes (saved game data blob, or
# cover image). Consistent per player per application per hash version. Within
# the context of a single player/application, it's guaranteed that two identical
# blobs coming from two different uploads will have the same content hash. It's
# extremely likely, though not guaranteed, that if two content hashes are equal,
# the blobs are identical.
class ContentHash
include Google::Apis::Core::Hashable

# Hash-like digest of the content.
# Corresponds to the JSON property `digest`
# @return [String]
attr_accessor :digest

# Version of the Hash encoding algorithm to hash the content.
# Corresponds to the JSON property `version`
# @return [Fixnum]
attr_accessor :version

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@digest = args[:digest] if args.key?(:digest)
@version = args[:version] if args.key?(:version)
end
end

# Container for a URL end point of the requested type.
class EndPoint
include Google::Apis::Core::Hashable

# A URL suitable for loading in a web browser for the requested endpoint.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url

def initialize(**args)
update!(**args)
end

# Update properties of this object
def update!(**args)
@url = args[:url] if args.key?(:url)
end
end

# A batch update failure resource.
class EventBatchRecordFailure
include Google::Apis::Core::Hashable
Expand Down Expand Up @@ -2501,12 +2550,14 @@ class SnapshotCoverImageResource
include Google::Apis::Core::Hashable

# Output only. Hash-like weak identifier of the uploaded image bytes, consistent
# per player per application. Within the context of a single player/application,
# it's guaranteed that two identical blobs coming from two different uploads
# will have the same content hash. It's extremely likely, though not guaranteed,
# that if two content hashes are equal, the images are identical.
# per player per application per hash version. Within the context of a single
# player/application, it's guaranteed that two identical images coming from two
# different uploads will have the same content hash for the same hash algorithm
# version. It's extremely likely, though not guaranteed, that if two content
# hashes are equal, the images are identical. More than one content hash can be
# returned if more than one hash versions are supported.
# Corresponds to the JSON property `contentHash`
# @return [String]
# @return [Array<Google::Apis::GamesV1::ContentHash>]
attr_accessor :content_hash

# Output only. A URL the client can use to download the image. May vary across
Expand All @@ -2516,12 +2567,12 @@ class SnapshotCoverImageResource
# @return [String]
attr_accessor :download_url

# Output only. The height of the image in pixels.
# The height of the image in pixels.
# Corresponds to the JSON property `height`
# @return [Fixnum]
attr_accessor :height

# Output only. The MIME type of the image.
# The MIME type of the image.
# Corresponds to the JSON property `mimeType`
# @return [String]
attr_accessor :mime_type
Expand All @@ -2537,7 +2588,7 @@ class SnapshotCoverImageResource
# @return [String]
attr_accessor :resource_id

# Output only. The width of the image in pixels.
# The width of the image in pixels.
# Corresponds to the JSON property `width`
# @return [Fixnum]
attr_accessor :width
Expand All @@ -2562,12 +2613,14 @@ class SnapshotDataResource
include Google::Apis::Core::Hashable

# Output only. Hash-like weak identifier of the uploaded blob, consistent per
# player per application. Within the context of a single player/application, it'
# s guaranteed that two identical blobs coming from two different uploads will
# have the same content hash. It's extremely likely, though not guaranteed, that
# if two content hashes are equal, the blobs are identical.
# player per application per hash version. Within the context of a single player/
# application, it's guaranteed that two identical blobs coming from two
# different uploads will have the same content hash for the same hash algorithm
# version. It's extremely likely, though not guaranteed, that if two content
# hashes are equal, the blobs are identical. More than one content hash can be
# returned if more than one hash versions are supported.
# Corresponds to the JSON property `contentHash`
# @return [String]
# @return [Array<Google::Apis::GamesV1::ContentHash>]
attr_accessor :content_hash

# Output only. A URL that the client can use to download the blob. May vary
Expand All @@ -2588,7 +2641,7 @@ class SnapshotDataResource
# @return [String]
attr_accessor :resource_id

# Size of the saved game blob in bytes.
# Output only. Size of the saved game blob in bytes.
# Corresponds to the JSON property `size`
# @return [Fixnum]
attr_accessor :size
Expand Down
33 changes: 31 additions & 2 deletions generated/google/apis/games_v1/representations.rb
Expand Up @@ -112,6 +112,18 @@ class Representation < Google::Apis::Core::JsonRepresentation; end
include Google::Apis::Core::JsonObjectSupport
end

class ContentHash
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class EndPoint
class Representation < Google::Apis::Core::JsonRepresentation; end

include Google::Apis::Core::JsonObjectSupport
end

class EventBatchRecordFailure
class Representation < Google::Apis::Core::JsonRepresentation; end

Expand Down Expand Up @@ -589,6 +601,21 @@ class Representation < Google::Apis::Core::JsonRepresentation
end
end

class ContentHash
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :digest, as: 'digest'
property :version, as: 'version'
end
end

class EndPoint
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :url, as: 'url'
end
end

class EventBatchRecordFailure
# @private
class Representation < Google::Apis::Core::JsonRepresentation
Expand Down Expand Up @@ -1089,7 +1116,8 @@ class Representation < Google::Apis::Core::JsonRepresentation
class SnapshotCoverImageResource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :content_hash, as: 'contentHash'
collection :content_hash, as: 'contentHash', class: Google::Apis::GamesV1::ContentHash, decorator: Google::Apis::GamesV1::ContentHash::Representation

property :download_url, as: 'downloadUrl'
property :height, as: 'height'
property :mime_type, as: 'mimeType'
Expand All @@ -1101,7 +1129,8 @@ class Representation < Google::Apis::Core::JsonRepresentation
class SnapshotDataResource
# @private
class Representation < Google::Apis::Core::JsonRepresentation
property :content_hash, as: 'contentHash'
collection :content_hash, as: 'contentHash', class: Google::Apis::GamesV1::ContentHash, decorator: Google::Apis::GamesV1::ContentHash::Representation

property :download_url, as: 'downloadUrl'
property :resource_id, as: 'resourceId'
property :size, :numeric_string => true, as: 'size'
Expand Down
33 changes: 33 additions & 0 deletions generated/google/apis/games_v1/service.rb
Expand Up @@ -337,6 +337,39 @@ def get_application(application_id, language: nil, platform_type: nil, fields: n
execute_or_queue_command(command, &block)
end

# Returns a URL for the requested end point type.
# @param [String] application_id
# The application ID from the Google Play developer console.
# @param [String] end_point_type
# Type of endpoint being requested.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::GamesV1::EndPoint] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::GamesV1::EndPoint]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_application_end_point(application_id: nil, end_point_type: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'games/v1/applications/getEndPoint', options)
command.response_representation = Google::Apis::GamesV1::EndPoint::Representation
command.response_class = Google::Apis::GamesV1::EndPoint
command.query['applicationId'] = application_id unless application_id.nil?
command.query['endPointType'] = end_point_type unless end_point_type.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end

# Indicate that the currently authenticated user is playing your application.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
Expand Down
2 changes: 1 addition & 1 deletion generated/google/apis/games_v1/synth.metadata
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
"sha": "9840c481849200572321532ecc3b128bebbc1583"
"sha": "be6850161c57715f479f158662bb4c3e385e44cc"
}
}
]
Expand Down