list method
List proposals.
A filter expression (PQL query) may be specified to filter the results. To retrieve all finalized proposals, regardless if a proposal is being renegotiated, see the FinalizedProposals resource. Note that Bidder/ChildSeat relationships differ from the usual behavior. A Bidder account can only see its child seats' proposals by specifying the ChildSeat's accountId in the request path.
Request parameters:
accountId
- Account ID of the buyer.
filter
- An optional PQL filter query used to query for proposals.
Nested repeated fields, such as proposal.deals.targetingCriterion, cannot
be filtered.
filterSyntax
- Syntax the filter is written in. Current implementation
defaults to PQL but in the future it will be LIST_FILTER.
Possible string values are:
- "FILTER_SYNTAX_UNSPECIFIED" : A placeholder for an undefined filter syntax.
- "PQL" : PQL query syntax. Visit https://developers.google.com/ad-manager/api/pqlreference for PQL documentation and examples.
- "LIST_FILTER" : API list filtering syntax. Read about syntax and usage at https://developers.google.com/authorized-buyers/apis/guides/v2/list-filters.
pageSize
- Requested page size. The server may return fewer results than
requested. If unspecified, the server will pick an appropriate default.
pageToken
- The page token as returned from ListProposalsResponse.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListProposalsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<ListProposalsResponse> list(
core.String accountId, {
core.String? filter,
core.String? filterSyntax,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final _queryParams = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (filterSyntax != null) 'filterSyntax': [filterSyntax],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final _url = 'v2beta1/accounts/' +
commons.escapeVariable('$accountId') +
'/proposals';
final _response = await _requester.request(
_url,
'GET',
queryParams: _queryParams,
);
return ListProposalsResponse.fromJson(
_response as core.Map<core.String, core.dynamic>);
}