Class: Google::Apis::MybusinessplaceactionsV1::MyBusinessPlaceActionsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::MybusinessplaceactionsV1::MyBusinessPlaceActionsService
- Defined in:
- lib/google/apis/mybusinessplaceactions_v1/service.rb
Overview
My Business Place Actions API
The My Business Place Actions API provides an interface for managing place action links of a location on Google. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://mybusinessplaceactions.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#create_location_place_action_link(parent, place_action_link_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::PlaceActionLink
Creates a place action link associated with the specified location, and returns it.
-
#delete_location_place_action_link(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::Empty
Deletes a place action link from the specified location.
-
#get_location_place_action_link(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::PlaceActionLink
Gets the specified place action link.
-
#initialize ⇒ MyBusinessPlaceActionsService
constructor
A new instance of MyBusinessPlaceActionsService.
-
#list_location_place_action_links(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::ListPlaceActionLinksResponse
Lists the place action links for the specified location.
-
#list_place_action_type_metadata(filter: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::ListPlaceActionTypeMetadataResponse
Returns the list of available place action types for a location or country.
-
#patch_location_place_action_link(name, place_action_link_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::PlaceActionLink
Updates the specified place action link and returns it.
Constructor Details
#initialize ⇒ MyBusinessPlaceActionsService
Returns a new instance of MyBusinessPlaceActionsService.
49 50 51 52 53 54 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 49 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-mybusinessplaceactions_v1', client_version: Google::Apis::MybusinessplaceactionsV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
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.
42 43 44 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 42 def key @key end |
#quota_user ⇒ String
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.
47 48 49 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 47 def quota_user @quota_user end |
Instance Method Details
#create_location_place_action_link(parent, place_action_link_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::PlaceActionLink
Creates a place action link associated with the specified location, and
returns it. The request is considered duplicate if the parent
,
place_action_link.uri
and place_action_link.place_action_type
are the same
as a previous request.
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 81 def create_location_place_action_link(parent, place_action_link_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v1/{+parent}/placeActionLinks', ) command.request_representation = Google::Apis::MybusinessplaceactionsV1::PlaceActionLink::Representation command.request_object = place_action_link_object command.response_representation = Google::Apis::MybusinessplaceactionsV1::PlaceActionLink::Representation command.response_class = Google::Apis::MybusinessplaceactionsV1::PlaceActionLink command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_location_place_action_link(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::Empty
Deletes a place action link from the specified location.
114 115 116 117 118 119 120 121 122 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 114 def delete_location_place_action_link(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v1/{+name}', ) command.response_representation = Google::Apis::MybusinessplaceactionsV1::Empty::Representation command.response_class = Google::Apis::MybusinessplaceactionsV1::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_location_place_action_link(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::PlaceActionLink
Gets the specified place action link.
144 145 146 147 148 149 150 151 152 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 144 def get_location_place_action_link(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::MybusinessplaceactionsV1::PlaceActionLink::Representation command.response_class = Google::Apis::MybusinessplaceactionsV1::PlaceActionLink command.params['name'] = name unless name.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_location_place_action_links(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::ListPlaceActionLinksResponse
Lists the place action links for the specified location.
184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 184 def list_location_place_action_links(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+parent}/placeActionLinks', ) command.response_representation = Google::Apis::MybusinessplaceactionsV1::ListPlaceActionLinksResponse::Representation command.response_class = Google::Apis::MybusinessplaceactionsV1::ListPlaceActionLinksResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.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_place_action_type_metadata(filter: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::ListPlaceActionTypeMetadataResponse
Returns the list of available place action types for a location or country.
277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 277 def (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', ) 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 |
#patch_location_place_action_link(name, place_action_link_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::MybusinessplaceactionsV1::PlaceActionLink
Updates the specified place action link and returns it.
229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/google/apis/mybusinessplaceactions_v1/service.rb', line 229 def patch_location_place_action_link(name, place_action_link_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v1/{+name}', ) command.request_representation = Google::Apis::MybusinessplaceactionsV1::PlaceActionLink::Representation command.request_object = place_action_link_object command.response_representation = Google::Apis::MybusinessplaceactionsV1::PlaceActionLink::Representation command.response_class = Google::Apis::MybusinessplaceactionsV1::PlaceActionLink command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |