A simple Ruby wrapper for the Geezeo API
Add this line to your application's Gemfile:
gem "geezeo"
And then execute:
$ bundle install
Or install it yourself as:
$ gem install geezeo
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).
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
- Fork it
- Create your feature branch (
git checkout -b feature/my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/my-new-feature
) - Create new Pull Request