Ruby library for integrating with the Printful API
Add this line to your application's Gemfile:
gem 'printful', :github => 'elbongurk/printful'
And then execute:
$ bundle
You can simply set the configuration
Printful::Configuration.public_key ="YOURPUBLICKEY"
Printful::Configuration.private_key = "YOURPRIVATEKEY"
Fetch all products.
response = Printful::Product.all
if response.success?
resonse.result.each do |product|
puts product.id
end
else
puts response
end
Fetch an order
response = Printful::Order.find(1)
if response.success?
puts response.result.notes
else
puts response
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request