listSkillsStoreSkillsByCategory method
Lists all skills in the Alexa skill store by category.
Parameter categoryId
:
The category ID for which the skills are being retrieved from the skill
store.
Parameter maxResults
:
The maximum number of skills returned per paginated calls.
Parameter nextToken
:
The tokens used for pagination.
Implementation
Future<ListSkillsStoreSkillsByCategoryResponse>
listSkillsStoreSkillsByCategory({
required int categoryId,
int? maxResults,
String? nextToken,
}) async {
ArgumentError.checkNotNull(categoryId, 'categoryId');
_s.validateNumRange(
'categoryId',
categoryId,
1,
1152921504606846976,
isRequired: true,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
10,
);
_s.validateStringLength(
'nextToken',
nextToken,
1,
1100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AlexaForBusiness.ListSkillsStoreSkillsByCategory'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'CategoryId': categoryId,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListSkillsStoreSkillsByCategoryResponse.fromJson(jsonResponse.body);
}