Class: Google::Apis::VersionhistoryV1::VersionHistoryService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/versionhistory_v1/service.rb

Overview

versionhistory.googleapis.com API

Version History API - Prod

Examples:

require 'google/apis/versionhistory_v1'

Versionhistory = Google::Apis::VersionhistoryV1 # Alias the module
service = Versionhistory::VersionHistoryService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://versionhistory.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeVersionHistoryService

Returns a new instance of VersionHistoryService.



47
48
49
50
51
52
# File 'lib/google/apis/versionhistory_v1/service.rb', line 47

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-versionhistory_v1',
        client_version: Google::Apis::VersionhistoryV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



40
41
42
# File 'lib/google/apis/versionhistory_v1/service.rb', line 40

def key
  @key
end

#quota_userString

Returns 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.

Returns:

  • (String)

    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.



45
46
47
# File 'lib/google/apis/versionhistory_v1/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#list_platform_channel_version_releases(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::VersionhistoryV1::ListReleasesResponse

Returns list of releases of the given version.

Parameters:

  • parent (String)

    Required. The version, which owns this collection of releases. Format: product/platforms/platform/channels/channel/versions/version

  • filter (String) (defaults to: nil)

    Optional. Filter string. Format is a comma separated list of All comma separated filter clauses are conjoined with a logical "and". Valid field_names are "version", "name", "platform", "channel", "fraction" "starttime", and " endtime". Valid operators are "<", "<=", "=", ">=", and ">". Channel comparison is done by distance from stable. must be a valid channel when filtering by channel. Ex) stable < beta, beta < dev, canary < canary_asan. Version comparison is done numerically. Ex) 1.0.0.8 < 1.0.0.10. If version is not entirely written, the version will be appended with 0 for the missing fields. Ex) version > 80 becoms version > 80.0.0.0 When filtering by starttime or endtime, string must be in RFC 3339 date string format. Name and platform are filtered by string comparison. Ex) "...?filter=channel<=beta, version >= 80 Ex) "...?filter=version > 80, version < 81 Ex) "...?filter=starttime>2020- 01-01T00:00:00Z

  • order_by (String) (defaults to: nil)

    Optional. Ordering string. Valid order_by strings are "version", "name", " starttime", "endtime", "platform", "channel", and "fraction". Optionally, you can append "desc" or "asc" to specify the sorting order. Multiple order_by strings can be used in a comma separated list. Ordering by channel will sort by distance from the stable channel (not alphabetically). A list of channels sorted in this order is: stable, beta, dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not specified the response will be sorted by starttime in descending order. Ex) "...?order_by=starttime asc" Ex) "...?order_by=platform desc, channel, startime desc"

  • page_size (Fixnum) (defaults to: nil)

    Optional. Optional limit on the number of releases to include in the response. If unspecified, the server will pick an appropriate default.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListReleases call. Provide this to retrieve the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/google/apis/versionhistory_v1/service.rb', line 248

def list_platform_channel_version_releases(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/releases', options)
  command.response_representation = Google::Apis::VersionhistoryV1::ListReleasesResponse::Representation
  command.response_class = Google::Apis::VersionhistoryV1::ListReleasesResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_platform_channel_versions(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::VersionhistoryV1::ListVersionsResponse

Returns list of version for the given platform/channel.

Parameters:

  • parent (String)

    Required. The channel, which owns this collection of versions. Format: product/platforms/platform/channels/channel

  • filter (String) (defaults to: nil)

    Optional. Filter string. Format is a comma separated list of All comma separated filter clauses are conjoined with a logical "and". Valid field_names are "version", "name", "platform", and "channel". Valid operators are "<", "<=" , "=", ">=", and ">". Channel comparison is done by distance from stable. Ex) stable < beta, beta < dev, canary < canary_asan. Version comparison is done numerically. If version is not entirely written, the version will be appended with 0 in missing fields. Ex) version > 80 becoms version > 80.0.0.0 Name and platform are filtered by string comparison. Ex) "...?filter=channel<=beta, version >= 80 Ex) "...?filter=version > 80, version < 81

  • order_by (String) (defaults to: nil)

    Optional. Ordering string. Valid order_by strings are "version", "name", " platform", and "channel". Optionally, you can append " desc" or " asc" to specify the sorting order. Multiple order_by strings can be used in a comma separated list. Ordering by channel will sort by distance from the stable channel (not alphabetically). A list of channels sorted in this order is: stable, beta, dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not specified the response will be sorted by version in descending order. Ex) "...?order_by= version asc" Ex) "...?order_by=platform desc, channel, version"

  • page_size (Fixnum) (defaults to: nil)

    Optional. Optional limit on the number of versions to include in the response. If unspecified, the server will pick an appropriate default.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListVersions call. Provide this to retrieve the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/google/apis/versionhistory_v1/service.rb', line 181

def list_platform_channel_versions(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/versions', options)
  command.response_representation = Google::Apis::VersionhistoryV1::ListVersionsResponse::Representation
  command.response_class = Google::Apis::VersionhistoryV1::ListVersionsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['orderBy'] = order_by unless order_by.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_platform_channels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::VersionhistoryV1::ListChannelsResponse

Returns list of channels that are available for a given platform.

Parameters:

  • parent (String)

    Required. The platform, which owns this collection of channels. Format: product/platforms/platform

  • page_size (Fixnum) (defaults to: nil)

    Optional. Optional limit on the number of channels to include in the response. If unspecified, the server will pick an appropriate default.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListChannels call. Provide this to retrieve the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



121
122
123
124
125
126
127
128
129
130
131
# File 'lib/google/apis/versionhistory_v1/service.rb', line 121

def list_platform_channels(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/channels', options)
  command.response_representation = Google::Apis::VersionhistoryV1::ListChannelsResponse::Representation
  command.response_class = Google::Apis::VersionhistoryV1::ListChannelsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_platforms(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::VersionhistoryV1::ListPlatformsResponse

Returns list of platforms that are available for a given product. The resource "product" has no resource name in its name.

Parameters:

  • parent (String)

    Required. The product, which owns this collection of platforms. Format: product

  • page_size (Fixnum) (defaults to: nil)

    Optional. Optional limit on the number of channels to include in the response. If unspecified, the server will pick an appropriate default.

  • page_token (String) (defaults to: nil)

    Optional. A page token, received from a previous ListChannels call. Provide this to retrieve the subsequent page.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    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.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



82
83
84
85
86
87
88
89
90
91
92
# File 'lib/google/apis/versionhistory_v1/service.rb', line 82

def list_platforms(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/{+parent}/platforms', options)
  command.response_representation = Google::Apis::VersionhistoryV1::ListPlatformsResponse::Representation
  command.response_class = Google::Apis::VersionhistoryV1::ListPlatformsResponse
  command.params['parent'] = parent unless parent.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end