Project

yo_client

0.0
No commit activity in last 3 years
No release in over 3 years
Yo (http://www.justyo.co/) Ruby Client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
> 3.0.0

Runtime

 Project Readme

YoClient

is a Ruby client of Yo. Build Status

Requirements

Installation

Add this line to your application's Gemfile:

gem 'yo_client'

And then execute:

$ bundle install

Usage

client = YoClient::Client.new(API_TOKEN)

# Yo all subscribers
client.yoall

# Yo all subscribers with a link (added from v0.1.0)
client.yoall(link: 'http://youcune.com/')

# Yo the specific user
# Note that USERNAME will be upcased before sending to API
client.yo(USERNAME)

# Yo the specific user with a link (added from v0.1.0)
client.yo(USERNAME, link: 'http://youcune.com/')

# Count Total Subscribers
client.subscribers_count # -> 5

Error Handling

  • YoClient::ConnectionError is risen if the connection has failed.
  • YoClient::ClientError is risen if the connection has succeeded but API returned error.

At the date of 13th July, even if API results in failure, it sometimes behaves as if it succeed. In this case, YoClient cannot tell succeeded or not.

Yo the developer

Yo YOUCUNE, the developer of YoClient, if you ...

  • like YoClient
  • dislike YoClient
  • have any ideas about YoClient

Thanks.

Contributing

  1. Fork it ( https://github.com/youcune/yo_client/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