google_api_ad_sense v0.3.0 GoogleApi.AdSense.V14.Api.Adunits View Source

API calls for all endpoints tagged Adunits.

Link to this section Summary

Link to this section Functions

Link to this function

adsense_adunits_customchannels_list(connection, ad_client_id, ad_unit_id, optional_params \\ [], opts \\ []) View Source

List all custom channels which the specified ad unit belongs to.

Parameters

  • connection (GoogleApi.AdSense.V14.Connection): Connection to server
  • ad_client_id (String.t): Ad client which contains the ad unit.
  • ad_unit_id (String.t): Ad unit for which to list custom channels.
  • optional_params (keyword()): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): 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.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :maxResults (integer()): The maximum number of custom channels to include in the response, used for paging.
    • :pageToken (String.t): A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

Returns

{:ok, %GoogleApi.AdSense.V14.Model.CustomChannels{}} on success {:error, info} on failure

Link to this function

adsense_adunits_get(connection, ad_client_id, ad_unit_id, optional_params \\ [], opts \\ []) View Source

Gets the specified ad unit in the specified ad client.

Parameters

  • connection (GoogleApi.AdSense.V14.Connection): Connection to server
  • ad_client_id (String.t): Ad client for which to get the ad unit.
  • ad_unit_id (String.t): Ad unit to retrieve.
  • optional_params (keyword()): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): 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.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.

Returns

{:ok, %GoogleApi.AdSense.V14.Model.AdUnit{}} on success {:error, info} on failure

Link to this function

adsense_adunits_get_ad_code(connection, ad_client_id, ad_unit_id, optional_params \\ [], opts \\ []) View Source

Get ad code for the specified ad unit.

Parameters

  • connection (GoogleApi.AdSense.V14.Connection): Connection to server
  • ad_client_id (String.t): Ad client with contains the ad unit.
  • ad_unit_id (String.t): Ad unit to get the code for.
  • optional_params (keyword()): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): 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.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.

Returns

{:ok, %GoogleApi.AdSense.V14.Model.AdCode{}} on success {:error, info} on failure

Link to this function

adsense_adunits_list(connection, ad_client_id, optional_params \\ [], opts \\ []) View Source

List all ad units in the specified ad client for this AdSense account.

Parameters

  • connection (GoogleApi.AdSense.V14.Connection): Connection to server
  • ad_client_id (String.t): Ad client for which to list ad units.
  • optional_params (keyword()): [optional] Optional parameters

    • :alt (String.t): Data format for the response.
    • :fields (String.t): Selector specifying which fields to include in a partial response.
    • :key (String.t): 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.
    • :oauth_token (String.t): OAuth 2.0 token for the current user.
    • :prettyPrint (boolean()): Returns response with indentations and line breaks.
    • :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
    • :userIp (String.t): Deprecated. Please use quotaUser instead.
    • :includeInactive (boolean()): Whether to include inactive ad units. Default: true.
    • :maxResults (integer()): The maximum number of ad units to include in the response, used for paging.
    • :pageToken (String.t): A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response.

Returns

{:ok, %GoogleApi.AdSense.V14.Model.AdUnits{}} on success {:error, info} on failure