Class: Rmb::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.
-
#asset_count ⇒ Object
Returns the value of attribute asset_count.
-
#chat_password ⇒ Object
Returns the value of attribute chat_password.
-
#current_bytes ⇒ Object
Returns the value of attribute current_bytes.
-
#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.
-
#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.
Class Method Summary collapse
-
.create(attributes = {}) ⇒ Object
Creates a drop with an
attributes
hash. -
.find(name) ⇒ Object
Finds a drop with
name
. -
.find_all(page = 1) ⇒ Object
Finds all the drops associated with an API account by page.
Instance Method Summary collapse
-
#add_file(file_path, description = nil, convert_to = nil, pingback_url = nil, output_locations = 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_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
title
andcontents
. -
#create_pingback_subscription(url, events = {}) ⇒ Object
Creates a subscription to receive POSTs from rmb.io.
-
#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.
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Rmb::Resource
Instance Attribute Details
#admin_email ⇒ Object
Returns the value of attribute admin_email.
3 4 5 |
# File 'lib/rmb/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/rmb/drop.rb', line 3 def admin_password @admin_password end |
#asset_count ⇒ Object
Returns the value of attribute asset_count.
3 4 5 |
# File 'lib/rmb/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/rmb/drop.rb', line 3 def chat_password @chat_password end |
#current_bytes ⇒ Object
Returns the value of attribute current_bytes.
3 4 5 |
# File 'lib/rmb/drop.rb', line 3 def current_bytes @current_bytes end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/rmb/drop.rb', line 3 def description @description end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/rmb/drop.rb', line 3 def email @email end |
#email_key ⇒ Object
Returns the value of attribute email_key.
3 4 5 |
# File 'lib/rmb/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/rmb/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/rmb/drop.rb', line 3 def expires_at @expires_at end |
#max_bytes ⇒ Object
Returns the value of attribute max_bytes.
3 4 5 |
# File 'lib/rmb/drop.rb', line 3 def max_bytes @max_bytes end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rmb/drop.rb', line 3 def name @name end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/rmb/drop.rb', line 3 def password @password end |
Class Method Details
.create(attributes = {}) ⇒ Object
Creates a drop with an attributes
hash. Valid attributes: name (string), expiration_length (string), password (string), and admin_password (string) Descriptions can be found here: backbonedocs.drop.io/Ruby-API-Client-Library:Drop
25 26 27 |
# File 'lib/rmb/drop.rb', line 25 def self.create(attributes = {}) Rmb::Resource.client.create_drop(attributes) end |
Instance Method Details
#add_file(file_path, description = nil, convert_to = nil, pingback_url = nil, output_locations = nil) ⇒ Object
Adds a file to the Drop given the file_path
.
60 61 62 |
# File 'lib/rmb/drop.rb', line 60 def add_file(file_path, description = nil, convert_to = nil, pingback_url = nil, output_locations = nil) Rmb::Resource.client.add_file(self, file_path, description, convert_to, pingback_url, output_locations) 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
55 56 57 |
# File 'lib/rmb/drop.rb', line 55 def add_file_from_url(url, description = nil, convert_to = nil, pingback_url = nil) Rmb::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
8 9 10 |
# File 'lib/rmb/drop.rb', line 8 def assets(page = 1, order = :oldest) Rmb::Resource.client.assets(self, page, order) end |
#change_name(new_name) ⇒ Object
Changes the name of a drop.
30 31 32 |
# File 'lib/rmb/drop.rb', line 30 def change_name(new_name) Rmb::Resource.client.change_drop_name(self,new_name) end |
#create_link(url, title = nil, description = nil) ⇒ Object
Creates a link with a url
, title
, and description
.
70 71 72 |
# File 'lib/rmb/drop.rb', line 70 def create_link(url, title = nil, description = nil) Rmb::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
65 66 67 |
# File 'lib/rmb/drop.rb', line 65 def create_note(contents, title = nil, description = nil) Rmb::Resource.client.create_note(self, contents, title, description) end |
#create_pingback_subscription(url, events = {}) ⇒ Object
Creates a subscription to receive POSTs from rmb.io.
75 76 77 |
# File 'lib/rmb/drop.rb', line 75 def create_pingback_subscription(url, events = {}) Rmb::Resource.client.create_pingback_subscription(self,url,events) end |
#destroy! ⇒ Object
Deletes the Drop from the system including all associated assets.
50 51 52 |
# File 'lib/rmb/drop.rb', line 50 def destroy! Rmb::Resource.client.delete_drop(self) end |
#empty ⇒ Object
Empties the drop, including it’s assets.
35 36 37 |
# File 'lib/rmb/drop.rb', line 35 def empty Rmb::Resource.client.empty_drop(self) end |
#generate_url ⇒ Object
Generates an authenticated URL that will bypass any login action.
85 86 87 |
# File 'lib/rmb/drop.rb', line 85 def generate_url Rmb::Resource.client.generate_drop_url(self) end |
#promote(nick) ⇒ Object
Promotes a nickname in the drop chat to admin.
40 41 42 |
# File 'lib/rmb/drop.rb', line 40 def promote(nick) Rmb::Resource.client.promote_nick(self,nick) end |