Class: OmniSocials::Resources::Accounts

Inherits:
Object
  • Object
show all
Defined in:
lib/omnisocials/resources/accounts.rb

Overview

Accounts resource: connected social accounts for the API key's workspace.

Instance Method Summary collapse

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()
  @client.request("GET", "/accounts/#{}")
end

#listObject

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