Class: ActiveDiigo::Request

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/active_diigo/request.rb

Constant Summary collapse

API_VERSION =
'v2'

Instance Method Summary collapse

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(options = {})
  options.merge!({:key => ActiveDiigo.api_key})
  self.class.get('/bookmarks', {:query => options})
end

#save(options = {}) ⇒ Object



40
41
42
43
# File 'lib/active_diigo/request.rb', line 40

def save(options = {})
  options.merge!({:key => ActiveDiigo.api_key})
  self.class.post('/bookmarks', {:body => options})
end