Пример #1
0
        internal new static RestTeam Create(BaseRestClient client, Model model)
        {
            var entity = new RestTeam(client, model.Id);

            entity.Update(model);
            return(entity);
        }
Пример #2
0
        public static async Task <RestTeam> GetTeamAsync(BaseRestClient client, string name)
        {
            var token = TokenHelper.GetSingleToken(client);
            var model = await client.RestClient.GetTeamInternalAsync(token, name);

            return(RestTeam.Create(client, model));
        }
Пример #3
0
        public static async Task <RestTeam> GetTeamAsync(BaseTwitchClient client, string name, RequestOptions options = null)
        {
            var model = await client.ApiClient.GetTeamAsync(name, options).ConfigureAwait(false);

            if (model != null)
            {
                return(RestTeam.Create(client, model));
            }
            return(null);
        }