Skip to content

@line/bot-sdkDocs


@line/bot-sdk / insight / InsightClient

Class: InsightClient

Constructors

new InsightClient()

new InsightClient(config): InsightClient

Parameters

config: httpClientConfig

Returns

InsightClient

Defined in

lib/insight/api/insightClient.ts:41

Methods

getFriendsDemographics()

getFriendsDemographics(): Promise<GetFriendsDemographicsResponse>

Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID).

Returns

Promise<GetFriendsDemographicsResponse>

See

Documentation

Defined in

lib/insight/api/insightClient.ts:69


getFriendsDemographicsWithHttpInfo()

getFriendsDemographicsWithHttpInfo(): Promise<ApiResponseType<GetFriendsDemographicsResponse>>

Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID). . This method includes HttpInfo object to return additional information.

Returns

Promise<ApiResponseType<GetFriendsDemographicsResponse>>

See

Documentation

Defined in

lib/insight/api/insightClient.ts:79


getMessageEvent()

getMessageEvent(requestId): Promise<GetMessageEventResponse>

Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account.

Parameters

requestId: string

Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID.

Returns

Promise<GetMessageEventResponse>

Summary

Get user interaction statistics

See

Get user interaction statistics Documentation

Defined in

lib/insight/api/insightClient.ts:94


getMessageEventWithHttpInfo()

getMessageEventWithHttpInfo(requestId): Promise<ApiResponseType<GetMessageEventResponse>>

Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. . This method includes HttpInfo object to return additional information.

Parameters

requestId: string

Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID.

Returns

Promise<ApiResponseType<GetMessageEventResponse>>

Summary

Get user interaction statistics

See

Get user interaction statistics Documentation

Defined in

lib/insight/api/insightClient.ts:108


getNumberOfFollowers()

getNumberOfFollowers(date?): Promise<GetNumberOfFollowersResponse>

Returns the number of users who have added the LINE Official Account on or before a specified date.

Parameters

date?: string

Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns

Promise<GetNumberOfFollowersResponse>

Summary

Get number of followers

See

Get number of followers Documentation

Defined in

lib/insight/api/insightClient.ts:135


getNumberOfFollowersWithHttpInfo()

getNumberOfFollowersWithHttpInfo(date?): Promise<ApiResponseType<GetNumberOfFollowersResponse>>

Returns the number of users who have added the LINE Official Account on or before a specified date. . This method includes HttpInfo object to return additional information.

Parameters

date?: string

Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9

Returns

Promise<ApiResponseType<GetNumberOfFollowersResponse>>

Summary

Get number of followers

See

Get number of followers Documentation

Defined in

lib/insight/api/insightClient.ts:149


getNumberOfMessageDeliveries()

getNumberOfMessageDeliveries(date): Promise<GetNumberOfMessageDeliveriesResponse>

Returns the number of messages sent from LINE Official Account on a specified day.

Parameters

date: string

Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9

Returns

Promise<GetNumberOfMessageDeliveriesResponse>

Summary

Get number of message deliveries

See

Get number of message deliveries Documentation

Defined in

lib/insight/api/insightClient.ts:176


getNumberOfMessageDeliveriesWithHttpInfo()

getNumberOfMessageDeliveriesWithHttpInfo(date): Promise<ApiResponseType<GetNumberOfMessageDeliveriesResponse>>

Returns the number of messages sent from LINE Official Account on a specified day. . This method includes HttpInfo object to return additional information.

Parameters

date: string

Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9

Returns

Promise<ApiResponseType<GetNumberOfMessageDeliveriesResponse>>

Summary

Get number of message deliveries

See

Get number of message deliveries Documentation

Defined in

lib/insight/api/insightClient.ts:190


getStatisticsPerUnit()

getStatisticsPerUnit(customAggregationUnit, from, to): Promise<GetStatisticsPerUnitResponse>

You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account.

Parameters

customAggregationUnit: string

Name of aggregation unit specified when sending the message. Case-sensitive. For example, Promotion_a and Promotion_A are regarded as different unit names.

from: string

Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9

to: string

End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9

Returns

Promise<GetStatisticsPerUnitResponse>

See

Documentation

Defined in

lib/insight/api/insightClient.ts:218


getStatisticsPerUnitWithHttpInfo()

getStatisticsPerUnitWithHttpInfo(customAggregationUnit, from, to): Promise<ApiResponseType<GetStatisticsPerUnitResponse>>

You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account. . This method includes HttpInfo object to return additional information.

Parameters

customAggregationUnit: string

Name of aggregation unit specified when sending the message. Case-sensitive. For example, Promotion_a and Promotion_A are regarded as different unit names.

from: string

Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9

to: string

End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9

Returns

Promise<ApiResponseType<GetStatisticsPerUnitResponse>>

See

Documentation

Defined in

lib/insight/api/insightClient.ts:241