Esempio n. 1
0
        internal static async Task <Models.API.Subscriber.SubscribersResponse> GetSubscribers(string channel, int limit = 25, int offset = 0, Enums.SortDirection direction = Enums.SortDirection.Ascending, string accessToken = null)
        {
            string args = $"?limit={limit}";

            args += $"&offset={offset}";
            args += $"&direction={(direction == Enums.SortDirection.Descending ? "desc" : "asc")}";

            return(new Models.API.Subscriber.SubscribersResponse(JObject.Parse(await Requests.MakeGetRequest($"https://api.twitch.tv/kraken/channels/{channel}/subscriptions{args}", accessToken))));
        }
Esempio n. 2
0
        internal static async Task <Models.API.Follow.FollowersResponse> GetTwitchFollowers(string channel, int limit = 25,
                                                                                            string cursor             = "-1", Enums.SortDirection direction = Enums.SortDirection.Descending)
        {
            string args = "";

            args += "?limit=" + limit;
            args += cursor != "-1" ? $"&cursor={cursor}" : "";
            args += "&direction=" + (direction == Enums.SortDirection.Descending ? "desc" : "asc");

            var resp = await Requests.MakeGetRequest($"https://api.twitch.tv/kraken/channels/{channel}/follows{args}");

            return(new Models.API.Follow.FollowersResponse(resp));
        }