AdSense
import { AdSense } from "https://googleapis.deno.dev/v1/adsense:v2.ts";
The AdSense Management API allows publishers to access their inventory and run earnings and performance reports.
§Methods
Creates an ad unit. This method can be called only by a restricted set of
projects, which are usually owned by AdSense for
Platforms publishers.
Contact your account manager if you need to use this method. Note that ad
units can only be created for ad clients with an "AFC" product code. For
more info see the AdClient
resource. For
now, this method can only be used to create DISPLAY
ad units. See:
https://support.google.com/adsense/answer/9183566
Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}
Gets the ad unit code for a given ad unit. For more information, see About the AdSense code and Where to place the ad code in your HTML.
Required. Name of the adunit for which to get the adcode. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
Lists all ad units under a specified account and ad client.
Required. The ad client which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}
Lists all the custom channels available for an ad unit.
Required. The ad unit which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
Updates an ad unit. This method can be called only by a restricted set of
projects, which are usually owned by AdSense for
Platforms publishers.
Contact your account manager if you need to use this method. For now, this
method can only be used to update DISPLAY
ad units. See:
https://support.google.com/adsense/answer/9183566
Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
Creates a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
Required. The ad client to create a custom channel under. Format: accounts/{account}/adclients/{adclient}
Deletes a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
Required. Name of the custom channel to delete. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
Gets information about the selected custom channel.
Required. Name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
Lists all the custom channels available in an ad client.
Required. The ad client which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}
Lists all the ad units available for a custom channel.
Required. The custom channel which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
Updates a custom channel. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers. Contact your account manager if you need to use this method.
Output only. Resource name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}
Gets the AdSense code for a given ad client. This returns what was previously known as the 'auto ad code'. This is only supported for ad clients with a product_code of AFC. For more information, see About the AdSense code.
Required. Name of the ad client for which to get the adcode. Format: accounts/{account}/adclients/{adclient}
Lists all the ad clients available in an account.
Required. The account which owns the collection of ad clients. Format: accounts/{account}
Gets information about the selected url channel.
Required. The name of the url channel to retrieve. Format: accounts/{account}/adclients/{adclient}/urlchannels/{urlchannel}
Lists active url channels.
Required. The ad client which owns the collection of url channels. Format: accounts/{account}/adclients/{adclient}
Lists all the alerts available in an account.
Required. The account which owns the collection of alerts. Format: accounts/{account}
Gets the ad blocking recovery tag of an account.
Required. The name of the account to get the tag for. Format: accounts/{account}
Lists all accounts available to this user.
Lists all accounts directly managed by the given AdSense account.
Required. The parent account, which owns the child accounts. Format: accounts/{account}
Lists all the payments available for an account.
Required. The account which owns the collection of payments. Format: accounts/{account}
Gets information about the selected policy issue.
Required. Name of the policy issue. Format: accounts/{account}/policyIssues/{policy_issue}
Lists all the policy issues for the specified account.
Required. The account for which policy issues are being retrieved. Format: accounts/{account}
Generates an ad hoc report.
Required. The account which owns the collection of reports. Format: accounts/{account}
Generates a csv formatted ad hoc report.
Required. The account which owns the collection of reports. Format: accounts/{account}
Gets the saved report from the given resource name.
Required. The name of the saved report to retrieve. Format: accounts/{account}/reports/{report}
Generates a saved report.
Required. Name of the saved report. Format: accounts/{account}/reports/{report}
Generates a csv formatted saved report.
Required. Name of the saved report. Format: accounts/{account}/reports/{report}
Lists saved reports.
Required. The account which owns the collection of reports. Format: accounts/{account}