Class: Backup::Notifier::Presently::Client
- Inherits:
-
Object
- Object
- Backup::Notifier::Presently::Client
- Includes:
- HTTParty
- Defined in:
- lib/backup/notifier/presently.rb
Instance Attribute Summary collapse
-
#group_id ⇒ Object
Returns the value of attribute group_id.
-
#password ⇒ Object
Returns the value of attribute password.
-
#subdomain ⇒ Object
Returns the value of attribute subdomain.
-
#user_name ⇒ Object
Returns the value of attribute user_name.
Instance Method Summary collapse
-
#initialize(subdomain, user_name, password, group_id) ⇒ Client
constructor
A new instance of Client.
- #update(message) ⇒ Object
Constructor Details
#initialize(subdomain, user_name, password, group_id) ⇒ Client
Returns a new instance of Client.
68 69 70 71 72 73 74 75 76 |
# File 'lib/backup/notifier/presently.rb', line 68 def initialize(subdomain, user_name, password, group_id) @subdomain = subdomain @user_name = user_name @password = password @group_id = group_id self.class.base_uri "https://#{subdomain}.presently.com" self.class.basic_auth user_name, password end |
Instance Attribute Details
#group_id ⇒ Object
Returns the value of attribute group_id.
66 67 68 |
# File 'lib/backup/notifier/presently.rb', line 66 def group_id @group_id end |
#password ⇒ Object
Returns the value of attribute password.
66 67 68 |
# File 'lib/backup/notifier/presently.rb', line 66 def password @password end |
#subdomain ⇒ Object
Returns the value of attribute subdomain.
66 67 68 |
# File 'lib/backup/notifier/presently.rb', line 66 def subdomain @subdomain end |
#user_name ⇒ Object
Returns the value of attribute user_name.
66 67 68 |
# File 'lib/backup/notifier/presently.rb', line 66 def user_name @user_name end |
Instance Method Details
#update(message) ⇒ Object
78 79 80 81 82 83 84 |
# File 'lib/backup/notifier/presently.rb', line 78 def update() = "d @#{group_id} #{}" if group_id self.class.post "/api/twitter/statuses/update.json", :body => { :status => , :source => "Backup Notifier" } end |