Project

yo4r

0.0
No commit activity in last 3 years
No release in over 3 years
A Ruby interface to the Yo API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
>= 0
~> 3.0.0

Runtime

~> 0.9.0
 Project Readme

yo4r

Gem Version Dependency Status Stories in Ready

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

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