getAvatar method

Future<DynamiteResponse<Uint8List, void>> getAvatar({
  1. required String guestName,
  2. required String size,
  3. GuestAvatarGetAvatarDarkTheme? darkTheme,
})

Returns a guest avatar image response.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • darkTheme Return dark avatar. Defaults to 0.
  • guestName The guest name, e.g. "Albert".
  • size The desired avatar size, e.g. 64 for 64x64px.

Status codes:

  • 200: Custom avatar returned
  • 201: Avatar returned
  • 500

See:

Implementation

Future<_i1.DynamiteResponse<Uint8List, void>> getAvatar({
  required String guestName,
  required String size,
  GuestAvatarGetAvatarDarkTheme? darkTheme,
}) async {
  final _request = $getAvatar_Request(
    guestName: guestName,
    size: size,
    darkTheme: darkTheme,
  );
  final _response = await _rootClient.httpClient.send(_request);

  final _serializer = $getAvatar_Serializer();
  final _rawResponse = await _i1.ResponseConverter<Uint8List, void>(_serializer).convert(_response);
  return _i1.DynamiteResponse.fromRawResponse(_rawResponse);
}