Zaikio::Warehouse

This is a Ruby client gem for the Zaikio Warehouse.

Installation

Add to the Gemfile and install by running

$ bundle add zaikio-warehouse

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install zaikio-warehouse

Configuration and Usage

After installation, add an initializer to configure the client:

# maybe config/initializers/zaikio-warehouse.rb

Zaikio::Warehouse.configure do |config|
  config.environment = :sandbox # or :production
end

You will need a valid access token for any calls, zaikio-oauth_client can help you with that. Once you have a token available, you can use Zaikio::Warehouse.with_token:

Zaikio::Warehouse.with_token(access_token) do
  # any API requests will now use the given access token
  warehouse = Warehouse.find(params[:warehouse_id])
  warehouse.name = "#{warehouse.name} with automation"
  warehouse.save
end

The gem uses spyke and mimics some of ActiveRecord's interface, as you can see in the example above.

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the zaikio-warehouse-ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.