Ejemplo n.º 1
0
        internal static RestIngest Create(BaseTwitchClient client, Model model)
        {
            var entity = new RestIngest(client, model.Id);

            entity.Update(model);
            return(entity);
        }
Ejemplo n.º 2
0
        public static async Task <IReadOnlyCollection <RestIngest> > GetIngestsAsync(BaseRestClient client)
        {
            string token = TokenHelper.GetSingleToken(client);
            var    model = await client.RestClient.GetIngestsInternalAsync(token);

            var entity = model.Ingests.Select(x => RestIngest.Create(client, x));

            return(entity.ToArray());
        }
Ejemplo n.º 3
0
        // Ingests
        public static async Task <IReadOnlyCollection <RestIngest> > GetIngestsAsync(BaseTwitchClient client, RequestOptions options = null)
        {
            var model = await client.ApiClient.GetIngestsAsync(options).ConfigureAwait(false);

            if (model.Ingests != null)
            {
                return(model.Ingests.Select(x => RestIngest.Create(client, x)).ToArray());
            }
            return(null);
        }
Ejemplo n.º 4
0
 public int GetHashCode(RestIngest obj)
 => obj.GetHashCode();
Ejemplo n.º 5
0
 public bool Equals(RestIngest x, RestIngest y)
 => x.Id == y.Id;