Class: Dropio::Drop
Instance Attribute Summary collapse
-
#admin_email ⇒ Object
Returns the value of attribute admin_email.
-
#admin_password ⇒ Object
Returns the value of attribute admin_password.
-
#admin_token ⇒ Object
Returns the value of attribute admin_token.
-
#asset_count ⇒ Object
Returns the value of attribute asset_count.
-
#chat_password ⇒ Object
Returns the value of attribute chat_password.
-
#conference ⇒ Object
Returns the value of attribute conference.
-
#current_bytes ⇒ Object
Returns the value of attribute current_bytes.
-
#default_view ⇒ Object
Returns the value of attribute default_view.
-
#description ⇒ Object
Returns the value of attribute description.
-
#email ⇒ Object
Returns the value of attribute email.
-
#email_key ⇒ Object
Returns the value of attribute email_key.
-
#expiration_length ⇒ Object
Returns the value of attribute expiration_length.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#fax ⇒ Object
Returns the value of attribute fax.
-
#guest_token ⇒ Object
Returns the value of attribute guest_token.
-
#guests_can_add ⇒ Object
Returns the value of attribute guests_can_add.
-
#guests_can_comment ⇒ Object
Returns the value of attribute guests_can_comment.
-
#guests_can_delete ⇒ Object
Returns the value of attribute guests_can_delete.
-
#hidden_upload_url ⇒ Object
Returns the value of attribute hidden_upload_url.
-
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
-
#name ⇒ Object
Returns the value of attribute name.
-
#password ⇒ Object
Returns the value of attribute password.
-
#premium_code ⇒ Object
Returns the value of attribute premium_code.
-
#rss ⇒ Object
Returns the value of attribute rss.
-
#voicemail ⇒ Object
Returns the value of attribute voicemail.
Class Method Summary collapse
-
.create(attributes = {}) ⇒ Object
Creates a drop with an
attributeshash. -
.find(name, token = nil) ⇒ Object
Finds a drop with
nameand optional authorizationtoken. -
.find_manager_drops(manager_api_token, page = 1) ⇒ Object
Finds all the drops associated with a manager account.
Instance Method Summary collapse
-
#add_file(file_path, description = nil, convert_to = nil, pingback_url = nil, comment = nil) ⇒ Object
Adds a file to the Drop given the
file_path. -
#add_file_from_url(url, description = nil, convert_to = nil, pingback_url = nil) ⇒ Object
Adds a file to the Drop from a given
url. -
#assets(page = 1, order = :oldest) ⇒ Object
Gets a list of assets associated with the Drop.
-
#change_name(new_name) ⇒ Object
Changes the name of a drop.
-
#create_email_subscription(email, message = nil, welcome_message = nil, welcome_subject = nil, welcome_from = nil, events = {}) ⇒ Object
Creates an email Subscription.
-
#create_link(url, title = nil, description = nil) ⇒ Object
Creates a link with a
url,title, anddescription. -
#create_note(contents, title = nil, description = nil) ⇒ Object
Creates a note with a
titleandcontents. -
#create_pingback_subscription(url, events = {}) ⇒ Object
Creates a subscription to receive POSTs from drop.io.
-
#create_twitter_subscription(username, password, message = nil, events = {}) ⇒ Object
Creates a Twitter Subscription.
-
#default_token ⇒ Object
Gets the default token to be used, prefers the admin token.
-
#destroy! ⇒ Object
Deletes the Drop from the system including all associated assets.
-
#empty ⇒ Object
Empties the drop, including it’s assets.
-
#generate_url ⇒ Object
Generates an authenticated URL that will bypass any login action.
-
#promote(nick) ⇒ Object
Promotes a nickname in the drop chat to admin.
-
#save ⇒ Object
Saves the Drop.
-
#subscriptions(page = 1) ⇒ Object
Gets a list of Subscription objects.
-
#upload_code ⇒ Object
Gets the drop’s embeddable uploader code.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Dropio::Resource
Instance Attribute Details
#admin_email ⇒ Object
Returns the value of attribute admin_email.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def admin_email @admin_email end |
#admin_password ⇒ Object
Returns the value of attribute admin_password.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def admin_password @admin_password end |
#admin_token ⇒ Object
Returns the value of attribute admin_token.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def admin_token @admin_token end |
#asset_count ⇒ Object
Returns the value of attribute asset_count.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def asset_count @asset_count end |
#chat_password ⇒ Object
Returns the value of attribute chat_password.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def chat_password @chat_password end |
#conference ⇒ Object
Returns the value of attribute conference.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def conference @conference end |
#current_bytes ⇒ Object
Returns the value of attribute current_bytes.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def current_bytes @current_bytes end |
#default_view ⇒ Object
Returns the value of attribute default_view.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def default_view @default_view end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def description @description end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def email @email end |
#email_key ⇒ Object
Returns the value of attribute email_key.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def email_key @email_key end |
#expiration_length ⇒ Object
Returns the value of attribute expiration_length.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def expiration_length @expiration_length end |
#expires_at ⇒ Object
Returns the value of attribute expires_at.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def expires_at @expires_at end |
#fax ⇒ Object
Returns the value of attribute fax.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def fax @fax end |
#guest_token ⇒ Object
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_add ⇒ Object
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_comment ⇒ Object
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_delete ⇒ Object
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_url ⇒ Object
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_bytes ⇒ Object
Returns the value of attribute max_bytes.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def max_bytes @max_bytes end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def password @password end |
#premium_code ⇒ Object
Returns the value of attribute premium_code.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def premium_code @premium_code end |
#rss ⇒ Object
Returns the value of attribute rss.
3 4 5 |
# File 'lib/dropio/drop.rb', line 3 def rss @rss end |
#voicemail ⇒ Object
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), default_view (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
31 32 33 |
# File 'lib/dropio/drop.rb', line 31 def self.create(attributes = {}) Dropio::Resource.client.create_drop(attributes) end |
Instance Method Details
#add_file(file_path, description = nil, convert_to = nil, pingback_url = nil, comment = nil) ⇒ Object
Adds a file to the Drop given the file_path.
71 72 73 |
# File 'lib/dropio/drop.rb', line 71 def add_file(file_path, description = nil, convert_to = nil, pingback_url = nil, comment = nil) Dropio::Resource.client.add_file(self, file_path, description, convert_to, pingback_url, comment) end |
#add_file_from_url(url, description = nil, convert_to = nil, pingback_url = nil) ⇒ Object
Adds a file to the Drop from a given url
66 67 68 |
# File 'lib/dropio/drop.rb', line 66 def add_file_from_url(url, description = nil, convert_to = nil, pingback_url = nil) Dropio::Resource.client.add_file_from_url(self,url,description, convert_to, pingback_url) end |
#assets(page = 1, order = :oldest) ⇒ Object
Gets a list of assets associated with the Drop. Paginated at
14 15 16 |
# File 'lib/dropio/drop.rb', line 14 def assets(page = 1, order = :oldest) Dropio::Resource.client.assets(self, page, order) end |
#change_name(new_name) ⇒ Object
Changes the name of a drop. Admin token required. Has to be 7 characters or more unless premium.
36 37 38 |
# File 'lib/dropio/drop.rb', line 36 def change_name(new_name) Dropio::Resource.client.change_drop_name(self,new_name) end |
#create_email_subscription(email, message = nil, welcome_message = nil, welcome_subject = nil, welcome_from = nil, events = {}) ⇒ Object
Creates an email Subscription
96 97 98 |
# File 'lib/dropio/drop.rb', line 96 def create_email_subscription(email, = nil, = nil, welcome_subject = nil, welcome_from = nil, events = {}) Dropio::Resource.client.create_email_subscription(self,email,,,welcome_subject,welcome_from, events) end |
#create_link(url, title = nil, description = nil) ⇒ Object
Creates a link with a url, title, and description.
81 82 83 |
# File 'lib/dropio/drop.rb', line 81 def create_link(url, title = nil, description = nil) Dropio::Resource.client.create_link(self, url, title, description) end |
#create_note(contents, title = nil, description = nil) ⇒ Object
Creates a note with a title and contents
76 77 78 |
# File 'lib/dropio/drop.rb', line 76 def create_note(contents, title = nil, description = nil) Dropio::Resource.client.create_note(self, contents, title, description) end |
#create_pingback_subscription(url, events = {}) ⇒ Object
Creates a subscription to receive POSTs from drop.io.
86 87 88 |
# File 'lib/dropio/drop.rb', line 86 def create_pingback_subscription(url, events = {}) Dropio::Resource.client.create_pingback_subscription(self,url,events) end |
#create_twitter_subscription(username, password, message = nil, events = {}) ⇒ Object
Creates a Twitter Subscription
91 92 93 |
# File 'lib/dropio/drop.rb', line 91 def create_twitter_subscription(username,password, = nil, events = {}) Dropio::Resource.client.create_twitter_subscription(self,username,password,,events) end |
#default_token ⇒ Object
Gets the default token to be used, prefers the admin token.
9 10 11 |
# File 'lib/dropio/drop.rb', line 9 def default_token self.admin_token || self.guest_token end |
#destroy! ⇒ Object
Deletes the Drop from the system including all associated assets.
61 62 63 |
# File 'lib/dropio/drop.rb', line 61 def destroy! Dropio::Resource.client.delete_drop(self) end |
#empty ⇒ Object
Empties the drop, including it’s assets.
46 47 48 |
# File 'lib/dropio/drop.rb', line 46 def empty Dropio::Resource.client.empty_drop(self) end |
#generate_url ⇒ Object
Generates an authenticated URL that will bypass any login action.
106 107 108 |
# File 'lib/dropio/drop.rb', line 106 def generate_url Dropio::Resource.client.generate_drop_url(self) end |
#promote(nick) ⇒ Object
Promotes a nickname in the drop chat to admin.
51 52 53 |
# File 'lib/dropio/drop.rb', line 51 def promote(nick) Dropio::Resource.client.promote_nick(self,nick) end |
#save ⇒ Object
Saves the Drop.
56 57 58 |
# File 'lib/dropio/drop.rb', line 56 def save Dropio::Resource.client.update_drop(self) end |