Skip to content

Ruby client for Brocade.io (forked from Datakick)

License

Notifications You must be signed in to change notification settings

ferrisoxide/brocade_io

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrocadeIo

Ruby client for Brocade.io - a free and open product database

Get Started

Add this line to your application’s Gemfile:

gem 'brocade_io'

Create a client

brocade_io = BrocadeIo.new

Get an item

item = brocade_io.item("013562610020") # or nil if not found
item.gtin14
item.brand_name
item.name
item.size

Create or update an item

brocade_io.update_item("000000000000", {name: "Test"})

List items

brocade_io.items

Returns the first 100 items.

To get all items, use:

brocade_io.paginated_items do |item|
  item.gtin14
end

Search items

brocade_io.items(query: "peanut butter")

Add an image (NB not currently supported)

image = Faraday::UploadIO.new("ice_cream.jpg", "image/jpeg")
image_type = "scan" # or "photo"
brocade_io.add_image("000000000000", image, image_type)

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

About

Ruby client for Brocade.io (forked from Datakick)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%