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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }
        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);
        }