Class: OmniSocials::Resources::Accounts
- Inherits:
-
Object
- Object
- OmniSocials::Resources::Accounts
- Defined in:
- lib/omnisocials/resources/accounts.rb
Overview
Accounts resource: connected social accounts for the API key's workspace.
Instance Method Summary collapse
-
#get(account_id) ⇒ Object
GET /accounts/id - fetch a single connected account.
-
#initialize(client) ⇒ Accounts
constructor
A new instance of Accounts.
-
#list ⇒ Object
GET /accounts - list connected social accounts.
Constructor Details
#initialize(client) ⇒ Accounts
Returns a new instance of Accounts.
7 8 9 |
# File 'lib/omnisocials/resources/accounts.rb', line 7 def initialize(client) @client = client end |
Instance Method Details
#get(account_id) ⇒ Object
GET /accounts/id - fetch a single connected account.
20 21 22 |
# File 'lib/omnisocials/resources/accounts.rb', line 20 def get(account_id) @client.request("GET", "/accounts/#{account_id}") end |
#list ⇒ Object
GET /accounts - list connected social accounts.
The response also carries workspace_id and workspace_name for the workspace the API key belongs to.
15 16 17 |
# File 'lib/omnisocials/resources/accounts.rb', line 15 def list @client.request("GET", "/accounts") end |