InsightApiClient
Contains all the endpoints needed to manage insights.
Constructors
Constructor
new InsightApiClient():
InsightApiClient
Returns
InsightApiClient
Methods
getBestContributionInsight()
staticgetBestContributionInsight(params?,config?):Promise<SCPaginatedResponse<SCContributionInsightType>>
This endpoint retrieves the best contribution insights list.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| params? | InsightContributionParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCContributionInsightType>>
getBestEmbedInsight()
staticgetBestEmbedInsight(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 | 
Returns
Promise<SCPaginatedResponse<SCEmbedInsightType>>
getBestUsersInsight()
staticgetBestUsersInsight(params?,config?):Promise<SCPaginatedResponse<SCUsersInsightType>>
This endpoint retrieves the best users insights list.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| params? | InsightUserParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCUsersInsightType>>
getContributionsInsightCounters()
staticgetContributionsInsightCounters(id,config?):Promise<SCContributionInsightCountersType>
This endpoint retrieves a specific contribution's insight counters.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| id | string|number | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCContributionInsightCountersType>
getEmbedsInsightCounters()
staticgetEmbedsInsightCounters(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 | 
Returns
Promise<SCEmbedInsightCountersType>
getUsersInsightCounters()
staticgetUsersInsightCounters(id,config?):Promise<SCUsersInsightCountersType>
This endpoint retrieves a specific user's insight counters.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| id | string|number | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCUsersInsightCountersType>