Class: Google::Apis::GanV1beta1::GanService

Inherits:
Core::BaseService show all
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.

Examples:

require 'google/apis/gan_v1beta1'

Gan = Google::Apis::GanV1beta1 # Alias the module
service = Gan::GanService.new

See Also:

Instance Attribute Summary collapse

Attributes inherited from Core::BaseService

#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path

Instance Method Summary collapse

Methods inherited from Core::BaseService

#batch, #batch_upload, #fetch_all, #http

Methods included from Core::Logging

#logger

Constructor Details

#initializeGanService

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

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



38
39
40
# File 'generated/google/apis/gan_v1beta1/service.rb', line 38

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. Overrides userIp if both are provided.

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

Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.

Returns:

  • (String)

    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.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • advertiser_id (String)

    The ID of the advertiser to look up. Optional.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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

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.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • link_id (String)

    The ID of the link to look up.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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}', options)
  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.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • publisher_id (String)

    The ID of the publisher to look up. Optional.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • report_type (String)

    The type of report being requested. Valid values: 'order_delta'. Required.

  • advertiser_id (Array<String>, String)

    The IDs of the advertisers to look up, if applicable.

  • calculate_totals (Boolean)

    Whether or not to calculate totals rows. Optional.

  • end_date (String)

    The end date (exclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day after startDate, if that is given, or today. Optional.

  • event_type (String)

    Filters out all events that are not of the given type. Valid values: 'action', 'transaction', or 'charge'. Optional.

  • link_id (Array<String>, String)

    Filters to capture one of given link IDs. Optional.

  • max_results (Fixnum)

    Max number of items to return in this page. Optional. Defaults to return all results.

  • order_id (Array<String>, String)

    Filters to capture one of the given order IDs. Optional.

  • publisher_id (Array<String>, String)

    The IDs of the publishers to look up, if applicable.

  • start_date (String)

    The start date (inclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day before endDate, if that is given, or yesterday. Optional.

  • start_index (Fixnum)

    Offset on which to return results when paging. Optional.

  • status (String)

    Filters out all events that do not have the given status. Valid values: ' active', 'canceled', or 'invalid'. Optional.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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}', options)
  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

Inserts a new link.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • link_object (Google::Apis::GanV1beta1::Link) (defaults to: nil)
  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • advertiser_category (String)

    Caret(^) delimted list of advertiser categories. Valid categories are defined here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py? hl=en&answer=107581. Filters out all advertisers not in one of the given advertiser categories. Optional.

  • max_results (Fixnum)

    Max number of items to return in this page. Optional. Defaults to 20.

  • min_ninety_day_epc (Float)

    Filters out all advertisers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0. Optional.

  • min_payout_rank (Fixnum)

    A value between 1 and 4, where 1 represents the quartile of advertisers with the lowest ranks and 4 represents the quartile of advertisers with the highest ranks. Filters out all advertisers with a lower rank than the given quartile. For example if a 2 was given only advertisers with a payout rank of 25 or higher would be included. Optional.

  • min_seven_day_epc (Float)

    Filters out all advertisers that have a seven day EPC average lower than the given value (inclusive). Min value: 0.0. Optional.

  • page_token (String)

    The value of 'nextPageToken' from the previous page. Optional.

  • relationship_status (String)

    Filters out all advertisers for which do not have the given relationship status with the requesting publisher.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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.

Parameters:

  • publisher (String)

    The ID of the publisher in question.

  • advertiser (Array<String>, String)

    The advertiser ID of a card issuer whose offers to include. Optional, may be repeated.

  • projection (String)

    The set of fields to return.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • advertiser_id (String)

    Caret(^) delimited list of advertiser IDs. Filters out all events that do not reference one of the given advertiser IDs. Only used when under publishers role. Optional.

  • charge_type (String)

    Filters out all charge events that are not of the given charge type. Valid values: 'other', 'slotting_fee', 'monthly_minimum', 'tier_bonus', 'credit', ' debit'. Optional.

  • event_date_max (String)

    Filters out all events later than given date. Optional. Defaults to 24 hours after eventMin.

  • event_date_min (String)

    Filters out all events earlier than given date. Optional. Defaults to 24 hours from current date/time.

  • link_id (String)

    Caret(^) delimited list of link IDs. Filters out all events that do not reference one of the given link IDs. Optional.

  • max_results (Fixnum)

    Max number of offers to return in this page. Optional. Defaults to 20.

  • member_id (String)

    Caret(^) delimited list of member IDs. Filters out all events that do not reference one of the given member IDs. Optional.

  • modify_date_max (String)

    Filters out all events modified later than given date. Optional. Defaults to 24 hours after modifyDateMin, if modifyDateMin is explicitly set.

  • modify_date_min (String)

    Filters out all events modified earlier than given date. Optional. Defaults to 24 hours before the current modifyDateMax, if modifyDateMax is explicitly set.

  • order_id (String)

    Caret(^) delimited list of order IDs. Filters out all events that do not reference one of the given order IDs. Optional.

  • page_token (String)

    The value of 'nextPageToken' from the previous page. Optional.

  • product_category (String)

    Caret(^) delimited list of product categories. Filters out all events that do not reference a product in one of the given product categories. Optional.

  • publisher_id (String)

    Caret(^) delimited list of publisher IDs. Filters out all events that do not reference one of the given publishers IDs. Only used when under advertiser role. Optional.

  • sku (String)

    Caret(^) delimited list of SKUs. Filters out all events that do not reference one of the given SKU. Optional.

  • status (String)

    Filters out all events that do not have the given status. Valid values: ' active', 'canceled'. Optional.

  • type (String)

    Filters out all events that are not of the given type. Valid values: 'action', 'transaction', 'charge'. Optional.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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

Retrieves all links that match the query parameters.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • advertiser_id (Array<String>, String)

    Limits the resulting links to the ones belonging to the listed advertisers.

  • asset_size (Array<String>, String)

    The size of the given asset.

  • authorship (String)

    The role of the author of the link.

  • create_date_max (String)

    The end of the create date range.

  • create_date_min (String)

    The beginning of the create date range.

  • link_type (String)

    The type of the link.

  • max_results (Fixnum)

    Max number of items to return in this page. Optional. Defaults to 20.

  • page_token (String)

    The value of 'nextPageToken' from the previous page. Optional.

  • promotion_type (Array<String>, String)

    The promotion type.

  • relationship_status (String)

    The status of the relationship.

  • search_text (String)

    Field for full text search across title and merchandising text, supports link id search.

  • start_date_max (String)

    The end of the start date range.

  • start_date_min (String)

    The beginning of the start date range.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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'] = authorship unless authorship.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.

Parameters:

  • role (String)

    The role of the requester. Valid values: 'advertisers' or 'publishers'.

  • role_id (String)

    The ID of the requesting advertiser or publisher.

  • max_results (Fixnum)

    Max number of items to return in this page. Optional. Defaults to 20.

  • min_ninety_day_epc (Float)

    Filters out all publishers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0. Optional.

  • min_payout_rank (Fixnum)

    A value between 1 and 4, where 1 represents the quartile of publishers with the lowest ranks and 4 represents the quartile of publishers with the highest ranks. Filters out all publishers with a lower rank than the given quartile. For example if a 2 was given only publishers with a payout rank of 25 or higher would be included. Optional.

  • min_seven_day_epc (Float)

    Filters out all publishers that have a seven day EPC average lower than the given value (inclusive). Min value 0.0. Optional.

  • page_token (String)

    The value of 'nextPageToken' from the previous page. Optional.

  • publisher_category (String)

    Caret(^) delimted list of publisher categories. Valid categories: ( unclassified|community_and_content|shopping_and_promotion|loyalty_and_rewards| network|search_specialist|comparison_shopping|email). Filters out all publishers not in one of the given advertiser categories. Optional.

  • relationship_status (String)

    Filters out all publishers for which do not have the given relationship status with the requesting publisher.

  • fields (String)

    Selector specifying which fields to include in a partial response.

  • quota_user (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. Overrides userIp if both are provided.

  • user_ip (String)

    IP address of the site where the request originates. Use this if you want to enforce per-user limits.

  • options (Google::Apis::RequestOptions)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:



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', options)
  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