search method
Searches for all partner links to and from a given account.
Authorization Headers: This method supports the following optional headers
to define how the API authorizes access for the request: *
login-account: (Optional) The resource name of the account where the
Google Account of the credentials is a user. If not set, defaults to the
account of the request. Format:
accountTypes/{loginAccountType}/accounts/{loginAccountId}
Request parameters:
parent - Required. Account to search for partner links. If no filter
is specified, all partner links where this account is either the
owning_account or partner_account are returned. Format:
accountTypes/{account_type}/accounts/{account}
Value must have pattern ^accountTypes/\[^/\]+/accounts/\[^/\]+$.
filter - Optional. A filter string. All
fields need to be on the left hand side of each condition (for example:
partner_link_id = 123456789). Fields must be specified using either all
camel case or all
snake case. Don't use a
combination of camel case and snake case. Supported operations: - AND -
= - != Supported fields: - partner_link_id -
owning_account.account_type - owning_account.account_id -
partner_account.account_type - partner_account.account_id -
feature_set For partner links with the FEATURE_SET_AD_EVENT_MANAGEMENT
feature set, the following fields are also supported: -
partner_customer_account.account_id Example:
owning_account.account_type = "GOOGLE_ADS" AND partner_account.account_id = 987654321
pageSize - The maximum number of partner links to return. The service
may return fewer than this value. If unspecified, at most 50 partner links
will be returned. The maximum value is 100; values above 100 will be
coerced to 100.
pageToken - A page token, received from a previous SearchPartnerLinks
call. Provide this to retrieve the subsequent page. When paginating, all
other parameters provided to SearchPartnerLinks must match the call that
provided the page token.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a SearchPartnerLinksResponse.
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<SearchPartnerLinksResponse> search(
core.String parent, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'v1/' + core.Uri.encodeFull('$parent') + '/partnerLinks:search';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SearchPartnerLinksResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}