Class: Pandora::Partner
- Inherits:
-
Object
- Object
- Pandora::Partner
- Includes:
- Client
- Defined in:
- lib/pandora/partner.rb
Instance Attribute Summary collapse
-
#decryption_key ⇒ Object
readonly
Returns the value of attribute decryption_key.
-
#device ⇒ Object
readonly
Returns the value of attribute device.
-
#encryption_key ⇒ Object
readonly
Returns the value of attribute encryption_key.
-
#partner_auth_token ⇒ Object
readonly
Returns the value of attribute partner_auth_token.
-
#partner_id ⇒ Object
readonly
Returns the value of attribute partner_id.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#time_offset ⇒ Object
readonly
Returns the value of attribute time_offset.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(username, password, device, encryption_key, decryption_key) ⇒ Partner
constructor
A new instance of Partner.
- #login_user(username, password) ⇒ Object
- #marshal_dump ⇒ Object
- #marshal_load(objects) ⇒ Object
- #reauthenticate ⇒ Object
Constructor Details
#initialize(username, password, device, encryption_key, decryption_key) ⇒ Partner
Returns a new instance of Partner.
11 12 13 14 15 |
# File 'lib/pandora/partner.rb', line 11 def initialize(username, password, device, encryption_key, decryption_key) @username, @password, @device, @encryption_key, @decryption_key = username, password, device, encryption_key, decryption_key authenticate end |
Instance Attribute Details
#decryption_key ⇒ Object (readonly)
Returns the value of attribute decryption_key.
8 9 10 |
# File 'lib/pandora/partner.rb', line 8 def decryption_key @decryption_key end |
#device ⇒ Object (readonly)
Returns the value of attribute device.
8 9 10 |
# File 'lib/pandora/partner.rb', line 8 def device @device end |
#encryption_key ⇒ Object (readonly)
Returns the value of attribute encryption_key.
8 9 10 |
# File 'lib/pandora/partner.rb', line 8 def encryption_key @encryption_key end |
#partner_auth_token ⇒ Object (readonly)
Returns the value of attribute partner_auth_token.
9 10 11 |
# File 'lib/pandora/partner.rb', line 9 def partner_auth_token @partner_auth_token end |
#partner_id ⇒ Object (readonly)
Returns the value of attribute partner_id.
9 10 11 |
# File 'lib/pandora/partner.rb', line 9 def partner_id @partner_id end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
8 9 10 |
# File 'lib/pandora/partner.rb', line 8 def password @password end |
#time_offset ⇒ Object (readonly)
Returns the value of attribute time_offset.
9 10 11 |
# File 'lib/pandora/partner.rb', line 9 def time_offset @time_offset end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
8 9 10 |
# File 'lib/pandora/partner.rb', line 8 def username @username end |
Instance Method Details
#login_user(username, password) ⇒ Object
21 22 23 |
# File 'lib/pandora/partner.rb', line 21 def login_user(username, password) User.new(self, username, password) end |
#marshal_dump ⇒ Object
25 26 27 28 |
# File 'lib/pandora/partner.rb', line 25 def marshal_dump [@username, @password, @device, @encryption_key, @decryption_key, @partner_id, @partner_auth_token, @time_offset] end |
#marshal_load(objects) ⇒ Object
30 31 32 33 |
# File 'lib/pandora/partner.rb', line 30 def marshal_load(objects) @username, @password, @device, @encryption_key, @decryption_key, @partner_id, @partner_auth_token, @time_offset = objects end |
#reauthenticate ⇒ Object
17 18 19 |
# File 'lib/pandora/partner.rb', line 17 def reauthenticate authenticate end |