コード例 #1
0
        public static IEnumerable <Strain> LookupStrain(string query)
        {
            var urlGenerator = new UrlGenerator();

            urlGenerator.GenerateCannabisReportsUrl(PrimaryObjectType.Strain, query);

            IEnumerable <Strain> strains = DataRequester.GetObjects <Strain>(urlGenerator.URL);

            return(strains);
        }
コード例 #2
0
        public static Dispensary GetDispensary(string state, string city, string slug)
        {
            var urlGenerator = new UrlGenerator();

            urlGenerator.GenerateCannabisReportsUrl(state, city, slug);

            Dispensary dispensary = DataRequester.GetObject <Dispensary>(urlGenerator.URL);

            return(dispensary);
        }
コード例 #3
0
        public static SeedCompany GetStrainSeedCompany(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Strain);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.SeedCompany);

            SeedCompany seedCompany = DataRequester.GetObject <SeedCompany>(urlGenerator.URL);

            return(seedCompany);
        }
コード例 #4
0
        public static Edible GetEdible(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Edible);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject);

            Edible edible = DataRequester.GetObject <Edible>(urlGenerator.URL);

            return(edible);
        }
コード例 #5
0
        public static IEnumerable <Product> GetProducerProducts(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Producer);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.Product);

            IEnumerable <Product> products = DataRequester.GetObjects <Product>(urlGenerator.URL);

            return(products);
        }
コード例 #6
0
        public static IEnumerable <Strain> GetStrainGenetics(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Strain);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.Genetics);

            IEnumerable <Strain> strains = DataRequester.GetObjects <Strain>(urlGenerator.URL);

            return(strains);
        }
コード例 #7
0
        public static Flower GetFlower(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Flower);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject);

            Flower flower = DataRequester.GetObject <Flower>(urlGenerator.URL);

            return(flower);
        }
コード例 #8
0
        public static Strain GetExtractStrain(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Extract);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.Strain);

            Strain strain = DataRequester.GetObject <Strain>(urlGenerator.URL);

            return(strain);
        }
コード例 #9
0
        public static Product GetProduct(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Product);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject);

            Product product = DataRequester.GetObject <Product>(urlGenerator.URL);

            return(product);
        }
コード例 #10
0
        public static User GetFlowerUser(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Flower);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.User);

            User user = DataRequester.GetObject <User>(urlGenerator.URL);

            return(user);
        }
コード例 #11
0
        public static Producer GetExtractProducer(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Extract);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.Producer);

            Producer producer = DataRequester.GetObject <Producer>(urlGenerator.URL);

            return(producer);
        }
コード例 #12
0
        public static EffectsAndFlavors GetExtractEffectsFlavors(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Extract);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.EffectsAndFlavors);

            EffectsAndFlavors effectsAndFlavors = DataRequester.GetObject <EffectsAndFlavors>(urlGenerator.URL);

            return(effectsAndFlavors);
        }
コード例 #13
0
        public static Extract GetExtract(string ucpc)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Extract);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject);

            Extract extract = DataRequester.GetObject <Extract>(urlGenerator.URL);

            return(extract);
        }
コード例 #14
0
        public static IEnumerable <Extract> GetExtracts(int pageNumber = 0, SortOption sortingOption = SortOption.Unassigned)
        {
            var urlGenerator = new UrlGenerator();

            urlGenerator.GenerateCannabisReportsUrl(PrimaryObjectType.Extract);

            urlGenerator.AddQueryParameters(pageNumber, sortingOption);//ADD SORTING/PAGE OPTIONS

            IEnumerable <Extract> extracts = DataRequester.GetObjects <Extract>(urlGenerator.URL);

            return(extracts);
        }
コード例 #15
0
        public static IEnumerable <Review> GetExtractReviews(string ucpc, int pageNumber = 0)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Extract);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.Review);
            urlGenerator.AddQueryParameters(pageNumber);

            IEnumerable <Review> reviews = DataRequester.GetObjects <Review>(urlGenerator.URL);

            return(reviews);
        }
コード例 #16
0
        public static IEnumerable <Extract> GetExtractByType(SecondaryObjectType type, int pageNumber = 0, SortOption sortingOption = SortOption.Unassigned)
        {
            var urlGenerator = new UrlGenerator();

            urlGenerator.GenerateCannabisReportsUrl(PrimaryObjectType.Extract, type);

            urlGenerator.AddQueryParameters(pageNumber, sortingOption);

            IEnumerable <Extract> extracts = DataRequester.GetObjects <Extract>(urlGenerator.URL);

            return(extracts);
        }
コード例 #17
0
        public static IEnumerable <Strain> GetSeedCompanyStrains(string ucpc, int pageNumber = 0)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.SeedCompany);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.Strain, isPlural: true);
            urlGenerator.AddQueryParameters(pageNumber);

            IEnumerable <Strain> reviews = DataRequester.GetObjects <Strain>(urlGenerator.URL);

            return(reviews);
        }
コード例 #18
0
        public static IEnumerable <MenuItem> GetDispensaryProductMenuItems(string state, string city, string slug, int pageNumber = 0, SortOption sortingOption = SortOption.Unassigned)
        {
            var urlGenerator = new UrlGenerator();

            urlGenerator.GenerateCannabisReportsUrl(state, city, slug, PrimaryObjectType.Product);

            urlGenerator.AddQueryParameters(pageNumber, sortingOption);//ADD SORTING/PAGE OPTIONS

            IEnumerable <MenuItem> menuItems = DataRequester.GetObjects <MenuItem>(urlGenerator.URL);

            return(menuItems);
        }
コード例 #19
0
        public static IEnumerable <Strain> GetStrainChildren(string ucpc, int pageNumber = 0)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Strain);

            urlGenerator.GenerateCannabisReportsUrl(ucpcObject, SecondaryObjectType.Children);
            urlGenerator.AddQueryParameters(pageNumber);

            IEnumerable <Strain> strains = DataRequester.GetObjects <Strain>(urlGenerator.URL);

            return(strains);
        }
コード例 #20
0
        public static IEnumerable <MenuItemSummary> GetExtractAvailability(string ucpc, decimal latitude, decimal longitude, int radiusInMiles, int pageNumber = 0)
        {
            var urlGenerator = new UrlGenerator();
            var ucpcObject   = new UCPC(ucpc, PrimaryObjectType.Extract);

            urlGenerator.GenerateCannabisReportsUrl
            (
                ucpcObject,
                latitude,
                longitude,
                radiusInMiles
            );
            urlGenerator.AddQueryParameters(pageNumber);

            IEnumerable <MenuItemSummary> menuItemSummaries = DataRequester.GetObjects <MenuItemSummary>(urlGenerator.URL);

            return(menuItemSummaries);
        }