get method
Gets an in-app product, which can be a managed product or a subscription.
This method should no longer be used to retrieve subscriptions. See this article for more information.
Request parameters:
packageName
- Package name of the app.
sku
- Unique identifier for the in-app product.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a InAppProduct.
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<InAppProduct> get(
core.String packageName,
core.String sku, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'androidpublisher/v3/applications/' +
commons.escapeVariable('$packageName') +
'/inappproducts/' +
commons.escapeVariable('$sku');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return InAppProduct.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}