Class: ActiveDiigo::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/active_diigo/base.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Base

Returns a new instance of Base.



29
30
31
# File 'lib/active_diigo/base.rb', line 29

def initialize(options)
  build_self(options)
end

Class Attribute Details

.requestObject (readonly)

Returns the value of attribute request.



26
27
28
# File 'lib/active_diigo/base.rb', line 26

def request
  @request
end

Instance Attribute Details

#annotationsObject

Returns the value of attribute annotations.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def annotations
  @annotations
end

#commentsObject

Returns the value of attribute comments.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def comments
  @comments
end

#created_atObject

Returns the value of attribute created_at.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def created_at
  @created_at
end

#descObject

Returns the value of attribute desc.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def desc
  @desc
end

#readlaterObject

Returns the value of attribute readlater.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def readlater
  @readlater
end

#sharedObject

Returns the value of attribute shared.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def shared
  @shared
end

#tagsObject

Returns the value of attribute tags.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def tags
  @tags
end

#titleObject

Returns the value of attribute title.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def title
  @title
end

#updated_atObject

Returns the value of attribute updated_at.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def url
  @url
end

#userObject

Returns the value of attribute user.



27
28
29
# File 'lib/active_diigo/base.rb', line 27

def user
  @user
end

Class Method Details

.find(user, options = {}) ⇒ Object



33
34
35
36
# File 'lib/active_diigo/base.rb', line 33

def self.find(user, options = {})
  options.merge!({:user => user})
  ResponseObject.new(connection.bookmarks(options), self).parsed_objects
end

.save(title, url, options = {}) ⇒ Object



38
39
40
41
# File 'lib/active_diigo/base.rb', line 38

def self.save(title, url, options = {})
  options.merge!({:title => title, :url => url})
  connection.save(options)
end