Zype-CLI
How to install
- Build gem
gem build zype.gemspec
- Install gem
gem install ./zype-1.0.0.gem
How to use
- Open irb
irb
- Require gem
require 'zype'
- Configure gem
For a rails application add the following under: config/initializers/zype.rb
Zype.configure do |config| config.api_key = [your api key] config.host = [host] # default: api.zype-core.com config.port = [port] # default: 3000 config.use_ssl = false # default: false end
- Create a client
Zype::Client.new
- Query zobjects
client.zobjects.all(zobject: 'team')
To Test
-
Go to spec/spec_helper.rb and edit the Zype configurations where you want your tests to query to.
-
Run $ rspec spec
-
API Queries are recorded in spec/support/vcr_cassettes. If you want fresh API queries, delete the Zype directory of yml records and run your tests again!