Ejemplo n.º 1
0
        internal static RestGameSummary Create(Model model)
        {
            var entity = new RestGameSummary();

            entity.Update(model);
            return(entity);
        }
Ejemplo n.º 2
0
        public static async Task <RestGameSummary> GetGameSummaryAsync(BaseTwitchClient client, string game, RequestOptions options = null)
        {
            var model = await client.ApiClient.GetStreamSummaryAsync(game, options).ConfigureAwait(false);

            if (model != null)
            {
                return(RestGameSummary.Create(model));
            }
            return(null);
        }
Ejemplo n.º 3
0
        internal static async Task <RestGameSummary> GetGameSummaryAsync(BaseRestClient client, string game)
        {
            var token = TokenHelper.GetSingleToken(client);
            var model = await client.RestClient.GetGameSummaryInternalAsync(token, game);

            if (model == null)
            {
                return(null);
            }

            return(RestGameSummary.Create(model));
        }