Class: Auphonic::Account
- Inherits:
-
Object
- Object
- Auphonic::Account
- Defined in:
- lib/gst-kitchen/auphonic/account.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Account
constructor
A new instance of Account.
- #production(uuid) ⇒ Object
- #productions ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Account
Returns a new instance of Account.
9 10 11 12 |
# File 'lib/gst-kitchen/auphonic/account.rb', line 9 def initialize(={}) @username = ["user"] @password = ["pass"] end |
Instance Attribute Details
#password ⇒ Object (readonly)
Returns the value of attribute password.
2 3 4 |
# File 'lib/gst-kitchen/auphonic/account.rb', line 2 def password @password end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
2 3 4 |
# File 'lib/gst-kitchen/auphonic/account.rb', line 2 def username @username end |
Class Method Details
.init_from_system ⇒ Object
4 5 6 7 |
# File 'lib/gst-kitchen/auphonic/account.rb', line 4 def self.init_from_system auphonic_credentials = Yajl::Parser.parse(File.read(File.("~/.auphonic"))) self.new(auphonic_credentials) end |
Instance Method Details
#production(uuid) ⇒ Object
14 15 16 |
# File 'lib/gst-kitchen/auphonic/account.rb', line 14 def production(uuid) Auphonic::Production.new(self, uuid) end |
#productions ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/gst-kitchen/auphonic/account.rb', line 18 def productions request("https://auphonic.com/api/productions.json")["data"].map do || production = Auphonic::Production.new(self) production. = production end end |