Giter Site home page Giter Site logo

metrc's Introduction

Franwell Metrc Ruby Client

Usage

Metrc.configure do |config|
  config.api_key = '...'
  config.user_key = '...'
  config.state = :ca
  config.sandbox = [true|false]
end

client = Metrc::Client.new(debug: true)
client.get(:packages, '1A4FF0300000026000000010')
Metrc API Request debug
client.get('/packages/v1/1A4FF0300000026000000010', {:basic_auth=>{:username=>"...", :password=>"..."}})
########################

Metrc API Response debug
{"Id":4902,"Label":"1A4FF0300000026000000010","PackageType":"Product","SourceHarvestNames":"","RoomId":null,"RoomName":null,"Quantity":2.0000,"UnitOfMeasureName":"Each","UnitOfMeasureAbbreviation":"ea","ProductId":3302,"ProductName":"BK Test Item Kush New","ProductCategoryName":"Capsule/Tablet","PackagedDate":"2018-02-13","InitialLabTestingState":"AwaitingCon[...]
[200 OK]
########################

See ./lib/Metrc/client.rb for implemented endpoints.

Metrc (CA) API Docs https://api-ca.metrc.com/Documentation

License

The gem is available as open source under the terms of the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.