Class: Twitterland::Cadmus
- Inherits:
-
Object
- Object
- Twitterland::Cadmus
- Includes:
- HTTParty
- Defined in:
- lib/twitterland/cadmus.rb
Class Method Summary (collapse)
Class Method Details
+ (Object) handle_response(response)
13 14 15 16 17 18 19 20 |
# File 'lib/twitterland/cadmus.rb', line 13 def self.handle_response(response) case response.code.to_i when 401 raise Twitterland::Unauthorized.new(response.body) when 500 raise Twitterland::General.new(response.body) end end |
+ (Object) posts(options = {})
7 8 9 10 11 |
# File 'lib/twitterland/cadmus.rb', line 7 def self.posts(={}) response = get("/posts", :query => ) handle_response(response) response.map{|p| Hashie::Mash.new(p)} end |