Module: Gerry::Api::Accounts
- Included in:
- Client
- Defined in:
- lib/gerry/api/accounts.rb
Instance Method Summary collapse
-
#account_capabilities(options = []) ⇒ Hash
Get the global capabilities that are enabled for the calling user.
-
#account_info(account_id) ⇒ Hash
Get the account info for the specified account ID.
-
#groups_for_account(account_id) ⇒ Enumberable
Get all groups that contain the specified account as a member.
Instance Method Details
#account_capabilities(options = []) ⇒ Hash
Get the global capabilities that are enabled for the calling user.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/gerry/api/accounts.rb', line 17 def account_capabilities( = []) url = '/accounts/self/capabilities' if .empty? return get(url) end = () get("#{url}?#{}") end |
#account_info(account_id) ⇒ Hash
Get the account info for the specified account ID.
8 9 10 11 |
# File 'lib/gerry/api/accounts.rb', line 8 def account_info(account_id) url = "/accounts/#{account_id}" get(url) end |
#groups_for_account(account_id) ⇒ Enumberable
Get all groups that contain the specified account as a member
32 33 34 35 |
# File 'lib/gerry/api/accounts.rb', line 32 def groups_for_account(account_id) url = "/accounts/#{account_id}/groups/" get(url) end |