get method
Get an API key with ID
id The ID of the API key
Implementation
Future<ApiKey> get({required String id}) async {
try {
final res = await super.dio.get(
'/api-key/get',
options: await super.getOptions(isTokenRequired: true),
queryParameters: {'id': id},
);
return ApiKey.fromJson(res.data);
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}