Provides methods for interacting with reports. v1
Package
@google-ads/admanagerConstructors
(constructor)(opts, gaxInstance)
constructor
(
opts
?:
ClientOptions
,
gaxInstance
?:
typeof
gax
|
typeof
gax
.
fallback
);
Construct an instance of ReportServiceClient.
opts
ClientOptions
gaxInstance
typeof gax
| typeof fallback
: loaded instance of google-gax
. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new ReportServiceClient({fallback: true}, gax); ```
Properties
apiEndpoint
get
apiEndpoint
()
:
string
;
The DNS address for this API service.
apiEndpoint
static
get
apiEndpoint
()
:
string
;
The DNS address for this API service - same as servicePath.
auth
auth
:
gax
.
GoogleAuth
;
descriptors
descriptors
:
Descriptors
;
innerApiCalls
innerApiCalls
:
{
[
name
:
string
]
:
Function
;
};
operationsClient
operationsClient
:
gax
.
OperationsClient
;
pathTemplates
pathTemplates
:
{
[
name
:
string
]
:
gax
.
PathTemplate
;
};
port
static
get
port
()
:
number
;
The port for this API service.
reportServiceStub
reportServiceStub
?:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
scopes
static
get
scopes
()
:
never
[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static
get
servicePath
()
:
string
;
The DNS address for this API service.
universeDomain
get
universeDomain
()
:
string
;
warn
warn
:
(
code
:
string
,
message
:
string
,
warnType
?:
string
)
=
>
void
;
Methods
adUnitPath(networkCode, adUnit)
adUnitPath
(
networkCode
:
string
,
adUnit
:
string
)
:
string
;
Return a fully-qualified adUnit resource name string.
networkCode
string
adUnit
string
string
{string} Resource name string.
cancelOperation(request, options, callback)
cancelOperation
(
request
:
protos
.
google
.
longrunning
.
CancelOperationRequest
,
options
?:
gax
.
CallOptions
|
Callback<protos
.
google
.
protobuf
.
Empty
,
protos
.
google
.
longrunning
.
CancelOperationRequest
,
{}
|
undefined
|
null
> ,
callback
?:
Callback<protos
.
google
.
longrunning
.
CancelOperationRequest
,
protos
.
google
.
protobuf
.
Empty
,
{}
|
undefined
|
null
> )
:
Promise<protos
.
google
.
protobuf
.
Empty
> ;
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED
.
request
options
CallOptions
| Callback
< protos.google.protobuf.Empty
, protos.google.longrunning.CancelOperationRequest
, {} | undefined | null>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.
callback
Callback
< protos.google.longrunning.CancelOperationRequest
, protos.google.protobuf.Empty
, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.
const
client
=
longrunning
.
operationsClient
();
await
client
.
cancelOperation
({
name
:
''
});
checkRunReportProgress(name)
checkRunReportProgress
(
name
:
string
)
:
Promise<LROperation<protos
.
google
.
ads
.
admanager
.
v1
.
RunReportResponse
,
protos
.
google
.
ads
.
admanager
.
v1
.
RunReportMetadata
>> ;
Check the status of the long running operation returned by runReport()
.
name
string
The operation name that will be passed.
Promise
< LROperation
< protos.google.ads.admanager.v1.RunReportResponse
, protos.google.ads.admanager.v1.RunReportMetadata
>>
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The report to run.
* Format: `networks/{network_code}/reports/{report_id}`
*/
// const name = 'abc123'
// Imports the Admanager library
const
{
ReportServiceClient
}
=
require
(
' @google-ads/admanager
'
).
v1
;
// Instantiates a client
const
admanagerClient
=
new
ReportServiceClient
();
async
function
callRunReport
()
{
// Construct request
const
request
=
{
name
,
};
// Run request
const
[
operation
]
=
await
admanagerClient
.
runReport
(
request
);
const
[
response
]
=
await
operation
.
promise
();
console
.
log
(
response
);
}
callRunReport
();
close()
close
()
:
Promise<void>
;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Promise
<void>
{Promise} A promise that resolves when the client is closed.
companyPath(networkCode, company)
companyPath
(
networkCode
:
string
,
company
:
string
)
:
string
;
Return a fully-qualified company resource name string.
networkCode
string
company
string
string
{string} Resource name string.
contactPath(networkCode, contact)
contactPath
(
networkCode
:
string
,
contact
:
string
)
:
string
;
Return a fully-qualified contact resource name string.
networkCode
string
contact
string
string
{string} Resource name string.
createReport(request, options)
createReport
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
ICreateReportRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
ICreateReportRequest
|
undefined
,
{}
|
undefined
]>;
API to create a Report
object.
request
options
Promise
<[ protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.ICreateReportRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource where this `Report` will be created.
* Format: `networks/{network_code}`
*/
// const parent = 'abc123'
/**
* Required. The `Report` to create.
*/
// const report = {}
// Imports the Admanager library
const
{
ReportServiceClient
}
=
require
(
' @google-ads/admanager
'
).
v1
;
// Instantiates a client
const
admanagerClient
=
new
ReportServiceClient
();
async
function
callCreateReport
()
{
// Construct request
const
request
=
{
parent
,
report
,
};
// Run request
const
response
=
await
admanagerClient
.
createReport
(
request
);
console
.
log
(
response
);
}
callCreateReport
();
createReport(request, options, callback)
createReport
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
ICreateReportRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
ICreateReportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.ICreateReportRequest
| null | undefined, {} | null | undefined>
void
createReport(request, callback)
createReport
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
ICreateReportRequest
,
callback
:
Callback<protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
ICreateReportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.ICreateReportRequest
| null | undefined, {} | null | undefined>
void
customFieldPath(networkCode, customField)
customFieldPath
(
networkCode
:
string
,
customField
:
string
)
:
string
;
Return a fully-qualified customField resource name string.
networkCode
string
customField
string
string
{string} Resource name string.
customTargetingKeyPath(networkCode, customTargetingKey)
customTargetingKeyPath
(
networkCode
:
string
,
customTargetingKey
:
string
)
:
string
;
Return a fully-qualified customTargetingKey resource name string.
networkCode
string
customTargetingKey
string
string
{string} Resource name string.
customTargetingValuePath(networkCode, customTargetingKey, customTargetingValue)
customTargetingValuePath
(
networkCode
:
string
,
customTargetingKey
:
string
,
customTargetingValue
:
string
)
:
string
;
Return a fully-qualified customTargetingValue resource name string.
networkCode
string
customTargetingKey
string
customTargetingValue
string
string
{string} Resource name string.
deleteOperation(request, options, callback)
deleteOperation
(
request
:
protos
.
google
.
longrunning
.
DeleteOperationRequest
,
options
?:
gax
.
CallOptions
|
Callback<protos
.
google
.
protobuf
.
Empty
,
protos
.
google
.
longrunning
.
DeleteOperationRequest
,
{}
|
null
|
undefined
> ,
callback
?:
Callback<protos
.
google
.
protobuf
.
Empty
,
protos
.
google
.
longrunning
.
DeleteOperationRequest
,
{}
|
null
|
undefined
> )
:
Promise<protos
.
google
.
protobuf
.
Empty
> ;
Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED
.
request
options
CallOptions
| Callback
< protos.google.protobuf.Empty
, protos.google.longrunning.DeleteOperationRequest
, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.
callback
Callback
< protos.google.protobuf.Empty
, protos.google.longrunning.DeleteOperationRequest
, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.
const
client
=
longrunning
.
operationsClient
();
await
client
.
deleteOperation
({
name
:
''
});
entitySignalsMappingPath(networkCode, entitySignalsMapping)
entitySignalsMappingPath
(
networkCode
:
string
,
entitySignalsMapping
:
string
)
:
string
;
Return a fully-qualified entitySignalsMapping resource name string.
networkCode
string
entitySignalsMapping
string
string
{string} Resource name string.
fetchReportResultRows(request, options)
fetchReportResultRows
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
ads
.
admanager
.
v1
.
Report
.
DataTable
.
IRow
[],
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsRequest
|
null
,
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsResponse
]>;
Returns the result rows from a completed report. The caller must have previously called RunReport
and waited for that operation to complete. The rows will be returned according to the order specified by the sorts
member of the report definition.
request
options
Promise
<[ protos.google.ads.admanager.v1.Report.DataTable.IRow
[], protos.google.ads.admanager.v1.IFetchReportResultRowsRequest
| null, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse
]>
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using fetchReportResultRowsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
fetchReportResultRows(request, options, callback)
fetchReportResultRows
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsRequest
,
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsResponse
|
null
|
undefined
,
protos
.
google
.
ads
.
admanager
.
v1
.
Report
.
DataTable
.
IRow
> )
:
void
;
request
options
CallOptions
callback
PaginationCallback
< protos.google.ads.admanager.v1.IFetchReportResultRowsRequest
, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse
| null | undefined, protos.google.ads.admanager.v1.Report.DataTable.IRow
>
void
fetchReportResultRows(request, callback)
fetchReportResultRows
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsRequest
,
callback
:
PaginationCallback<protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsRequest
,
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsResponse
|
null
|
undefined
,
protos
.
google
.
ads
.
admanager
.
v1
.
Report
.
DataTable
.
IRow
> )
:
void
;
request
callback
PaginationCallback
< protos.google.ads.admanager.v1.IFetchReportResultRowsRequest
, protos.google.ads.admanager.v1.IFetchReportResultRowsResponse
| null | undefined, protos.google.ads.admanager.v1.Report.DataTable.IRow
>
void
fetchReportResultRowsAsync(request, options)
fetchReportResultRowsAsync
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
ads
.
admanager
.
v1
.
Report
.
DataTable
.
IRow
> ;
Equivalent to fetchReportResultRows
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
request
options
AsyncIterable
< protos.google.ads.admanager.v1.Report.DataTable.IRow
>
{Object} An iterable Object that allows async iteration . When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* The report result being fetched.
* Format:
* `networks/{network_code}/reports/{report_id}/results/{report_result_id}`
*/
// const name = 'abc123'
/**
* Optional. The maximum number of rows to return. The service may return
* fewer than this value. If unspecified, at most 1,000 rows will be returned.
* The maximum value is 10,000; values above 10,000 will be reduced to 10,000.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `FetchReportResultRows`
* call. Provide this to retrieve the second and subsequent batches of rows.
*/
// const pageToken = 'abc123'
// Imports the Admanager library
const
{
ReportServiceClient
}
=
require
(
' @google-ads/admanager
'
).
v1
;
// Instantiates a client
const
admanagerClient
=
new
ReportServiceClient
();
async
function
callFetchReportResultRows
()
{
// Construct request
const
request
=
{
};
// Run request
const
iterable
=
admanagerClient
.
fetchReportResultRowsAsync
(
request
);
for
await
(
const
response
of
iterable
)
{
console
.
log
(
response
);
}
}
callFetchReportResultRows
();
fetchReportResultRowsStream(request, options)
fetchReportResultRowsStream
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IFetchReportResultRowsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
request
options
Transform
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using fetchReportResultRowsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
getOperation(request, options, callback)
getOperation
(
request
:
protos
.
google
.
longrunning
.
GetOperationRequest
,
options
?:
gax
.
CallOptions
|
Callback<protos
.
google
.
longrunning
.
Operation
,
protos
.
google
.
longrunning
.
GetOperationRequest
,
{}
|
null
|
undefined
> ,
callback
?:
Callback<protos
.
google
.
longrunning
.
Operation
,
protos
.
google
.
longrunning
.
GetOperationRequest
,
{}
|
null
|
undefined
> )
:
Promise
< [
protos
.
google
.
longrunning
.
Operation
]>;
Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
request
options
CallOptions
| Callback
< protos.google.longrunning.Operation
, protos.google.longrunning.GetOperationRequest
, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.
callback
Callback
< protos.google.longrunning.Operation
, protos.google.longrunning.GetOperationRequest
, {} | null | undefined>
The function which will be called with the result of the API call.
The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.
const
client
=
longrunning
.
operationsClient
();
const
name
=
''
;
const
[
response
]
=
await
client
.
getOperation
({
name
});
// doThingsWith(response)
getProjectId()
getProjectId
()
:
Promise<string>
;
Promise
<string>
getProjectId(callback)
getProjectId
(
callback
:
Callback<string
,
undefined
,
undefined
> )
:
void
;
callback
Callback
<string, undefined, undefined>
void
getReport(request, options)
getReport
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IGetReportRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
IGetReportRequest
|
undefined
,
{}
|
undefined
]>;
API to retrieve a Report
object.
request
options
Promise
<[ protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.IGetReportRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the report.
* Format: `networks/{network_code}/reports/{report_id}`
*/
// const name = 'abc123'
// Imports the Admanager library
const
{
ReportServiceClient
}
=
require
(
' @google-ads/admanager
'
).
v1
;
// Instantiates a client
const
admanagerClient
=
new
ReportServiceClient
();
async
function
callGetReport
()
{
// Construct request
const
request
=
{
name
,
};
// Run request
const
response
=
await
admanagerClient
.
getReport
(
request
);
console
.
log
(
response
);
}
callGetReport
();
getReport(request, options, callback)
getReport
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IGetReportRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
IGetReportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.IGetReportRequest
| null | undefined, {} | null | undefined>
void
getReport(request, callback)
getReport
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IGetReportRequest
,
callback
:
Callback<protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
IGetReportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.IGetReportRequest
| null | undefined, {} | null | undefined>
void
initialize()
initialize
()
:
Promise
< {
[
name
:
string
]
:
Function
;
}>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Promise
<{
[name: string]: Function
;
}>
{Promise} A promise that resolves to an authenticated service stub.
labelPath(networkCode, label)
labelPath
(
networkCode
:
string
,
label
:
string
)
:
string
;
Return a fully-qualified label resource name string.
networkCode
string
label
string
string
{string} Resource name string.
listOperationsAsync(request, options)
listOperationsAsync
(
request
:
protos
.
google
.
longrunning
.
ListOperationsRequest
,
options
?:
gax
.
CallOptions
)
:
AsyncIterable<protos
.
google
.
longrunning
.
ListOperationsResponse
> ;
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED
. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
request
options
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.
AsyncIterable
< protos.google.longrunning.ListOperationsResponse
>
{Object} An iterable Object that conforms to iteration protocols .
const
client
=
longrunning
.
operationsClient
();
for
await
(
const
response
of
client
.
listOperationsAsync
(
request
));
// doThingsWith(response)
listReports(request, options)
listReports
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
ads
.
admanager
.
v1
.
IReport
[],
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsRequest
|
null
,
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsResponse
]>;
API to retrieve a list of Report
objects.
request
options
Promise
<[ protos.google.ads.admanager.v1.IReport
[], protos.google.ads.admanager.v1.IListReportsRequest
| null, protos.google.ads.admanager.v1.IListReportsResponse
]>
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listReportsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
listReports(request, options, callback)
listReports
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsRequest
,
options
:
CallOptions
,
callback
:
PaginationCallback<protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsRequest
,
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsResponse
|
null
|
undefined
,
protos
.
google
.
ads
.
admanager
.
v1
.
IReport
> )
:
void
;
request
options
CallOptions
callback
PaginationCallback
< protos.google.ads.admanager.v1.IListReportsRequest
, protos.google.ads.admanager.v1.IListReportsResponse
| null | undefined, protos.google.ads.admanager.v1.IReport
>
void
listReports(request, callback)
listReports
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsRequest
,
callback
:
PaginationCallback<protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsRequest
,
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsResponse
|
null
|
undefined
,
protos
.
google
.
ads
.
admanager
.
v1
.
IReport
> )
:
void
;
request
callback
PaginationCallback
< protos.google.ads.admanager.v1.IListReportsRequest
, protos.google.ads.admanager.v1.IListReportsResponse
| null | undefined, protos.google.ads.admanager.v1.IReport
>
void
listReportsAsync(request, options)
listReportsAsync
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsRequest
,
options
?:
CallOptions
)
:
AsyncIterable<protos
.
google
.
ads
.
admanager
.
v1
.
IReport
> ;
Equivalent to listReports
, but returns an iterable object.
for
- await
- of
syntax is used with the iterable to get response elements on-demand.
request
options
AsyncIterable
< protos.google.ads.admanager.v1.IReport
>
{Object} An iterable Object that allows async iteration . When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent, which owns this collection of reports.
* Format: `networks/{network_code}`
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of `Reports` to return. The service may return
* fewer than this value. If unspecified, at most 50 `Reports` will be
* returned. The maximum value is 1000; values above 1000 will be coerced to
* 1000.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListReports` call.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to `ListReports` must
* match the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. Expression to filter the response.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters
*/
// const filter = 'abc123'
/**
* Optional. Expression to specify sorting order.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters#order
*/
// const orderBy = 'abc123'
/**
* Optional. Number of individual resources to skip while paginating.
*/
// const skip = 1234
// Imports the Admanager library
const
{
ReportServiceClient
}
=
require
(
' @google-ads/admanager
'
).
v1
;
// Instantiates a client
const
admanagerClient
=
new
ReportServiceClient
();
async
function
callListReports
()
{
// Construct request
const
request
=
{
parent
,
};
// Run request
const
iterable
=
admanagerClient
.
listReportsAsync
(
request
);
for
await
(
const
response
of
iterable
)
{
console
.
log
(
response
);
}
}
callListReports
();
listReportsStream(request, options)
listReportsStream
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IListReportsRequest
,
options
?:
CallOptions
)
:
Transform
;
Equivalent to method.name.toCamelCase()
, but returns a NodeJS Stream object.
request
options
Transform
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listReportsAsync()
method described below for async iteration which you can stop as needed. Please see the documentation
for more details and examples.
matchAdUnitFromAdUnitName(adUnitName)
matchAdUnitFromAdUnitName
(
adUnitName
:
string
)
:
string
|
number
;
Parse the ad_unit from AdUnit resource.
adUnitName
string
A fully-qualified path representing AdUnit resource.
string | number
{string} A string representing the ad_unit.
matchCompanyFromCompanyName(companyName)
matchCompanyFromCompanyName
(
companyName
:
string
)
:
string
|
number
;
Parse the company from Company resource.
companyName
string
A fully-qualified path representing Company resource.
string | number
{string} A string representing the company.
matchContactFromContactName(contactName)
matchContactFromContactName
(
contactName
:
string
)
:
string
|
number
;
Parse the contact from Contact resource.
contactName
string
A fully-qualified path representing Contact resource.
string | number
{string} A string representing the contact.
matchCustomFieldFromCustomFieldName(customFieldName)
matchCustomFieldFromCustomFieldName
(
customFieldName
:
string
)
:
string
|
number
;
Parse the custom_field from CustomField resource.
customFieldName
string
A fully-qualified path representing CustomField resource.
string | number
{string} A string representing the custom_field.
matchCustomTargetingKeyFromCustomTargetingKeyName(customTargetingKeyName)
matchCustomTargetingKeyFromCustomTargetingKeyName
(
customTargetingKeyName
:
string
)
:
string
|
number
;
Parse the custom_targeting_key from CustomTargetingKey resource.
customTargetingKeyName
string
A fully-qualified path representing CustomTargetingKey resource.
string | number
{string} A string representing the custom_targeting_key.
matchCustomTargetingKeyFromCustomTargetingValueName(customTargetingValueName)
matchCustomTargetingKeyFromCustomTargetingValueName
(
customTargetingValueName
:
string
)
:
string
|
number
;
Parse the custom_targeting_key from CustomTargetingValue resource.
customTargetingValueName
string
A fully-qualified path representing CustomTargetingValue resource.
string | number
{string} A string representing the custom_targeting_key.
matchCustomTargetingValueFromCustomTargetingValueName(customTargetingValueName)
matchCustomTargetingValueFromCustomTargetingValueName
(
customTargetingValueName
:
string
)
:
string
|
number
;
Parse the custom_targeting_value from CustomTargetingValue resource.
customTargetingValueName
string
A fully-qualified path representing CustomTargetingValue resource.
string | number
{string} A string representing the custom_targeting_value.
matchEntitySignalsMappingFromEntitySignalsMappingName(entitySignalsMappingName)
matchEntitySignalsMappingFromEntitySignalsMappingName
(
entitySignalsMappingName
:
string
)
:
string
|
number
;
Parse the entity_signals_mapping from EntitySignalsMapping resource.
entitySignalsMappingName
string
A fully-qualified path representing EntitySignalsMapping resource.
string | number
{string} A string representing the entity_signals_mapping.
matchLabelFromLabelName(labelName)
matchLabelFromLabelName
(
labelName
:
string
)
:
string
|
number
;
Parse the label from Label resource.
labelName
string
A fully-qualified path representing Label resource.
string | number
{string} A string representing the label.
matchNetworkCodeFromAdUnitName(adUnitName)
matchNetworkCodeFromAdUnitName
(
adUnitName
:
string
)
:
string
|
number
;
Parse the network_code from AdUnit resource.
adUnitName
string
A fully-qualified path representing AdUnit resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromCompanyName(companyName)
matchNetworkCodeFromCompanyName
(
companyName
:
string
)
:
string
|
number
;
Parse the network_code from Company resource.
companyName
string
A fully-qualified path representing Company resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromContactName(contactName)
matchNetworkCodeFromContactName
(
contactName
:
string
)
:
string
|
number
;
Parse the network_code from Contact resource.
contactName
string
A fully-qualified path representing Contact resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromCustomFieldName(customFieldName)
matchNetworkCodeFromCustomFieldName
(
customFieldName
:
string
)
:
string
|
number
;
Parse the network_code from CustomField resource.
customFieldName
string
A fully-qualified path representing CustomField resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromCustomTargetingKeyName(customTargetingKeyName)
matchNetworkCodeFromCustomTargetingKeyName
(
customTargetingKeyName
:
string
)
:
string
|
number
;
Parse the network_code from CustomTargetingKey resource.
customTargetingKeyName
string
A fully-qualified path representing CustomTargetingKey resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromCustomTargetingValueName(customTargetingValueName)
matchNetworkCodeFromCustomTargetingValueName
(
customTargetingValueName
:
string
)
:
string
|
number
;
Parse the network_code from CustomTargetingValue resource.
customTargetingValueName
string
A fully-qualified path representing CustomTargetingValue resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromEntitySignalsMappingName(entitySignalsMappingName)
matchNetworkCodeFromEntitySignalsMappingName
(
entitySignalsMappingName
:
string
)
:
string
|
number
;
Parse the network_code from EntitySignalsMapping resource.
entitySignalsMappingName
string
A fully-qualified path representing EntitySignalsMapping resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromLabelName(labelName)
matchNetworkCodeFromLabelName
(
labelName
:
string
)
:
string
|
number
;
Parse the network_code from Label resource.
labelName
string
A fully-qualified path representing Label resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromNetworkName(networkName)
matchNetworkCodeFromNetworkName
(
networkName
:
string
)
:
string
|
number
;
Parse the network_code from Network resource.
networkName
string
A fully-qualified path representing Network resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromOrderName(orderName)
matchNetworkCodeFromOrderName
(
orderName
:
string
)
:
string
|
number
;
Parse the network_code from Order resource.
orderName
string
A fully-qualified path representing Order resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromPlacementName(placementName)
matchNetworkCodeFromPlacementName
(
placementName
:
string
)
:
string
|
number
;
Parse the network_code from Placement resource.
placementName
string
A fully-qualified path representing Placement resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromReportName(reportName)
matchNetworkCodeFromReportName
(
reportName
:
string
)
:
string
|
number
;
Parse the network_code from Report resource.
reportName
string
A fully-qualified path representing Report resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromRoleName(roleName)
matchNetworkCodeFromRoleName
(
roleName
:
string
)
:
string
|
number
;
Parse the network_code from Role resource.
roleName
string
A fully-qualified path representing Role resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromTaxonomyCategoryName(taxonomyCategoryName)
matchNetworkCodeFromTaxonomyCategoryName
(
taxonomyCategoryName
:
string
)
:
string
|
number
;
Parse the network_code from TaxonomyCategory resource.
taxonomyCategoryName
string
A fully-qualified path representing TaxonomyCategory resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromTeamName(teamName)
matchNetworkCodeFromTeamName
(
teamName
:
string
)
:
string
|
number
;
Parse the network_code from Team resource.
teamName
string
A fully-qualified path representing Team resource.
string | number
{string} A string representing the network_code.
matchNetworkCodeFromUserName(userName)
matchNetworkCodeFromUserName
(
userName
:
string
)
:
string
|
number
;
Parse the network_code from User resource.
userName
string
A fully-qualified path representing User resource.
string | number
{string} A string representing the network_code.
matchOrderFromOrderName(orderName)
matchOrderFromOrderName
(
orderName
:
string
)
:
string
|
number
;
Parse the order from Order resource.
orderName
string
A fully-qualified path representing Order resource.
string | number
{string} A string representing the order.
matchPlacementFromPlacementName(placementName)
matchPlacementFromPlacementName
(
placementName
:
string
)
:
string
|
number
;
Parse the placement from Placement resource.
placementName
string
A fully-qualified path representing Placement resource.
string | number
{string} A string representing the placement.
matchReportFromReportName(reportName)
matchReportFromReportName
(
reportName
:
string
)
:
string
|
number
;
Parse the report from Report resource.
reportName
string
A fully-qualified path representing Report resource.
string | number
{string} A string representing the report.
matchRoleFromRoleName(roleName)
matchRoleFromRoleName
(
roleName
:
string
)
:
string
|
number
;
Parse the role from Role resource.
roleName
string
A fully-qualified path representing Role resource.
string | number
{string} A string representing the role.
matchTaxonomyCategoryFromTaxonomyCategoryName(taxonomyCategoryName)
matchTaxonomyCategoryFromTaxonomyCategoryName
(
taxonomyCategoryName
:
string
)
:
string
|
number
;
Parse the taxonomy_category from TaxonomyCategory resource.
taxonomyCategoryName
string
A fully-qualified path representing TaxonomyCategory resource.
string | number
{string} A string representing the taxonomy_category.
matchTeamFromTeamName(teamName)
matchTeamFromTeamName
(
teamName
:
string
)
:
string
|
number
;
Parse the team from Team resource.
teamName
string
A fully-qualified path representing Team resource.
string | number
{string} A string representing the team.
matchUserFromUserName(userName)
matchUserFromUserName
(
userName
:
string
)
:
string
|
number
;
Parse the user from User resource.
userName
string
A fully-qualified path representing User resource.
string | number
{string} A string representing the user.
networkPath(networkCode)
networkPath
(
networkCode
:
string
)
:
string
;
Return a fully-qualified network resource name string.
networkCode
string
string
{string} Resource name string.
orderPath(networkCode, order)
orderPath
(
networkCode
:
string
,
order
:
string
)
:
string
;
Return a fully-qualified order resource name string.
networkCode
string
order
string
string
{string} Resource name string.
placementPath(networkCode, placement)
placementPath
(
networkCode
:
string
,
placement
:
string
)
:
string
;
Return a fully-qualified placement resource name string.
networkCode
string
placement
string
string
{string} Resource name string.
reportPath(networkCode, report)
reportPath
(
networkCode
:
string
,
report
:
string
)
:
string
;
Return a fully-qualified report resource name string.
networkCode
string
report
string
string
{string} Resource name string.
rolePath(networkCode, role)
rolePath
(
networkCode
:
string
,
role
:
string
)
:
string
;
Return a fully-qualified role resource name string.
networkCode
string
role
string
string
{string} Resource name string.
runReport(request, options)
runReport
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportRequest
,
options
?:
CallOptions
)
:
Promise
< [
LROperation<protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportResponse
,
protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
undefined
,
{}
|
undefined
]>;
Initiates the execution of an existing report asynchronously. Users can get the report by polling this operation via OperationsService.GetOperation
. Poll every 5 seconds initially, with an exponential backoff. Once a report is complete, the operation will contain a RunReportResponse
in its response field containing a report_result that can be passed to the FetchReportResultRows
method to retrieve the report data.
request
options
Promise
<[ LROperation
< protos.google.ads.admanager.v1.IRunReportResponse
, protos.google.ads.admanager.v1.IRunReportMetadata
>, protos.google.longrunning.IOperation
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise()
method returns a promise you can await
for. Please see the documentation
for more details and examples.
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The report to run.
* Format: `networks/{network_code}/reports/{report_id}`
*/
// const name = 'abc123'
// Imports the Admanager library
const
{
ReportServiceClient
}
=
require
(
' @google-ads/admanager
'
).
v1
;
// Instantiates a client
const
admanagerClient
=
new
ReportServiceClient
();
async
function
callRunReport
()
{
// Construct request
const
request
=
{
name
,
};
// Run request
const
[
operation
]
=
await
admanagerClient
.
runReport
(
request
);
const
[
response
]
=
await
operation
.
promise
();
console
.
log
(
response
);
}
callRunReport
();
runReport(request, options, callback)
runReport
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportRequest
,
options
:
CallOptions
,
callback
:
Callback<LROperation<protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportResponse
,
protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< LROperation
< protos.google.ads.admanager.v1.IRunReportResponse
, protos.google.ads.admanager.v1.IRunReportMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
void
runReport(request, callback)
runReport
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportRequest
,
callback
:
Callback<LROperation<protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportResponse
,
protos
.
google
.
ads
.
admanager
.
v1
.
IRunReportMetadata
> ,
protos
.
google
.
longrunning
.
IOperation
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< LROperation
< protos.google.ads.admanager.v1.IRunReportResponse
, protos.google.ads.admanager.v1.IRunReportMetadata
>, protos.google.longrunning.IOperation
| null | undefined, {} | null | undefined>
void
taxonomyCategoryPath(networkCode, taxonomyCategory)
taxonomyCategoryPath
(
networkCode
:
string
,
taxonomyCategory
:
string
)
:
string
;
Return a fully-qualified taxonomyCategory resource name string.
networkCode
string
taxonomyCategory
string
string
{string} Resource name string.
teamPath(networkCode, team)
teamPath
(
networkCode
:
string
,
team
:
string
)
:
string
;
Return a fully-qualified team resource name string.
networkCode
string
team
string
string
{string} Resource name string.
updateReport(request, options)
updateReport
(
request
?:
protos
.
google
.
ads
.
admanager
.
v1
.
IUpdateReportRequest
,
options
?:
CallOptions
)
:
Promise
< [
protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
IUpdateReportRequest
|
undefined
,
{}
|
undefined
]>;
API to update a Report
object.
request
options
Promise
<[ protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.IUpdateReportRequest
| undefined,
{} | undefined
]>
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.
/**
* This snippet has been automatically generated and should be regarded as a code template only.
* It will require modifications to work.
* It may require correct/in-range values for request initialization.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The `Report` to update.
*/
// const report = {}
/**
* Required. The list of fields to update.
*/
// const updateMask = {}
// Imports the Admanager library
const
{
ReportServiceClient
}
=
require
(
' @google-ads/admanager
'
).
v1
;
// Instantiates a client
const
admanagerClient
=
new
ReportServiceClient
();
async
function
callUpdateReport
()
{
// Construct request
const
request
=
{
report
,
updateMask
,
};
// Run request
const
response
=
await
admanagerClient
.
updateReport
(
request
);
console
.
log
(
response
);
}
callUpdateReport
();
updateReport(request, options, callback)
updateReport
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IUpdateReportRequest
,
options
:
CallOptions
,
callback
:
Callback<protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
IUpdateReportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
options
CallOptions
callback
Callback
< protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.IUpdateReportRequest
| null | undefined, {} | null | undefined>
void
updateReport(request, callback)
updateReport
(
request
:
protos
.
google
.
ads
.
admanager
.
v1
.
IUpdateReportRequest
,
callback
:
Callback<protos
.
google
.
ads
.
admanager
.
v1
.
IReport
,
protos
.
google
.
ads
.
admanager
.
v1
.
IUpdateReportRequest
|
null
|
undefined
,
{}
|
null
|
undefined
> )
:
void
;
request
callback
Callback
< protos.google.ads.admanager.v1.IReport
, protos.google.ads.admanager.v1.IUpdateReportRequest
| null | undefined, {} | null | undefined>
void
userPath(networkCode, user)
userPath
(
networkCode
:
string
,
user
:
string
)
:
string
;
Return a fully-qualified user resource name string.
networkCode
string
user
string
string
{string} Resource name string.