get method

Future<Permission> get(
  1. String permissionId, {
  2. String? language,
  3. String? $fields,
})

Retrieves details of an Android app permission for display to an enterprise admin.

Request parameters:

permissionId - The ID of the permission.

language - The BCP47 tag for the user's preferred language (e.g. "en-US", "de")

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

Completes with a Permission.

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

  final url_ = 'androidenterprise/v1/permissions/' +
      commons.escapeVariable('$permissionId');

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