Ruby client for Datakick - the open product database
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib Fixed linter error [skip ci] Aug 8, 2018
test Added host and version options Mar 3, 2014
.gitignore First commit Mar 3, 2014
Gemfile First commit Mar 3, 2014
LICENSE.txt First commit Mar 3, 2014
README.md Updated contributing links Mar 3, 2014
Rakefile First commit Mar 3, 2014
datakick.gemspec First commit Mar 3, 2014

README.md

Datakick

Ruby client for Datakick - the open product database

Get Started

Add this line to your application’s Gemfile:

gem 'datakick'

Create a client

datakick = Datakick.new

Get an item

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

Create or update an item

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

List items

datakick.items

Returns the first 100 items.

To get all items, use:

datakick.paginated_items do |item|
  item.gtin14
end

Search items

datakick.items(query: "peanut butter")

Add an image

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

Contributing

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