InsightApiClient
Contains all the endpoints needed to manage insights.
Constructors
new InsightApiClient()
new InsightApiClient():
InsightApiClient
Returns
Methods
getBestContributionInsight()
static
getBestContributionInsight(params
?,config
?):Promise
<SCPaginatedResponse
<SCContributionInsightType
>>
This endpoint retrieves the best contribution insights list.
Parameters
Parameter | Type | Description |
---|---|---|
params ? | InsightContributionParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCContributionInsightType
>>
Source
getBestEmbedInsight()
static
getBestEmbedInsight(params
?,config
?):Promise
<SCPaginatedResponse
<SCEmbedInsightType
>>
This endpoint retrieves the best embed insights list. The operations of this endpoint is quite complex and returns different result structures based on the parameters passed. For example, pagination (and therefore the use of the offset parameter) is guaranteed only if the metadata and group_by parameter are not passed. If you are passing metadata you MUST pass also group_by. If you pass group_by the result will be not paginated and will contain only user defined custom embeds (not among these: 'sc_link', 'sc_shared_object').
Parameters
Parameter | Type | Description |
---|---|---|
params ? | InsightEmbedParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCEmbedInsightType
>>
Source
getBestUsersInsight()
static
getBestUsersInsight(params
?,config
?):Promise
<SCPaginatedResponse
<SCUsersInsightType
>>
This endpoint retrieves the best users insights list.
Parameters
Parameter | Type | Description |
---|---|---|
params ? | InsightUserParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCUsersInsightType
>>
Source
getContributionsInsightCounters()
static
getContributionsInsightCounters(id
,config
?):Promise
<SCContributionInsightCountersType
>
This endpoint retrieves a specific contribution's insight counters.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCContributionInsightCountersType
>
Source
getEmbedsInsightCounters()
static
getEmbedsInsightCounters(type
,id
,config
?):Promise
<SCEmbedInsightCountersType
>
This endpoint retrieves a specific embed's insight counters.
Parameters
Parameter | Type | Description |
---|---|---|
type | string | |
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCEmbedInsightCountersType
>
Source
getUsersInsightCounters()
static
getUsersInsightCounters(id
,config
?):Promise
<SCUsersInsightCountersType
>
This endpoint retrieves a specific user's insight counters.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCUsersInsightCountersType
>