list method
Retrieves a list of sizes, possibly filtered.
Retrieved sizes are globally unique and may include values not currently in use by your account. Due to this, the list of sizes returned by this method may differ from the list seen in the Trafficking UI.
Request parameters:
profileId
- User profile ID associated with this request.
Value must have pattern ^\[^/\]+$
.
height
- Select only sizes with this height.
iabStandard
- Select only IAB standard sizes.
ids
- Select only sizes with these IDs.
width
- Select only sizes with this width.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a SizesListResponse.
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<SizesListResponse> list(
core.String profileId, {
core.int? height,
core.bool? iabStandard,
core.List<core.String>? ids,
core.int? width,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (height != null) 'height': ['${height}'],
if (iabStandard != null) 'iabStandard': ['${iabStandard}'],
if (ids != null) 'ids': ids,
if (width != null) 'width': ['${width}'],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'userprofiles/' + core.Uri.encodeFull('$profileId') + '/sizes';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return SizesListResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}