Class: ActiveDiigo::Request
- Inherits:
-
Object
- Object
- ActiveDiigo::Request
- Includes:
- HTTParty
- Defined in:
- lib/active_diigo/request.rb
Constant Summary collapse
- API_VERSION =
'v2'
Instance Method Summary collapse
- #bookmarks(options = {}) ⇒ Object
-
#initialize(uname, password) ⇒ Request
constructor
A new instance of Request.
- #save(options = {}) ⇒ Object
Constructor Details
#initialize(uname, password) ⇒ Request
Returns a new instance of Request.
31 32 33 |
# File 'lib/active_diigo/request.rb', line 31 def initialize(uname, password) self.class.basic_auth uname, password end |
Instance Method Details
#bookmarks(options = {}) ⇒ Object
35 36 37 38 |
# File 'lib/active_diigo/request.rb', line 35 def bookmarks( = {}) .merge!({:key => ActiveDiigo.api_key}) self.class.get('/bookmarks', {:query => }) end |
#save(options = {}) ⇒ Object
40 41 42 43 |
# File 'lib/active_diigo/request.rb', line 40 def save( = {}) .merge!({:key => ActiveDiigo.api_key}) self.class.post('/bookmarks', {:body => }) end |