Class: Guestlist::Github
- Inherits:
-
Object
- Object
- Guestlist::Github
- Defined in:
- lib/guestlist/github.rb
Defined Under Namespace
Classes: StatusError
Class Method Summary collapse
Class Method Details
.fetch(login, token) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/guestlist/github.rb', line 8 def self.fetch(login, token) response = HTTParty.post( "http://github.com/api/v2/json/user/show/#{login}", { :query => { :login => login, :token => token } } ) case response.code when 200; response when 401; false else; raise StatusError, response.code end end |