class Google::Apis::MybusinessplaceactionsV1::MyBusinessPlaceActionsService

My Business Place Actions API

The My Business Place Actions API provides an interface for managing place

action links of a location on Google.

@example

require 'google/apis/mybusinessplaceactions_v1'

Mybusinessplaceactions = Google::Apis::MybusinessplaceactionsV1 # Alias the module
service = Mybusinessplaceactions::MyBusinessPlaceActionsService.new

@see developers.google.com/my-business/

Attributes

key[RW]

@return [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.
quota_user[RW]

@return [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.

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/google/apis/mybusinessplaceactions_v1/service.rb, line 46
def initialize
  super('https://mybusinessplaceactions.googleapis.com/', '',
        client_name: 'google-apis-mybusinessplaceactions_v1',
        client_version: Google::Apis::MybusinessplaceactionsV1::GEM_VERSION)
  @batch_path = 'batch'
end

Public Instance Methods

list_place_action_type_metadata(filter: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) click to toggle source

Returns the list of available place action types for a location or country. @param [String] filter

Optional. A filter constraining the place action types to return metadata for.
The response includes entries that match the filter. We support only the
following filters: 1. location=XYZ where XYZ is a string indicating the
resource name of a location, in the format `locations/`location_id``. 2.
region_code=XYZ where XYZ is a Unicode CLDR region code to find available
action types. If no filter is provided, all place action types are returned.

@param [String] language_code

Optional. The IETF BCP-47 code of language to get display names in. If this
language is not available, they will be provided in English.

@param [Fixnum] page_size

Optional. How many action types to include per page. Default is 10, minimum is
1.

@param [String] page_token

Optional. If specified, the next page of place action type metadata is
retrieved. The `pageToken` is returned when a call to `placeActionTypeMetadata.
list` returns more results than can fit into the requested page size.

@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::MybusinessplaceactionsV1::ListPlaceActionTypeMetadataResponse] parsed result object @yieldparam err [StandardError] error object if request failed

@return [Google::Apis::MybusinessplaceactionsV1::ListPlaceActionTypeMetadataResponse]

@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

# File lib/google/apis/mybusinessplaceactions_v1/service.rb, line 274
def list_place_action_type_metadata(filter: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/placeActionTypeMetadata', options)
  command.response_representation = Google::Apis::MybusinessplaceactionsV1::ListPlaceActionTypeMetadataResponse::Representation
  command.response_class = Google::Apis::MybusinessplaceactionsV1::ListPlaceActionTypeMetadataResponse
  command.query['filter'] = filter unless filter.nil?
  command.query['languageCode'] = language_code unless language_code.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

Protected Instance Methods

apply_command_defaults(command) click to toggle source
# File lib/google/apis/mybusinessplaceactions_v1/service.rb, line 289
def apply_command_defaults(command)
  command.query['key'] = key unless key.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
end