npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cannabis-reports

v1.1.9

Published

SDK for Cannabis Reports API

Downloads

17

Readme

Cannabis Reports

A Cannabis Reports API wrapper for Node.js

Build Status

This project uses modern ES2016+ syntax, which means you can use promises (as shown in the documentation) or async/await.

Installation

npm install --save cannabis-reports

Usage

import { Strain, Flower, Extract, Edible, Product, Producer, SeedCompany, Dispensary } from 'cannabis-reports';

Only import the modules you need. For example, if you only need the Strain and Extract modules:

import { Strain, Extract } from 'cannabis-reports';

To set your API Key, set the environment variable CANNABIS_REPORTS_API_KEY. Alternatively, you can set the configuration manually

import { setCannabisReportsKey } from 'cannabis-reports';
setCannabisReportsKey('<your-api-key>')

Strains

Flowers

Extracts

Edibles

Products

Producers

Dispensaries

Seed Companies


options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
    • name - Alphabetically stating with numeric strains. 0-9, A-Z.
    • -name - Alphabetically starting with Z and working back through numeric strains. Z-A, 9-0.
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Strain
  .all(options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
query (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Strain
  .search('orange')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Strain
  .strain('VUJCJ4TYMG000000000000000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Strain
  .strain('VUJCJ4TYMG000000000000000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Strain
  .reviews('VUJCJ4TYMG000000000000000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Strain
  .effectsFlavors('VUJCJ4TYMG000000000000000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Strain
  .seedCompany('VUJCJ4TYMG000000000000000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Strain
  .genetics('VUJCJ4TYMG000000000000000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Strain
  .children('VUJCJ4TYMG000000000000000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
lat (required) - [String] or [Number]
lng (required) - [String] or [Number]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • radius - [Number] Radius to search for in miles, max 25.
Strain
  .availability('VUJCJ4TYMG000000000000000', 37.7749295, -122.4194155, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Flower
  .all(options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
flowerType (required) - [String] (case-insensitive) Possible values:
  • flowers
  • seeds
  • clones
  • shake
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Flower
  .type(flowerType, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Flower
  .flower('AHZ7H4N6467FVUDY3DAY00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Flower
  .user('AHZ7H4N6467FVUDY3DAY00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Flower
  .reviews('AHZ7H4N6467FVUDY3DAY00000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Flower
  .effectsFlavors('AHZ7H4N6467FVUDY3DAY00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Flower
  .producer('AHZ7H4N6467FVUDY3DAY00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Flower
  .strain('AHZ7H4N6467FVUDY3DAY00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
lat (required) - [String] or [Number]
lng (required) - [String] or [Number]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • radius - [Number] Radius to search for in miles, max 25.
Flower
  .availability('AHZ7H4N6467FVUDY3DAY00000', 37.7749295, -122.4194155, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Extract
  .all(options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
extractType (required) - [String] (case-insensitive) Possible values:
  • kief
  • hash
  • water-hash
  • oil
  • wax
  • crumble
  • honeycomb
  • shatter
  • vaporizer-disposable
  • vaporizer-cartridge
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Extract
  .type(extractType, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Extract
  .extract('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Extract
  .user('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Extract
  .reviews('3CV7E33XLHTJT2XZ4GMD00000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Extract
  .effectsFlavors('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Extract
  .producer('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Extract
  .strain('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
lat (required) - [String] or [Number]
lng (required) - [String] or [Number]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • radius - [Number] Radius to search for in miles, max 25.
Extract
  .availability('3CV7E33XLHTJT2XZ4GMD00000', 37.7749295, -122.4194155, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Edible
  .all(options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
edibleType (required) - [String] (case-insensitive) Possible values:
  • baked goods
  • candy
  • treat
  • chocolate
  • snack
  • beverage
  • pill
  • tincture
  • butter
  • honey
  • breath strips
  • tea
  • ice cream
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Edible
  .type(edibleType, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Edible
  .edible('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Edible
  .user('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Edible
  .reviews('3CV7E33XLHTJT2XZ4GMD00000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Edible
  .effectsFlavors('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Edible
  .producer('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Edible
  .strain('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
lat (required) - [String] or [Number]
lng (required) - [String] or [Number]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • radius - [Number] Radius to search for in miles, max 25.
Edible
  .availability('3CV7E33XLHTJT2XZ4GMD00000', 37.7749295, -122.4194155, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Product
  .all(options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
productType (required) - [String] (case-insensitive) Possible values:
  • bath
  • topical
  • skin care
  • pre-roll
  • lip balm
  • massage oil
  • personal lubricant
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Product
  .type(productType, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Product
  .product('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Product
  .user('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Product
  .reviews('3CV7E33XLHTJT2XZ4GMD00000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Product
  .effectsFlavors('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Product
  .producer('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Product
  .strain('3CV7E33XLHTJT2XZ4GMD00000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
lat (required) - [String] or [Number]
lng (required) - [String] or [Number]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • radius - [Number] Radius to search for in miles, max 25.
Product
  .availability('3CV7E33XLHTJT2XZ4GMD00000', 37.7749295, -122.4194155, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
    • name - Alphabetically stating with numeric producers. 0-9, A-Z.
    • -name - Alphabetically starting with Z and working back through numeric producers. Z-A, 9-0.
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Producer
  .all(options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Producer
  .producer('0000000000L6M7E0000000000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
Producer
  .extracts('0000000000L6M7E0000000000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
Producer
  .edibles('0000000000L6M7E0000000000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
Producer
  .products('0000000000L6M7E0000000000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
lat (required) - [String] or [Number]
lng (required) - [String] or [Number]
options (optional) - [Object]
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
  • radius - [Number] Radius to search for in miles, max 25.
Producer
  .availability('0000000000L6M7E0000000000', 37.7749295, -122.4194155, options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
ucpc (required) - [String]
Product
  .seedCompany('VUJCJ00000000000000000000')
  .then(data => console.log(data))
  .catch(err => console.log(err))
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
SeedCompany
  .seedCompany('VUJCJ00000000000000000000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
SeedCompany
  .reviews('VUJCJ00000000000000000000', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
    • name - Alphabetically stating with numeric strains. 0-9, A-Z.
    • -name - Alphabetically starting with Z and working back through numeric strains. Z-A, 9-0.
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Dispensary
  .all(options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
state (required) - [String] Two character state for the dispensary.
city (required) - [String] City the dispensary is in (kebab-case).
slug (required) - [String] Slug for the name of the dispensary.
Dispensary
  .dispensary('ca', 'san-francisco', 'grass-roots')
  .then(data => console.log(data))
  .catch(err => console.log(err))
state (required) - [String] Two character state for the dispensary.
city (required) - [String] City the dispensary is in (kebab-case).
slug (required) - [String] Slug for the name of the dispensary.
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Dispensary
  .strains('ca', 'san-francisco', 'grass-roots', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
state (required) - [String] Two character state for the dispensary.
city (required) - [String] City the dispensary is in (kebab-case).
slug (required) - [String] Slug for the name of the dispensary.
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Dispensary
  .extracts('ca', 'san-francisco', 'grass-roots', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
state (required) - [String] Two character state for the dispensary.
city (required) - [String] City the dispensary is in (kebab-case).
slug (required) - [String] Slug for the name of the dispensary.
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Dispensary
  .edibles('ca', 'san-francisco', 'grass-roots', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))
state (required) - [String] Two character state for the dispensary.
city (required) - [String] City the dispensary is in (kebab-case).
slug (required) - [String] Slug for the name of the dispensary.
options (optional) - [Object]
  • sort - [String] Possible values:
    • createdAt - Oldest records
    • -createdAt - Newest records
    • updatedAt - Oldest updated records
    • -updatedAt - Newest updated records
  • page - [Number] By default, Cannabis Reports will return 10 records at a time for this API call. You can use the page argument to fetch the page of results you want. Check out the pagination section of the documentation for further information.
Dispensary
  .products('ca', 'san-francisco', 'grass-roots', options)
  .then(data => console.log(data))
  .catch(err => console.log(err))