Module: Posterous::Connection
- Included in:
- User
- Defined in:
- lib/posterous_api/connection.rb
Instance Method Summary collapse
- #delete(uri, klass = HTTParty) ⇒ Object
- #get(uri, options = {}) ⇒ Object
- #post(uri, options = {}) ⇒ Object
- #put(uri, options) ⇒ Object
Instance Method Details
#delete(uri, klass = HTTParty) ⇒ Object
19 20 21 22 |
# File 'lib/posterous_api/connection.rb', line 19 def delete(uri, klass=HTTParty) klass = [:klass] || HTTParty klass.delete(uri, :basic_auth => credentials) end |
#get(uri, options = {}) ⇒ Object
4 5 6 7 |
# File 'lib/posterous_api/connection.rb', line 4 def get(uri, ={}) klass = [:klass] || HTTParty klass.get(uri, { :basic_auth => credentials }.merge()) end |
#post(uri, options = {}) ⇒ Object
9 10 11 12 |
# File 'lib/posterous_api/connection.rb', line 9 def post(uri, ={}) klass = [:klass] || HTTParty klass.post(uri, {:basic_auth => credentials}.merge()) end |
#put(uri, options) ⇒ Object
14 15 16 17 |
# File 'lib/posterous_api/connection.rb', line 14 def put(uri, ) klass = [:klass] || HTTParty klass.put(uri, :basic_auth => credentials) end |