Show / Hide Table of Contents

Class ReportsResource.GenerateRequest

Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.

Inheritance
System.Object
ClientServiceRequest
ClientServiceRequest<AdsenseReportsGenerateResponse>
AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>
ReportsResource.GenerateRequest
Implements
IClientServiceRequest<AdsenseReportsGenerateResponse>
IClientServiceRequest
Inherited Members
AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>.Alt
AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>.Fields
AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>.Key
AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>.OauthToken
AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>.PrettyPrint
AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>.QuotaUser
AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>.UserIp
ClientServiceRequest<AdsenseReportsGenerateResponse>.Execute()
ClientServiceRequest<AdsenseReportsGenerateResponse>.ExecuteAsStream()
ClientServiceRequest<AdsenseReportsGenerateResponse>.ExecuteAsync()
ClientServiceRequest<AdsenseReportsGenerateResponse>.ExecuteAsync(CancellationToken)
ClientServiceRequest<AdsenseReportsGenerateResponse>.ExecuteAsStreamAsync()
ClientServiceRequest<AdsenseReportsGenerateResponse>.ExecuteAsStreamAsync(CancellationToken)
ClientServiceRequest<AdsenseReportsGenerateResponse>.CreateRequest(Nullable<Boolean>)
ClientServiceRequest<AdsenseReportsGenerateResponse>.GenerateRequestUri()
ClientServiceRequest<AdsenseReportsGenerateResponse>.GetBody()
ClientServiceRequest<AdsenseReportsGenerateResponse>.GetDefaultETagAction(String)
ClientServiceRequest<AdsenseReportsGenerateResponse>.ETagAction
ClientServiceRequest<AdsenseReportsGenerateResponse>.ModifyRequest
ClientServiceRequest<AdsenseReportsGenerateResponse>.RequestParameters
ClientServiceRequest<AdsenseReportsGenerateResponse>.Service
ClientServiceRequest._unsuccessfulResponseHandlers
ClientServiceRequest._exceptionHandlers
ClientServiceRequest._executeInterceptors
ClientServiceRequest.AddUnsuccessfulResponseHandler(IHttpUnsuccessfulResponseHandler)
ClientServiceRequest.AddExceptionHandler(IHttpExceptionHandler)
ClientServiceRequest.AddExecuteInterceptor(IHttpExecuteInterceptor)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Google.Apis.AdSense.v1_4
Assembly: Google.Apis.AdSense.v1_4.dll
Syntax
public class GenerateRequest : AdSenseBaseServiceRequest<AdsenseReportsGenerateResponse>, IClientServiceRequest<AdsenseReportsGenerateResponse>, IClientServiceRequest

Constructors

GenerateRequest(IClientService, String, String)

Constructs a new Generate request.

Declaration
public GenerateRequest(IClientService service, string startDate, string endDate)
Parameters
Type Name Description
IClientService service
System.String startDate
System.String endDate

Properties

AccountId

Accounts upon which to report.

Declaration
[RequestParameter("accountId", RequestParameterType.Query)]
public virtual Repeatable<string> AccountId { get; set; }
Property Value
Type Description
Repeatable<System.String>

Currency

Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set.

Declaration
[RequestParameter("currency", RequestParameterType.Query)]
public virtual string Currency { get; set; }
Property Value
Type Description
System.String

Dimension

Dimensions to base the report on.

Declaration
[RequestParameter("dimension", RequestParameterType.Query)]
public virtual Repeatable<string> Dimension { get; set; }
Property Value
Type Description
Repeatable<System.String>

EndDate

End of the date range to report on in "YYYY-MM-DD" format, inclusive.

Declaration
[RequestParameter("endDate", RequestParameterType.Query)]
public virtual string EndDate { get; }
Property Value
Type Description
System.String

Filter

Filters to be run on the report.

Declaration
[RequestParameter("filter", RequestParameterType.Query)]
public virtual Repeatable<string> Filter { get; set; }
Property Value
Type Description
Repeatable<System.String>

HttpMethod

Gets the HTTP method.

Declaration
public override string HttpMethod { get; }
Property Value
Type Description
System.String
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.AdSense.v1_4.Data.AdsenseReportsGenerateResponse>.HttpMethod

Locale

Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.

Declaration
[RequestParameter("locale", RequestParameterType.Query)]
public virtual string Locale { get; set; }
Property Value
Type Description
System.String

MaxResults

The maximum number of rows of report data to return.

Declaration
[RequestParameter("maxResults", RequestParameterType.Query)]
public virtual int? MaxResults { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

MediaDownloader

Gets the media downloader.

Declaration
public IMediaDownloader MediaDownloader { get; }
Property Value
Type Description
IMediaDownloader

MethodName

Gets the method name.

Declaration
public override string MethodName { get; }
Property Value
Type Description
System.String
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.AdSense.v1_4.Data.AdsenseReportsGenerateResponse>.MethodName

Metric

Numeric columns to include in the report.

Declaration
[RequestParameter("metric", RequestParameterType.Query)]
public virtual Repeatable<string> Metric { get; set; }
Property Value
Type Description
Repeatable<System.String>

RestPath

Gets the REST path.

Declaration
public override string RestPath { get; }
Property Value
Type Description
System.String
Overrides
Google.Apis.Requests.ClientServiceRequest<Google.Apis.AdSense.v1_4.Data.AdsenseReportsGenerateResponse>.RestPath

Sort

The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.

Declaration
[RequestParameter("sort", RequestParameterType.Query)]
public virtual Repeatable<string> Sort { get; set; }
Property Value
Type Description
Repeatable<System.String>

StartDate

Start of the date range to report on in "YYYY-MM-DD" format, inclusive.

Declaration
[RequestParameter("startDate", RequestParameterType.Query)]
public virtual string StartDate { get; }
Property Value
Type Description
System.String

StartIndex

Index of the first row of report data to return.

Declaration
[RequestParameter("startIndex", RequestParameterType.Query)]
public virtual int? StartIndex { get; set; }
Property Value
Type Description
System.Nullable<System.Int32>

UseTimezoneReporting

Whether the report should be generated in the AdSense account's local timezone. If false default PST/PDT timezone will be used.

Declaration
[RequestParameter("useTimezoneReporting", RequestParameterType.Query)]
public virtual bool? UseTimezoneReporting { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

Methods

Download(Stream)

Synchronously download the media into the given stream.

Warning: This method hides download errors; use DownloadWithStatus(Stream) instead.

Declaration
public virtual void Download(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream

DownloadAsync(Stream)

Asynchronously download the media into the given stream.

Declaration
public virtual Task<IDownloadProgress> DownloadAsync(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream
Returns
Type Description
System.Threading.Tasks.Task<IDownloadProgress>

DownloadAsync(Stream, CancellationToken)

Asynchronously download the media into the given stream.

Declaration
public virtual Task<IDownloadProgress> DownloadAsync(Stream stream, CancellationToken cancellationToken)
Parameters
Type Name Description
System.IO.Stream stream
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IDownloadProgress>

DownloadRange(Stream, RangeHeaderValue)

Synchronously download a range of the media into the given stream.

Declaration
public virtual IDownloadProgress DownloadRange(Stream stream, RangeHeaderValue range)
Parameters
Type Name Description
System.IO.Stream stream
System.Net.Http.Headers.RangeHeaderValue range
Returns
Type Description
IDownloadProgress

DownloadRangeAsync(Stream, RangeHeaderValue, CancellationToken)

Asynchronously download a range of the media into the given stream.

Declaration
public virtual Task<IDownloadProgress> DownloadRangeAsync(Stream stream, RangeHeaderValue range, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.IO.Stream stream
System.Net.Http.Headers.RangeHeaderValue range
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IDownloadProgress>

DownloadWithStatus(Stream)

Synchronously download the media into the given stream.

Declaration
public virtual IDownloadProgress DownloadWithStatus(Stream stream)
Parameters
Type Name Description
System.IO.Stream stream
Returns
Type Description
IDownloadProgress

The final status of the download; including whether the download succeeded or failed.

InitParameters()

Initializes Generate parameter list.

Declaration
protected override void InitParameters()
Overrides
Google.Apis.AdSense.v1_4.AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_4.Data.AdsenseReportsGenerateResponse>.InitParameters()

Implements

IClientServiceRequest<TResponse>
IClientServiceRequest
Back to top