Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.
/ datakick Public archive

Ruby client for Datakick - the open product database

License

Notifications You must be signed in to change notification settings

ankane/datakick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

To get started with development:

git clone https://github.com/ankane/datakick.git
cd datakick
bundle install

About

Ruby client for Datakick - the open product database

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages