getCurrentUserConnections method

Future<List<DiscordConnection>> getCurrentUserConnections()

Implementation

Future<List<DiscordConnection>> getCurrentUserConnections() async {
  try {
    final data = await discordHttpClient.getCall(
      [
        "users",
        "@me",
        "connections",
      ],
    );
    return List<DiscordConnection>.from(
      (data as List<Map<String, dynamic>>).map(DiscordConnection.fromJson),
    );
  } catch (e) {
    throw DiscordApiException(e.toString());
  }
}