get method

Future<CustomList> get(
  1. String customListId, {
  2. String? advertiserId,
  3. String? $fields,
})

Gets a custom list.

Request parameters:

customListId - Required. The ID of the custom list to fetch. Value must have pattern ^\[^/\]+$.

advertiserId - The ID of the DV360 advertiser that has access to the fetched custom lists.

$fields - Selector specifying which fields to include in a partial response.

Completes with a CustomList.

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<CustomList> get(
  core.String customListId, {
  core.String? advertiserId,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (advertiserId != null) 'advertiserId': [advertiserId],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v3/customLists/' + core.Uri.encodeFull('$customListId');

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return CustomList.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}