list method
Lists files for a user profile.
Request parameters:
profileId - The Campaign Manager 360 user profile ID.
maxResults - Maximum number of results to return.
pageToken - The value of the nextToken from the previous result page.
scope - The scope that defines which results are returned.
Possible string values are:
- "ALL" : All files in account.
- "MINE" : My files.
- "SHARED_WITH_ME" : Files shared with me.
sortField - The field by which to sort the list.
Possible string values are:
- "ID" : Sort by file ID.
- "LAST_MODIFIED_TIME" : Sort by 'lastmodifiedAt' field.
sortOrder - Order of sorted results.
Possible string values are:
- "ASCENDING" : Ascending order.
- "DESCENDING" : Descending order.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a FileList.
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<FileList> list(
core.String profileId, {
core.int? maxResults,
core.String? pageToken,
core.String? scope,
core.String? sortField,
core.String? sortOrder,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'maxResults': ?maxResults == null ? null : ['${maxResults}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'scope': ?scope == null ? null : [scope],
'sortField': ?sortField == null ? null : [sortField],
'sortOrder': ?sortOrder == null ? null : [sortOrder],
'fields': ?$fields == null ? null : [$fields],
};
final url_ =
'userprofiles/' + commons.escapeVariable('$profileId') + '/files';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return FileList.fromJson(response_ as core.Map<core.String, core.dynamic>);
}