LINE. Bot. Insight
(line_bot_sdk v0.1.0)
Copy Markdown
API calls for all endpoints tagged Insight.
Summary
Functions
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).
Get user interaction statistics Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account.
Get number of followers Returns the number of users who have added the LINE Official Account on or before a specified date.
Get number of message deliveries Returns the number of messages sent from LINE Official Account on a specified day.
Get rich menu insight daily
Gets rich menu statistics broken down by day for the specified period, for a rich menu created via the Messaging API. Returns the daily impression count for the whole rich menu and the daily click count for each tappable area. When the total number of unique clicks during the period is below the privacy threshold, only richMenuId is returned and the other fields are omitted.
Get rich menu insight summary
Gets a summary of rich menu statistics for the specified period, for a rich menu created via the Messaging API. Returns the total impression count for the whole rich menu and the click count for each tappable area, aggregated over the entire period as a single result. When the total number of unique clicks during the period is below the privacy threshold, only richMenuId is returned and the other fields are omitted.
You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account.
Create a new Insight client.
Functions
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).
Parameters
client(Req.Request.t/0): Client to make request withclient_opts(keyword/0): Options to pass toReq.request
Returns
{:ok, LINE.Bot.Model.GetFriendsDemographicsResponse.t}on success{:error, Req.Response.t}on failure
Get user interaction statistics Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account.
Parameters
client(Req.Request.t/0): Client to make request withrequest_id(String.t/0): Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID.client_opts(keyword/0): Options to pass toReq.request
Returns
{:ok, LINE.Bot.Model.GetMessageEventResponse.t}on success{:error, Req.Response.t}on failure
Get number of followers Returns the number of users who have added the LINE Official Account on or before a specified date.
Parameters
client(Req.Request.t/0): Client to make request withoptional_args(keyword): Optional parameters:date(String.t/0): Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9
client_opts(keyword/0): Options to pass toReq.request
Returns
{:ok, LINE.Bot.Model.GetNumberOfFollowersResponse.t}on success{:error, Req.Response.t}on failure
Get number of message deliveries Returns the number of messages sent from LINE Official Account on a specified day.
Parameters
client(Req.Request.t/0): Client to make request withdate(String.t/0): Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9client_opts(keyword/0): Options to pass toReq.request
Returns
{:ok, LINE.Bot.Model.GetNumberOfMessageDeliveriesResponse.t}on success{:error, Req.Response.t}on failure
You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account.
Parameters
client(Req.Request.t/0): Client to make request withcustom_aggregation_unit(String.t/0): Name of aggregation unit specified when sending the message. Case-sensitive. For example,Promotion_aandPromotion_Aare regarded as different unit names.from(String.t/0): Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9to(String.t/0): 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+9client_opts(keyword/0): Options to pass toReq.request
Returns
{:ok, LINE.Bot.Model.GetStatisticsPerUnitResponse.t}on success{:error, Req.Response.t}on failure
Create a new Insight client.
Options
:base_url- base URL for requests (default:"https://api.line.me"):channel_token(required) - channel access token for Bearer authorization:plug- plug to use for testing (seeReq.new/1)