Beispiel #1
0
        // Reference: https://dev.twitch.tv/docs/v5/reference/channels/#get-channel-subscribers
        public static async Task <RootSubscriptionJSON> GetSubscribersByChannelAsync(string clientId, string accessToken)
        {
            string apiUriBaseCall = "https://api.twitch.tv/kraken/channels/" + _broadcasterInstance.TwitchId
                                    + "/subscriptions?limit=50&direction=desc"; // get 50 newest subscribers

            return(await ApiTwitchRequest.GetWithOAuthExecuteAsync <RootSubscriptionJSON>(apiUriBaseCall, accessToken, clientId));
        }
Beispiel #2
0
        // Reference: https://dev.twitch.tv/docs/v5/reference/channels/#get-channel-followers
        public static async Task <RootFollowerJSON> GetFollowersByChannelAsync(string clientId)
        {
            string apiUriBaseCall = "https://api.twitch.tv/kraken/channels/" + _broadcasterInstance.TwitchId
                                    + "/follows?limit=50&direction=desc"; // get 50 newest followers

            return(await ApiTwitchRequest.GetExecuteAsync <RootFollowerJSON>(apiUriBaseCall, clientId));
        }
Beispiel #3
0
        // Reference: https://dev.twitch.tv/docs/v5/reference/videos/#get-video
        public static async Task <VideoJSON> GetVideoAsync(string clientId, string videoId)
        {
            string apiUriBaseCall = "https://api.twitch.tv/kraken/videos/" + videoId;

            return(await ApiTwitchRequest.GetExecuteAsync <VideoJSON>(apiUriBaseCall, clientId));
        }
Beispiel #4
0
        // Reference: https://dev.twitch.tv/docs/v5/reference/clips/#get-clip
        public static async Task <ClipJSON> GetClipAsync(string clientId, string slug)
        {
            string apiUriBaseCall = "https://api.twitch.tv/kraken/clips/" + slug;

            return(await ApiTwitchRequest.GetExecuteAsync <ClipJSON>(apiUriBaseCall, clientId));
        }
Beispiel #5
0
 // Reference: https://dev.twitch.tv/docs/v5/reference/users/#get-users
 public static async Task <RootUserJSON> GetUsersByLoginNameAsync(string loginName, string clientId)
 {
     return(await ApiTwitchRequest.GetExecuteAsync <RootUserJSON>("https://api.twitch.tv/kraken/users?login=" + loginName, clientId));
 }
Beispiel #6
0
 // Reference: https://dev.twitch.tv/docs/v5/reference/streams/#get-stream-by-user
 public static async Task <RootStreamJSON> GetUserStreamAsync(string userId, string clientId)
 {
     return(await ApiTwitchRequest.GetExecuteAsync <RootStreamJSON>("https://api.twitch.tv/kraken/streams/" + userId, clientId));
 }
Beispiel #7
0
 // Reference: https://dev.twitch.tv/docs/v5/reference/streams/#get-stream-by-user
 public static async Task <RootStreamJSON> GetBroadcasterStreamAsync(string clientId)
 {
     return(await ApiTwitchRequest.GetExecuteAsync <RootStreamJSON>("https://api.twitch.tv/kraken/streams/" + _broadcasterInstance.TwitchId, clientId));
 }
Beispiel #8
0
 // Reference: https://dev.twitch.tv/docs/v5/reference/channels/#get-channel-by-id
 public static async Task <ChannelJSON> GetUserChannelByIdAsync(string userId, string clientId)
 {
     return(await ApiTwitchRequest.GetExecuteAsync <ChannelJSON>("https://api.twitch.tv/kraken/channels/" + userId, clientId));
 }
Beispiel #9
0
 // Reference: https://dev.twitch.tv/docs/v5/reference/channels/#get-channel-by-id
 public static async Task <ChannelJSON> GetBroadcasterChannelByIdAsync(string clientId)
 {
     return(await ApiTwitchRequest.GetExecuteAsync <ChannelJSON>("https://api.twitch.tv/kraken/channels/" + _broadcasterInstance.TwitchId, clientId));
 }