get method

Future<Item> get(
  1. String itemId, {
  2. String? projection,
  3. String? $fields,
})

Gets your own Chrome Web Store item.

Request parameters:

itemId - Unique identifier representing the Chrome App, Chrome Extension, or the Chrome Theme.

projection - Determines which subset of the item information to return. Possible string values are:

  • "DRAFT" : Return information extracted from the current draft.
  • "PUBLISHED" : Return information extracted from the published item draft.

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

Completes with a Item.

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<Item> get(
  core.String itemId, {
  core.String? projection,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'projection': ?projection == null ? null : [projection],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'chromewebstore/v1.1/items/' + commons.escapeVariable('$itemId');

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