Ejemplo n.º 1
0
 public TvDbClient(HttpClient client, TvDBTokenAccessor tokenAccessor, IOptions <TvdbClientOptions> options)
 {
     Series         = new SeriesClient(client);
     Search         = new SearchClient(client);
     Episodes       = new EpisodesClient(client);
     Updates        = new UpdatesClient(client);
     Languages      = new LanguagesClient(client);
     Users          = new UsersClient(client);
     Authentication = new AuthenticationClient(client, tokenAccessor, options);
 }
Ejemplo n.º 2
0
        public TVDBClient(
            HttpClient client, IOptions <TVDBClientOptions> options, TVDBContext context)
        {
            if (!options.Value.ShareContextBetweenClients)
            {
                // If we don't want to share the context, we are creating one just for this client
                context = new TVDBContext();
            }

            Series         = new SeriesClient(client, options, context);
            Search         = new SearchClient(client, options, context);
            Episodes       = new EpisodesClient(client, options, context);
            Updates        = new UpdatesClient(client, options, context);
            Languages      = new LanguagesClient(client, options, context);
            Users          = new UsersClient(client, options, context);
            Authentication = new AuthenticationClient(client, options, context);
        }