Class: GrowViral::Keystore::Client
- Inherits:
-
Object
- Object
- GrowViral::Keystore::Client
- Defined in:
- lib/keystore/client.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #account_exists?(app_id, handle) ⇒ Boolean
- #create_account(app_id, handle, uid, token, secret) ⇒ Object
- #fetch_account(app_id, handle) ⇒ Object
- #fetch_application(provider, name) ⇒ Object
-
#initialize(env) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(env) ⇒ Client
Returns a new instance of Client.
6 7 8 |
# File 'lib/keystore/client.rb', line 6 def initialize(env) @config = Configuration.new(env) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/keystore/client.rb', line 5 def config @config end |
Instance Method Details
#account_exists?(app_id, handle) ⇒ Boolean
14 15 16 |
# File 'lib/keystore/client.rb', line 14 def account_exists?(app_id, handle) AccountFetcher.exists?(app_id, handle, config: config) end |
#create_account(app_id, handle, uid, token, secret) ⇒ Object
22 23 24 |
# File 'lib/keystore/client.rb', line 22 def create_account(app_id, handle, uid, token, secret) AccountCreator.create(app_id, handle, uid, token, secret, config: config) end |
#fetch_account(app_id, handle) ⇒ Object
18 19 20 |
# File 'lib/keystore/client.rb', line 18 def fetch_account(app_id, handle) AccountFetcher.fetch(app_id, handle, config: config) end |
#fetch_application(provider, name) ⇒ Object
10 11 12 |
# File 'lib/keystore/client.rb', line 10 def fetch_application(provider, name) ApplicationFetcher.fetch(provider, name, config: config) end |