fetch method

  1. @override
Future<Integration> fetch(
  1. Snowflake id
)
override

Fetch the item with the given id from the API.

Implementers should ensure this method updates the cache.

Implementation

@override
Future<Integration> fetch(Snowflake id) async {
  final integrations = await list();

  return integrations.firstWhere(
    (integration) => integration.id == id,
    orElse: () => throw IntegrationNotFoundException(guildId, id),
  );
}