emojiVariation method

Future<SuccesEmojiResponseModel> emojiVariation(
  1. String emojiID
)

Get emoji variation Fetch the variations associated with a given emoji.

Implementation

Future<SuccesEmojiResponseModel> emojiVariation(
  String emojiID,
) async {
  const baseUrl = GiphyAPIPath.baseUrl;

  final pathSegments = [
    GiphyAPIPath.version2,
    GiphyAPIPath.emoji,
    GiphyAPIPath.emojiVariation(emojiID),
  ];

  Map<String, dynamic> queryParameters = {
    'api_key': apiKey,
  };

  // Make the request

  final responseMap = await GiphyApiManager.get(
    baseUrl,
    pathSegments,
    queryParameters: queryParameters,
    debugMode: debugMode,
  );

  // Parse the response

  return SuccesEmojiResponseModel.fromJson(responseMap);
}