getAccountAchievementsAccountsAccountAchievementsGetWithHttpInfo method
Future<Response>
getAccountAchievementsAccountsAccountAchievementsGetWithHttpInfo(
- String account, {
- AchievementType? type,
- bool? completed,
- int? page,
- int? size,
Get Account Achievements
Retrieve the achievements of a account.
Note: This method returns the HTTP Response.
Parameters:
-
String account (required): The name of the account.
-
AchievementType type: Type of achievements.
-
bool completed: Filter by completed achievements.
-
int page: Page number
-
int size: Page size
Implementation
Future<Response>
getAccountAchievementsAccountsAccountAchievementsGetWithHttpInfo(
String account, {
AchievementType? type,
bool? completed,
int? page,
int? size,
}) async {
// ignore: prefer_const_declarations
final path =
r'/accounts/{account}/achievements'.replaceAll('{account}', account);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (type != null) {
queryParams.addAll(_queryParams('', 'type', type));
}
if (completed != null) {
queryParams.addAll(_queryParams('', 'completed', completed));
}
if (page != null) {
queryParams.addAll(_queryParams('', 'page', page));
}
if (size != null) {
queryParams.addAll(_queryParams('', 'size', size));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}