Wodify
Lightweight gem for consuming the Wodify API.
Installation
Add this line to your application’s Gemfile:
ruby
gem 'wodify'
And then execute:
$ bundle
Or install it yourself as:
$ gem install wodify
Usage
Provide the API Key
ruby
Wodify::Requester.setup('api_key')
Retrieve WODs
ruby
wods = Wodify::Wods.all location: 'location',
date: '2014-10-30', program: 'CrossFit'
Other endpoints may be in available in the future. I’m hoping that Wodify comes completely obliterates their current API and comes up with something a little more restful.
Testing
Create a .env file in the project root with the following:
WODIFY_API_KEY=
WODIFY_LOCATION=
WODIFY_PROGRAM=
WODIFY_DATE=
run rake
Disclaimer
The Wodify API is anything but restful… and the returned JSON is less than parsable. This is quick and dirty attempt at a gem.
Contributing
- Fork it ( https://github.com/[my-github-username]/wodify/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request