list method

Future<MobileAppsListResponse> list(
  1. String profileId, {
  2. List<String>? directories,
  3. List<String>? ids,
  4. int? maxResults,
  5. String? pageToken,
  6. String? searchString,
  7. String? $fields,
})

Retrieves list of available mobile apps.

Request parameters:

profileId - User profile ID associated with this request. Value must have pattern ^\[^/\]+$.

directories - Select only apps from these directories.

ids - Select only apps with these IDs.

maxResults - Maximum number of results to return.

pageToken - Value of the nextPageToken from the previous result page.

searchString - Allows searching for objects by name or ID. Wildcards () are allowed. For example, "app2015" will return objects with names like "app Jan 2018", "app Jan 2018", or simply "app 2018". Most of the searches also add wildcards implicitly at the start and the end of the search string. For example, a search string of "app" will match objects with name "my app", "app 2018", or simply "app".

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

Completes with a MobileAppsListResponse.

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<MobileAppsListResponse> list(
  core.String profileId, {
  core.List<core.String>? directories,
  core.List<core.String>? ids,
  core.int? maxResults,
  core.String? pageToken,
  core.String? searchString,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (directories != null) 'directories': directories,
    if (ids != null) 'ids': ids,
    if (maxResults != null) 'maxResults': ['${maxResults}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (searchString != null) 'searchString': [searchString],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'userprofiles/' + core.Uri.encodeFull('$profileId') + '/mobileApps';

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