Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Geezeo/gzo

Repository files navigation

Build Status Code Climate Coverage Status Dependency Status

Geezeo

A simple Ruby wrapper for the Geezeo API

Installation

Add this line to your application's Gemfile:

gem "geezeo"

And then execute:

$ bundle install

Or install it yourself as:

$ gem install geezeo

Usage

client = Geezeo.client("my-api-key", "my-user-id")

# For more methods read through spec/functional or generate the yard doc
client.accounts             # return all accounts
client.accounts.find(123)   # return account 123
client.user                 # return current user

Alternately you can set up local credentials using a configure block inside a file named ~/.geezeo/credentials.rb

Geezeo.configure do |config|
  config.api_key = "abc123"
  config.user_id = "testy"
end

Once your local credentials are set up you can instantiate a client with

client = Geezeo.c

You will need local credentials set up if you wish to record VCR cassettes (see below).

Contributing

Credentials

The tests will run without credentials using the included VCR cassettes.

If you wish to record new cassettes please set VCR_RECORD. You may want to delete any cassettes being re-recorded to ensure consistency.

bundle exec rake VCR_RECORD=true

For this to work you must have a ~/.geezeo/credentials.rb file with valid Geezeo API credentials.

Geezeo.configure do |config|
  config.api_key = "abc123"
  config.user_id = "testy"
end

When you are finished recording you must anonymize your cassettes to strip out your real credentials. Running tests without VCR_RECORD set will fail until you do this.

bundle exec rake vcr:anonymize

Pull requests

  1. Fork it
  2. Create your feature branch (git checkout -b feature/my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/my-new-feature)
  5. Create new Pull Request

Releases

No releases published

Packages

No packages published

Languages