No commit activity in last 3 years
No release in over 3 years
Crema API Ruby Client Gem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 0.14
>= 0
 Project Readme

Crema API Ruby Client

Gem Version Build Status Test Coverage

Installation

Add this line to your application's Gemfile:

gem 'crema-api-ruby-client'

And then execute:

$ bundle

Add your credentials to config/initializers/crema.rb:

require 'crema'

Crema.configure do |config|
  config.app_id = ENV['CREMA_APP_ID']
  config.secret = ENV['CREMA_SECRET']
end

Crema.config.access_token = Crema::OAuth.token

Usage

client = Crema::Client.new

products = client.fetch_products(brand_id: 108, limit: 3)
products.each do |product|
  puts product.id
  puts product.image_url
  puts product.name
  puts product.final_price
end

product = client.fetch_product(466033, brand_id: 108)
puts product.url

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/ahastudio/crema-api-ruby-client.