Class: Google::Apis::GanV1beta1::GanService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::GanV1beta1::GanService
- Defined in:
- generated/google/apis/gan_v1beta1/service.rb
Overview
Google Affiliate Network API
Lets you have programmatic access to your Google Affiliate Network data.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#get_advertiser(role, role_id, advertiser_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Advertiser
Retrieves data about a single advertiser if that the requesting advertiser/ publisher has access to it.
-
#get_link(role, role_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Link
Retrieves data about a single link if the requesting advertiser/publisher has access to it.
-
#get_publisher(role, role_id, publisher_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Publisher
Retrieves data about a single advertiser if that the requesting advertiser/ publisher has access to it.
-
#get_report(role, role_id, report_type, advertiser_id: nil, calculate_totals: nil, end_date: nil, event_type: nil, link_id: nil, max_results: nil, order_id: nil, publisher_id: nil, start_date: nil, start_index: nil, status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Report
Retrieves a report of the specified type.
-
#initialize ⇒ GanService
constructor
A new instance of GanService.
-
#insert_link(role, role_id, link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Link
Inserts a new link.
-
#list_advertisers(role, role_id, advertiser_category: nil, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Advertisers
Retrieves data about all advertisers that the requesting advertiser/publisher has access to.
-
#list_cc_offers(publisher, advertiser: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::CcOffers
Retrieves credit card offers for the given publisher.
-
#list_events(role, role_id, advertiser_id: nil, charge_type: nil, event_date_max: nil, event_date_min: nil, link_id: nil, max_results: nil, member_id: nil, modify_date_max: nil, modify_date_min: nil, order_id: nil, page_token: nil, product_category: nil, publisher_id: nil, sku: nil, status: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Events
Retrieves event data for a given advertiser/publisher.
-
#list_links(role, role_id, advertiser_id: nil, asset_size: nil, authorship: nil, create_date_max: nil, create_date_min: nil, link_type: nil, max_results: nil, page_token: nil, promotion_type: nil, relationship_status: nil, search_text: nil, start_date_max: nil, start_date_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Links
Retrieves all links that match the query parameters.
-
#list_publishers(role, role_id, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, publisher_category: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Publishers
Retrieves data about all publishers that the requesting advertiser/publisher has access to.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ GanService
Returns a new instance of GanService
51 52 53 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'gan/v1beta1/') 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.
38 39 40 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 38 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. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#get_advertiser(role, role_id, advertiser_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Advertiser
Retrieves data about a single advertiser if that the requesting advertiser/ publisher has access to it. Only publishers can lookup advertisers. Advertisers can request information about themselves by omitting the advertiserId query parameter.
86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 86 def get_advertiser(role, role_id, advertiser_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{role}/{roleId}/advertiser', ) command.response_representation = Google::Apis::GanV1beta1::Advertiser::Representation command.response_class = Google::Apis::GanV1beta1::Advertiser command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_link(role, role_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Link
Retrieves data about a single link if the requesting advertiser/publisher has access to it. Advertisers can look up their own links. Publishers can look up visible links or links belonging to advertisers they are in a relationship with.
345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 345 def get_link(role, role_id, link_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{role}/{roleId}/link/{linkId}', ) command.response_representation = Google::Apis::GanV1beta1::Link::Representation command.response_class = Google::Apis::GanV1beta1::Link command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.params['linkId'] = link_id unless link_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_publisher(role, role_id, publisher_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Publisher
Retrieves data about a single advertiser if that the requesting advertiser/ publisher has access to it. Only advertisers can look up publishers. Publishers can request information about themselves by omitting the publisherId query parameter.
508 509 510 511 512 513 514 515 516 517 518 519 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 508 def get_publisher(role, role_id, publisher_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{role}/{roleId}/publisher', ) command.response_representation = Google::Apis::GanV1beta1::Publisher::Representation command.response_class = Google::Apis::GanV1beta1::Publisher command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.query['publisherId'] = publisher_id unless publisher_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_report(role, role_id, report_type, advertiser_id: nil, calculate_totals: nil, end_date: nil, event_type: nil, link_id: nil, max_results: nil, order_id: nil, publisher_id: nil, start_date: nil, start_index: nil, status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Report
Retrieves a report of the specified type.
648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 648 def get_report(role, role_id, report_type, advertiser_id: nil, calculate_totals: nil, end_date: nil, event_type: nil, link_id: nil, max_results: nil, order_id: nil, publisher_id: nil, start_date: nil, start_index: nil, status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{role}/{roleId}/report/{reportType}', ) command.response_representation = Google::Apis::GanV1beta1::Report::Representation command.response_class = Google::Apis::GanV1beta1::Report command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.params['reportType'] = report_type unless report_type.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['calculateTotals'] = calculate_totals unless calculate_totals.nil? command.query['endDate'] = end_date unless end_date.nil? command.query['eventType'] = event_type unless event_type.nil? command.query['linkId'] = link_id unless link_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['orderId'] = order_id unless order_id.nil? command.query['publisherId'] = publisher_id unless publisher_id.nil? command.query['startDate'] = start_date unless start_date.nil? command.query['startIndex'] = start_index unless start_index.nil? command.query['status'] = status unless status.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_link(role, role_id, link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Link
Inserts a new link.
385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 385 def insert_link(role, role_id, link_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, '{role}/{roleId}/link', ) command.request_representation = Google::Apis::GanV1beta1::Link::Representation command.request_object = link_object command.response_representation = Google::Apis::GanV1beta1::Link::Representation command.response_class = Google::Apis::GanV1beta1::Link command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_advertisers(role, role_id, advertiser_category: nil, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Advertisers
Retrieves data about all advertisers that the requesting advertiser/publisher has access to.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 150 def list_advertisers(role, role_id, advertiser_category: nil, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{role}/{roleId}/advertisers', ) command.response_representation = Google::Apis::GanV1beta1::Advertisers::Representation command.response_class = Google::Apis::GanV1beta1::Advertisers command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.query['advertiserCategory'] = advertiser_category unless advertiser_category.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['minNinetyDayEpc'] = min_ninety_day_epc unless min_ninety_day_epc.nil? command.query['minPayoutRank'] = min_payout_rank unless min_payout_rank.nil? command.query['minSevenDayEpc'] = min_seven_day_epc unless min_seven_day_epc.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['relationshipStatus'] = relationship_status unless relationship_status.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_cc_offers(publisher, advertiser: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::CcOffers
Retrieves credit card offers for the given publisher.
198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 198 def list_cc_offers(publisher, advertiser: nil, projection: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'publishers/{publisher}/ccOffers', ) command.response_representation = Google::Apis::GanV1beta1::CcOffers::Representation command.response_class = Google::Apis::GanV1beta1::CcOffers command.params['publisher'] = publisher unless publisher.nil? command.query['advertiser'] = advertiser unless advertiser.nil? command.query['projection'] = projection unless projection.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_events(role, role_id, advertiser_id: nil, charge_type: nil, event_date_max: nil, event_date_min: nil, link_id: nil, max_results: nil, member_id: nil, modify_date_max: nil, modify_date_min: nil, order_id: nil, page_token: nil, product_category: nil, publisher_id: nil, sku: nil, status: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Events
Retrieves event data for a given advertiser/publisher.
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 286 def list_events(role, role_id, advertiser_id: nil, charge_type: nil, event_date_max: nil, event_date_min: nil, link_id: nil, max_results: nil, member_id: nil, modify_date_max: nil, modify_date_min: nil, order_id: nil, page_token: nil, product_category: nil, publisher_id: nil, sku: nil, status: nil, type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{role}/{roleId}/events', ) command.response_representation = Google::Apis::GanV1beta1::Events::Representation command.response_class = Google::Apis::GanV1beta1::Events command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['chargeType'] = charge_type unless charge_type.nil? command.query['eventDateMax'] = event_date_max unless event_date_max.nil? command.query['eventDateMin'] = event_date_min unless event_date_min.nil? command.query['linkId'] = link_id unless link_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['memberId'] = member_id unless member_id.nil? command.query['modifyDateMax'] = modify_date_max unless modify_date_max.nil? command.query['modifyDateMin'] = modify_date_min unless modify_date_min.nil? command.query['orderId'] = order_id unless order_id.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['productCategory'] = product_category unless product_category.nil? command.query['publisherId'] = publisher_id unless publisher_id.nil? command.query['sku'] = sku unless sku.nil? command.query['status'] = status unless status.nil? command.query['type'] = type unless type.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_links(role, role_id, advertiser_id: nil, asset_size: nil, authorship: nil, create_date_max: nil, create_date_min: nil, link_type: nil, max_results: nil, page_token: nil, promotion_type: nil, relationship_status: nil, search_text: nil, start_date_max: nil, start_date_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Links
Retrieves all links that match the query parameters.
452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 452 def list_links(role, role_id, advertiser_id: nil, asset_size: nil, authorship: nil, create_date_max: nil, create_date_min: nil, link_type: nil, max_results: nil, page_token: nil, promotion_type: nil, relationship_status: nil, search_text: nil, start_date_max: nil, start_date_min: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{role}/{roleId}/links', ) command.response_representation = Google::Apis::GanV1beta1::Links::Representation command.response_class = Google::Apis::GanV1beta1::Links command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.query['advertiserId'] = advertiser_id unless advertiser_id.nil? command.query['assetSize'] = asset_size unless asset_size.nil? command.query['authorship'] = unless .nil? command.query['createDateMax'] = create_date_max unless create_date_max.nil? command.query['createDateMin'] = create_date_min unless create_date_min.nil? command.query['linkType'] = link_type unless link_type.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['promotionType'] = promotion_type unless promotion_type.nil? command.query['relationshipStatus'] = relationship_status unless relationship_status.nil? command.query['searchText'] = search_text unless search_text.nil? command.query['startDateMax'] = start_date_max unless start_date_max.nil? command.query['startDateMin'] = start_date_min unless start_date_min.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_publishers(role, role_id, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, publisher_category: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::GanV1beta1::Publishers
Retrieves data about all publishers that the requesting advertiser/publisher has access to.
572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 |
# File 'generated/google/apis/gan_v1beta1/service.rb', line 572 def list_publishers(role, role_id, max_results: nil, min_ninety_day_epc: nil, min_payout_rank: nil, min_seven_day_epc: nil, page_token: nil, publisher_category: nil, relationship_status: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, '{role}/{roleId}/publishers', ) command.response_representation = Google::Apis::GanV1beta1::Publishers::Representation command.response_class = Google::Apis::GanV1beta1::Publishers command.params['role'] = role unless role.nil? command.params['roleId'] = role_id unless role_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['minNinetyDayEpc'] = min_ninety_day_epc unless min_ninety_day_epc.nil? command.query['minPayoutRank'] = min_payout_rank unless min_payout_rank.nil? command.query['minSevenDayEpc'] = min_seven_day_epc unless min_seven_day_epc.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['publisherCategory'] = publisher_category unless publisher_category.nil? command.query['relationshipStatus'] = relationship_status unless relationship_status.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |