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
ReportsResource.GenerateRequest
Inherited Members
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()
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
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
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
HttpMethod
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> |
|
Gets the media downloader.
Declaration
public IMediaDownloader MediaDownloader { get; }
Property Value
MethodName
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
RestPath
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
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
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
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
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
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