Native ruby client to the Flow API (https://api.flow.io)
Please note that this library and APIs are in ALPHA and are subject to change and will break in the future. Once Flow Commerce releases its official 1.0 library, API changes will be backwards compatible. Until then - we are super grateful for your patience as we finalize the API for our launch.
gem install flowcommerce
require 'flowcommerce'
client = FlowCommerce.instance(:token => "<YOUR API TOKEN>")
client.items.get("<YOUR ORGANIZATION ID>", :limit => 5, :offset => 0).each do |i|
puts i.number
end
1. Create a file named ~/.flow/token that contains your API token
and nothing else
2. ruby ./example.rb <org id>
Code for each example is in the examples directory, designed to really highlight the use of key APIs in as clear a way as possible.
Complete API documentation is available at https://docs.flow.io
Please disable IPv6. We are currently working on IPv6 compatibility for the APIs.
If you are seeing very slow (multi-second response times), it might be this: Net::HTTP extremely slow responses for HTTPS requests
The solution is to run
networksetup -setv6off Wi-Fi