📦 unofficial_twitch_auth

This package allows to retrieve all the data by the newest Twitch APIs.

Available on pub.dev: https://pub.dev/packages/unofficial_twitch_open_api

Getting started

To make the APIs works, you need to configure your application on Twitch Dev Console. If you don't how to do, please follow the steps here .

To access to the Twitch's data, was implemented the class TwitchManagerOpenApi. This utility create an instance of the available subclass of BaseTwitchOpenApi.

/// You can create the instance of [TwitchManagerOpenApi] via provider or get_it
/// An example below:
List<SingleChildWidget> _initProvider() {
  String clientId = 'your_secret_client_id';

  return [
    Provider<TwitchManagerOpenApi>(
      create: (ctx) =>
          TwitchManagerOpenApi(
            clientId: clientId,
          ),
    ),
  ];
}

/// Then, you can use the instance created previously to retrieve the subclass needed
T getInstance<T extends BaseTwitchOpenApi>() {
  final manager = Provider.of<TwitchManagerOpenApi>();

  return manager.of<T>(bearerToken: 'your_secret_token');
}

/// Finally, use the instance. An example below:
final channelInfo = getInstance<TwitchChannelInformation>(
  bearerToken: 'your_secret_token',
).getChannelInformation(broadcasterId: broadcasterId);

Libraries

base_twitch_open_api
open_api_channel_constants
open_api_channel_information_response
open_api_channel_stream_schedule_response
open_api_channel_teams_response
open_api_channel_user_follow_response
open_api_get_badge_response
open_api_get_channel_emotes_response
open_api_get_cheermotes_response
open_api_get_clips_response
open_api_get_game_response
open_api_get_streams_response
open_api_get_videos_response
open_api_search_categories_response
open_api_search_channels_response
open_api_search_users_response
twitch_channel_information
twitch_channel_information_impl
twitch_channel_media
twitch_channel_media_impl
twitch_game
twitch_game_impl
twitch_manager_open_api
twitch_open_api_constants
twitch_search_impl
unofficial_twitch_open_api