Class: Dropio::Drop

Inherits:
Resource show all
Defined in:
lib/dropio/drop.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Dropio::Resource

Instance Attribute Details

#admin_passwordObject

Returns the value of attribute admin_password.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def admin_password
  @admin_password
end

#admin_tokenObject

Returns the value of attribute admin_token.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def admin_token
  @admin_token
end

#conferenceObject

Returns the value of attribute conference.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def conference
  @conference
end

#current_bytesObject

Returns the value of attribute current_bytes.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def current_bytes
  @current_bytes
end

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def email
  @email
end

#expiration_lengthObject

Returns the value of attribute expiration_length.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def expiration_length
  @expiration_length
end

#faxObject

Returns the value of attribute fax.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def fax
  @fax
end

#guest_tokenObject

Returns the value of attribute guest_token.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def guest_token
  @guest_token
end

#guests_can_addObject

Returns the value of attribute guests_can_add.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def guests_can_add
  @guests_can_add
end

#guests_can_commentObject

Returns the value of attribute guests_can_comment.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def guests_can_comment
  @guests_can_comment
end

#guests_can_deleteObject

Returns the value of attribute guests_can_delete.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def guests_can_delete
  @guests_can_delete
end

#hidden_upload_urlObject

Returns the value of attribute hidden_upload_url.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def hidden_upload_url
  @hidden_upload_url
end

#max_bytesObject

Returns the value of attribute max_bytes.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def max_bytes
  @max_bytes
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def name
  @name
end

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def password
  @password
end

#premium_codeObject

Returns the value of attribute premium_code.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def premium_code
  @premium_code
end

#rssObject

Returns the value of attribute rss.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def rss
  @rss
end

#upload_urlObject

Returns the value of attribute upload_url.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def upload_url
  @upload_url
end

#voicemailObject

Returns the value of attribute voicemail.



3
4
5
# File 'lib/dropio/drop.rb', line 3

def voicemail
  @voicemail
end

Class Method Details

.create(attributes = {}) ⇒ Object

Creates a drop with an attributes hash. Valid attributes: name (string), guests_can_comment (boolean), guests_can_add (boolean), guests_can_delete (boolean), expiration_length (string), password (string), admin_password (string), and premium_code (string) Descriptions can be found here: groups.google.com/group/dropio-api/web/full-api-documentation



20
21
22
# File 'lib/dropio/drop.rb', line 20

def self.create(attributes = {})
  Dropio::Client.instance.create_drop(attributes)
end

.find(name, token = nil) ⇒ Object

Finds a drop with name and optional authorization token



13
14
15
# File 'lib/dropio/drop.rb', line 13

def self.find(name, token = nil)
  Dropio::Client.instance.find_drop(name, token)
end

Instance Method Details

#add_file(file_path) ⇒ Object

Adds a file to the Drop given the file_path.



35
36
37
# File 'lib/dropio/drop.rb', line 35

def add_file(file_path)
  Dropio::Client.instance.add_file(self, file_path)
end

#assets(page = 1) ⇒ Object

Gets a list of assets associated with the Drop. Paginated at



8
9
10
# File 'lib/dropio/drop.rb', line 8

def assets(page = 1)
  Dropio::Client.instance.find_assets(self, page)
end

Creates a link with a url, title, and description.



45
46
47
# File 'lib/dropio/drop.rb', line 45

def create_link(url, title = nil, description = nil)
  Dropio::Client.instance.create_link(self, url, title, description)
end

#create_note(title, contents) ⇒ Object

Creates a note with a title and contents



40
41
42
# File 'lib/dropio/drop.rb', line 40

def create_note(title,contents)
  Dropio::Client.instance.create_note(self, title, contents)
end

#destroyObject

Deletes the Drop from the system including all associated assets.



30
31
32
# File 'lib/dropio/drop.rb', line 30

def destroy
  Dropio::Client.instance.destroy_drop(self)
end

#generate_urlObject

Generates an authenticated URL that will bypass any login action.



50
51
52
# File 'lib/dropio/drop.rb', line 50

def generate_url
  Dropio::Client.instance.generate_drop_url(self)
end

#saveObject

Saves the Drop.



25
26
27
# File 'lib/dropio/drop.rb', line 25

def save
  Dropio::Client.instance.save_drop(self)
end