Ejemplo n.º 1
0
        public BreweryDbClient(string key)
        {
            ApplicationKey = key;

            Beers = new BeerResource<Beer>(this);
            Breweries = new BreweryResource<Brewery>(this);
            Categories = new CategoryResource<Category>(this);
            Adjuncts = new AdjunctResource<Adjunct>(this);
            Yeasts = new YeastResource<Yeast>(this);
            SocialSites = new SocialSiteResource<SocialSite>(this);
            Events = new EventResource<Event>(this);
            Features = new FeatureResource<Feature>(this);
            Guildes = new GuildResource<Guild>(this);
            Fermentables = new FermentableResource<Fermentable>(this);
            FluidSizes = new FluidSizeResource<FluidSize>(this);
            Changes = new ChangeResource<Change>(this);
        }
Ejemplo n.º 2
0
        public BreweryDbClient(string key, Func <HttpClient> httpClientFactory = null)
        {
            ApplicationKey = key;

            if (httpClientFactory != null)
            {
                JsonDownloader.HttpClientFactory = httpClientFactory;
            }

            Beers        = new BeerResource <Beer>(this);
            Breweries    = new BreweryResource <Brewery>(this);
            Categories   = new CategoryResource <Category>(this);
            Adjuncts     = new AdjunctResource <Adjunct>(this);
            Yeasts       = new YeastResource <Yeast>(this);
            SocialSites  = new SocialSiteResource <SocialSite>(this);
            Events       = new EventResource <Event>(this);
            Features     = new FeatureResource <Feature>(this);
            Guildes      = new GuildResource <Guild>(this);
            Fermentables = new FermentableResource <Fermentable>(this);
            FluidSizes   = new FluidSizeResource <FluidSize>(this);
            Changes      = new ChangeResource <Change>(this);
        }