Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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.

class AdSense {
constructor(client?: CredentialsClient, baseUrl?: string);
async accountsAdclientsAdunitsCreate(parent: string, req: AdUnit): Promise<AdUnit>;
async accountsAdclientsAdunitsGet(name: string): Promise<AdUnit>;
async accountsAdclientsAdunitsGetAdcode(name: string): Promise<AdUnitAdCode>;
async accountsAdclientsAdunitsList(parent: string, opts?: AccountsAdclientsAdunitsListOptions): Promise<ListAdUnitsResponse>;
async accountsAdclientsAdunitsListLinkedCustomChannels(parent: string, opts?: AccountsAdclientsAdunitsListLinkedCustomChannelsOptions): Promise<ListLinkedCustomChannelsResponse>;
async accountsAdclientsAdunitsPatch(
name: string,
req: AdUnit,
): Promise<AdUnit>;
async accountsAdclientsCustomchannelsCreate(parent: string, req: CustomChannel): Promise<CustomChannel>;
async accountsAdclientsCustomchannelsDelete(name: string): Promise<Empty>;
async accountsAdclientsCustomchannelsGet(name: string): Promise<CustomChannel>;
async accountsAdclientsCustomchannelsList(parent: string, opts?: AccountsAdclientsCustomchannelsListOptions): Promise<ListCustomChannelsResponse>;
async accountsAdclientsCustomchannelsListLinkedAdUnits(parent: string, opts?: AccountsAdclientsCustomchannelsListLinkedAdUnitsOptions): Promise<ListLinkedAdUnitsResponse>;
async accountsAdclientsCustomchannelsPatch(
name: string,
): Promise<CustomChannel>;
async accountsAdclientsGet(name: string): Promise<AdClient>;
async accountsAdclientsGetAdcode(name: string): Promise<AdClientAdCode>;
async accountsAdclientsList(parent: string, opts?: AccountsAdclientsListOptions): Promise<ListAdClientsResponse>;
async accountsAdclientsUrlchannelsGet(name: string): Promise<UrlChannel>;
async accountsAdclientsUrlchannelsList(parent: string, opts?: AccountsAdclientsUrlchannelsListOptions): Promise<ListUrlChannelsResponse>;
async accountsAlertsList(parent: string, opts?: AccountsAlertsListOptions): Promise<ListAlertsResponse>;
async accountsGet(name: string): Promise<Account>;
async accountsGetAdBlockingRecoveryTag(name: string): Promise<AdBlockingRecoveryTag>;
async accountsList(opts?: AccountsListOptions): Promise<ListAccountsResponse>;
async accountsListChildAccounts(parent: string, opts?: AccountsListChildAccountsOptions): Promise<ListChildAccountsResponse>;
async accountsPaymentsList(parent: string): Promise<ListPaymentsResponse>;
async accountsPolicyIssuesGet(name: string): Promise<PolicyIssue>;
async accountsPolicyIssuesList(parent: string, opts?: AccountsPolicyIssuesListOptions): Promise<ListPolicyIssuesResponse>;
async accountsReportsGenerate(account: string, opts?: AccountsReportsGenerateOptions): Promise<ReportResult>;
async accountsReportsGenerateCsv(account: string, opts?: AccountsReportsGenerateCsvOptions): Promise<HttpBody>;
async accountsReportsGetSaved(name: string): Promise<SavedReport>;
async accountsReportsSavedGenerate(name: string, opts?: AccountsReportsSavedGenerateOptions): Promise<ReportResult>;
async accountsReportsSavedGenerateCsv(name: string, opts?: AccountsReportsSavedGenerateCsvOptions): Promise<HttpBody>;
async accountsReportsSavedList(parent: string, opts?: AccountsReportsSavedListOptions): Promise<ListSavedReportsResponse>;
async accountsSitesGet(name: string): Promise<Site>;
async accountsSitesList(parent: string, opts?: AccountsSitesListOptions): Promise<ListSitesResponse>;
}

§Constructors

§
new AdSense(client?: CredentialsClient, baseUrl?: string)
[src]

§Methods

§
accountsAdclientsAdunitsCreate(parent: string, req: AdUnit): Promise<AdUnit>
[src]

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

@param parent

Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}

§
accountsAdclientsAdunitsGet(name: string): Promise<AdUnit>
[src]

Gets an ad unit from a specified account and ad client.

@param name

Required. AdUnit to get information about. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}

§
accountsAdclientsAdunitsGetAdcode(name: string): Promise<AdUnitAdCode>
[src]

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.

@param name

Required. Name of the adunit for which to get the adcode. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}

§
accountsAdclientsAdunitsList(parent: string, opts?: AccountsAdclientsAdunitsListOptions): Promise<ListAdUnitsResponse>
[src]

Lists all ad units under a specified account and ad client.

@param parent

Required. The ad client which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}

§
accountsAdclientsAdunitsListLinkedCustomChannels(parent: string, opts?: AccountsAdclientsAdunitsListLinkedCustomChannelsOptions): Promise<ListLinkedCustomChannelsResponse>
[src]

Lists all the custom channels available for an ad unit.

@param parent

Required. The ad unit which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}

§
accountsAdclientsAdunitsPatch(name: string, req: AdUnit, opts?: AccountsAdclientsAdunitsPatchOptions): Promise<AdUnit>
[src]

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

@param name

Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}

§
accountsAdclientsCustomchannelsCreate(parent: string, req: CustomChannel): Promise<CustomChannel>
[src]

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.

@param parent

Required. The ad client to create a custom channel under. Format: accounts/{account}/adclients/{adclient}

§
accountsAdclientsCustomchannelsDelete(name: string): Promise<Empty>
[src]

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.

@param name

Required. Name of the custom channel to delete. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}

§
accountsAdclientsCustomchannelsGet(name: string): Promise<CustomChannel>
[src]

Gets information about the selected custom channel.

@param name

Required. Name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}

§
accountsAdclientsCustomchannelsList(parent: string, opts?: AccountsAdclientsCustomchannelsListOptions): Promise<ListCustomChannelsResponse>
[src]

Lists all the custom channels available in an ad client.

@param parent

Required. The ad client which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}

§
accountsAdclientsCustomchannelsListLinkedAdUnits(parent: string, opts?: AccountsAdclientsCustomchannelsListLinkedAdUnitsOptions): Promise<ListLinkedAdUnitsResponse>
[src]

Lists all the ad units available for a custom channel.

@param parent

Required. The custom channel which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}

§
accountsAdclientsCustomchannelsPatch(name: string, req: CustomChannel, opts?: AccountsAdclientsCustomchannelsPatchOptions): Promise<CustomChannel>
[src]

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.

@param name

Output only. Resource name of the custom channel. Format: accounts/{account}/adclients/{adclient}/customchannels/{customchannel}

§
accountsAdclientsGet(name: string): Promise<AdClient>
[src]

Gets the ad client from the given resource name.

@param name

Required. The name of the ad client to retrieve. Format: accounts/{account}/adclients/{adclient}

§
accountsAdclientsGetAdcode(name: string): Promise<AdClientAdCode>
[src]

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.

@param name

Required. Name of the ad client for which to get the adcode. Format: accounts/{account}/adclients/{adclient}

§
accountsAdclientsList(parent: string, opts?: AccountsAdclientsListOptions): Promise<ListAdClientsResponse>
[src]

Lists all the ad clients available in an account.

@param parent

Required. The account which owns the collection of ad clients. Format: accounts/{account}

§
accountsAdclientsUrlchannelsGet(name: string): Promise<UrlChannel>
[src]

Gets information about the selected url channel.

@param name

Required. The name of the url channel to retrieve. Format: accounts/{account}/adclients/{adclient}/urlchannels/{urlchannel}

§
accountsAdclientsUrlchannelsList(parent: string, opts?: AccountsAdclientsUrlchannelsListOptions): Promise<ListUrlChannelsResponse>
[src]

Lists active url channels.

@param parent

Required. The ad client which owns the collection of url channels. Format: accounts/{account}/adclients/{adclient}

§
accountsAlertsList(parent: string, opts?: AccountsAlertsListOptions): Promise<ListAlertsResponse>
[src]

Lists all the alerts available in an account.

@param parent

Required. The account which owns the collection of alerts. Format: accounts/{account}

§
accountsGet(name: string): Promise<Account>
[src]

Gets information about the selected AdSense account.

@param name

Required. Account to get information about. Format: accounts/{account}

§
accountsGetAdBlockingRecoveryTag(name: string): Promise<AdBlockingRecoveryTag>
[src]

Gets the ad blocking recovery tag of an account.

@param name

Required. The name of the account to get the tag for. Format: accounts/{account}

§
accountsList(opts?: AccountsListOptions): Promise<ListAccountsResponse>
[src]

Lists all accounts available to this user.

§
accountsListChildAccounts(parent: string, opts?: AccountsListChildAccountsOptions): Promise<ListChildAccountsResponse>
[src]

Lists all accounts directly managed by the given AdSense account.

@param parent

Required. The parent account, which owns the child accounts. Format: accounts/{account}

§
accountsPaymentsList(parent: string): Promise<ListPaymentsResponse>
[src]

Lists all the payments available for an account.

@param parent

Required. The account which owns the collection of payments. Format: accounts/{account}

§
accountsPolicyIssuesGet(name: string): Promise<PolicyIssue>
[src]

Gets information about the selected policy issue.

@param name

Required. Name of the policy issue. Format: accounts/{account}/policyIssues/{policy_issue}

§
accountsPolicyIssuesList(parent: string, opts?: AccountsPolicyIssuesListOptions): Promise<ListPolicyIssuesResponse>
[src]

Lists all the policy issues for the specified account.

@param parent

Required. The account for which policy issues are being retrieved. Format: accounts/{account}

§
accountsReportsGenerate(account: string, opts?: AccountsReportsGenerateOptions): Promise<ReportResult>
[src]

Generates an ad hoc report.

@param account

Required. The account which owns the collection of reports. Format: accounts/{account}

§
accountsReportsGenerateCsv(account: string, opts?: AccountsReportsGenerateCsvOptions): Promise<HttpBody>
[src]

Generates a csv formatted ad hoc report.

@param account

Required. The account which owns the collection of reports. Format: accounts/{account}

§
accountsReportsGetSaved(name: string): Promise<SavedReport>
[src]

Gets the saved report from the given resource name.

@param name

Required. The name of the saved report to retrieve. Format: accounts/{account}/reports/{report}

§
accountsReportsSavedGenerate(name: string, opts?: AccountsReportsSavedGenerateOptions): Promise<ReportResult>
[src]

Generates a saved report.

@param name

Required. Name of the saved report. Format: accounts/{account}/reports/{report}

§
accountsReportsSavedGenerateCsv(name: string, opts?: AccountsReportsSavedGenerateCsvOptions): Promise<HttpBody>
[src]

Generates a csv formatted saved report.

@param name

Required. Name of the saved report. Format: accounts/{account}/reports/{report}

§
accountsReportsSavedList(parent: string, opts?: AccountsReportsSavedListOptions): Promise<ListSavedReportsResponse>
[src]

Lists saved reports.

@param parent

Required. The account which owns the collection of reports. Format: accounts/{account}

§
accountsSitesGet(name: string): Promise<Site>
[src]

Gets information about the selected site.

@param name

Required. Name of the site. Format: accounts/{account}/sites/{site}

§
accountsSitesList(parent: string, opts?: AccountsSitesListOptions): Promise<ListSitesResponse>
[src]

Lists all the sites available in an account.

@param parent

Required. The account which owns the collection of sites. Format: accounts/{account}