2018-08-26 07:03:33 +02:00
|
|
|
import { basename, auth } from './utils'
|
|
|
|
import { get, paramsString, DEFAULT_TIMEOUT } from '../_utils/ajax'
|
|
|
|
|
|
|
|
export async function getRelationship (instanceName, accessToken, accountId) {
|
2018-08-30 06:42:57 +02:00
|
|
|
let url = `${basename(instanceName)}/api/v1/accounts/relationships?${paramsString({ id: accountId })}`
|
|
|
|
let res = await get(url, auth(accessToken), { timeout: DEFAULT_TIMEOUT })
|
2018-08-26 07:03:33 +02:00
|
|
|
return res[0]
|
|
|
|
}
|