yo4r
A Ruby interface to the Yo API.
Installation
Install the gem with:
gem install yo4r
Usage
First, get an API token at http://developer.justyo.co/
Then:
require 'yo4r'
# create a client
client = Yo::Client.new(api_token: 'your_api_token')
# say Yo to someone
client.yo(username: 'someone')
# say Yo to all subscribers
client.yoall
# count the number of your subscribers
client.subscribers_count # => 42
That's all.
Exceptions
- If
Yo::ClientError
is raised, the API token or username may be invalid. - If
Yo::UnknownError
is raised, the Yo API server may be down.
Contributing
- Fork it ( https://github.com/tanimichi/yo4r/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