getAccountImage function

Future<ApiResponse<AccountImageView>> getAccountImage(
  1. ExsitedClient client,
  2. Object accountId, {
  3. bool? raiseOnError,
  4. String? responseFormat,
})

GET /api/v4/accounts/{account_id}/image - the profile image reference.

A URI, not image bytes, and null when the account has no image.

Implementation

Future<ApiResponse<AccountImageView>> getAccountImage(
  ExsitedClient client,
  Object accountId, {
  bool? raiseOnError,
  String? responseFormat,
}) =>
    client.sendGetRequest(AccountsUrls.accountImage,
        pathParams: {'account_id': accountId},
        raiseOnError: raiseOnError,
        responseFormat: responseFormat,
        dtoDecoder: AccountImageView.fromMap);