insight

package
v8.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgeTile

type AgeTile struct {

	/**
	 * users' age
	 */
	Age AgeTileAGE `json:"age,omitempty"`

	/**
	 * Percentage
	 */
	Percentage float64 `json:"percentage"`
}

type AgeTileAGE

type AgeTileAGE string

AgeTileAGE type

users' age
const (
	AgeTileAGE_FROM0TO14 AgeTileAGE = "from0to14"

	AgeTileAGE_FROM15TO19 AgeTileAGE = "from15to19"

	AgeTileAGE_FROM20TO24 AgeTileAGE = "from20to24"

	AgeTileAGE_FROM25TO29 AgeTileAGE = "from25to29"

	AgeTileAGE_FROM30TO34 AgeTileAGE = "from30to34"

	AgeTileAGE_FROM35TO39 AgeTileAGE = "from35to39"

	AgeTileAGE_FROM40TO44 AgeTileAGE = "from40to44"

	AgeTileAGE_FROM45TO49 AgeTileAGE = "from45to49"

	AgeTileAGE_FROM50 AgeTileAGE = "from50"

	AgeTileAGE_UNKNOWN AgeTileAGE = "unknown"
)

AgeTileAGE constants

type AppTypeTile

type AppTypeTile struct {

	/**
	 * users' OS
	 */
	AppType AppTypeTileAPP_TYPE `json:"appType,omitempty"`

	/**
	 * Percentage
	 */
	Percentage float64 `json:"percentage"`
}

type AppTypeTileAPP_TYPE

type AppTypeTileAPP_TYPE string

AppTypeTileAPP_TYPE type

users' OS
const (
	AppTypeTileAPP_TYPE_IOS AppTypeTileAPP_TYPE = "ios"

	AppTypeTileAPP_TYPE_ANDROID AppTypeTileAPP_TYPE = "android"

	AppTypeTileAPP_TYPE_OTHERS AppTypeTileAPP_TYPE = "others"
)

AppTypeTileAPP_TYPE constants

type AreaTile

type AreaTile struct {

	/**
	 * users' country and region
	 */
	Area string `json:"area,omitempty"`

	/**
	 * Percentage
	 */
	Percentage float64 `json:"percentage"`
}

type ErrorDetail

type ErrorDetail struct {

	/**
	 * Details of the error. Not included in the response under certain situations.
	 */
	Message string `json:"message,omitempty"`

	/**
	 * Location of where the error occurred. Returns the JSON field name or query parameter name of the request. Not included in the response under certain situations.
	 */
	Property string `json:"property,omitempty"`
}

type ErrorResponse

type ErrorResponse struct {

	/**
	 * Message containing information about the error. (Required)
	 */
	Message string `json:"message"`

	/**
	 * An array of error details. If the array is empty, this property will not be included in the response.
	 */
	Details []ErrorDetail `json:"details,omitempty"`
}

ErrorResponse ErrorResponse https://developers.line.biz/en/reference/messaging-api/#error-responses

type GenderTile

type GenderTile struct {

	/**
	 * users' gender
	 */
	Gender GenderTileGENDER `json:"gender,omitempty"`

	/**
	 * Percentage
	 */
	Percentage float64 `json:"percentage"`
}

type GenderTileGENDER

type GenderTileGENDER string

GenderTileGENDER type

users' gender
const (
	GenderTileGENDER_MALE GenderTileGENDER = "male"

	GenderTileGENDER_FEMALE GenderTileGENDER = "female"

	GenderTileGENDER_UNKNOWN GenderTileGENDER = "unknown"
)

GenderTileGENDER constants

type GetFriendsDemographicsResponse

type GetFriendsDemographicsResponse struct {

	/**
	 * true if friend demographic information is available.
	 */
	Available bool `json:"available"`

	/**
	 * Percentage per gender.
	 */
	Genders []GenderTile `json:"genders,omitempty"`

	/**
	 * Percentage per age group.
	 */
	Ages []AgeTile `json:"ages,omitempty"`

	/**
	 * Percentage per area.
	 */
	Areas []AreaTile `json:"areas,omitempty"`

	/**
	 * Percentage by OS.
	 */
	AppTypes []AppTypeTile `json:"appTypes,omitempty"`

	/**
	 * Percentage per friendship duration.
	 */
	SubscriptionPeriods []SubscriptionPeriodTile `json:"subscriptionPeriods,omitempty"`
}

GetFriendsDemographicsResponse Get friend demographics https://developers.line.biz/en/reference/messaging-api/#get-demographic

type GetMessageEventResponse

type GetMessageEventResponse struct {

	/**
	 * Get Overview
	 */
	Overview *GetMessageEventResponseOverview `json:"overview,omitempty"`

	/**
	 * Array of information about individual message bubbles.
	 */
	Messages []GetMessageEventResponseMessage `json:"messages,omitempty"`

	/**
	 * Array of information about opened URLs in the message.
	 */
	Clicks []GetMessageEventResponseClick `json:"clicks,omitempty"`
}

GetMessageEventResponse Statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account. https://developers.line.biz/en/reference/messaging-api/#get-insight-message-event-response

type GetMessageEventResponseClick

type GetMessageEventResponseClick struct {

	/**
	 * The URL's serial number.
	 */
	Seq int32 `json:"seq"`

	/**
	 * URL.
	 */
	Url string `json:"url,omitempty"`

	/**
	 * Number of times the URL was opened.
	 */
	Click int64 `json:"click"`

	/**
	 * Number of users that opened the URL.
	 */
	UniqueClick int64 `json:"uniqueClick"`

	/**
	 * Number of users who opened this url through any link in the message. If a message contains two links to the same URL and a user opens both links, they're counted only once.
	 */
	UniqueClickOfRequest int64 `json:"uniqueClickOfRequest"`
}

type GetMessageEventResponseMessage

type GetMessageEventResponseMessage struct {

	/**
	 * Bubble's serial number.
	 */
	Seq int32 `json:"seq"`

	/**
	 * Number of times the bubble was displayed.
	 */
	Impression int64 `json:"impression"`

	/**
	 * Number of times audio or video in the bubble started playing.
	 */
	MediaPlayed int64 `json:"mediaPlayed"`

	/**
	 * Number of times audio or video in the bubble started playing and was played 25% of the total time.
	 */
	MediaPlayed25Percent int64 `json:"mediaPlayed25Percent"`

	/**
	 * Number of times audio or video in the bubble started playing and was played 50% of the total time.
	 */
	MediaPlayed50Percent int64 `json:"mediaPlayed50Percent"`

	/**
	 * Number of times audio or video in the bubble started playing and was played 75% of the total time.
	 */
	MediaPlayed75Percent int64 `json:"mediaPlayed75Percent"`

	/**
	 * Number of times audio or video in the bubble started playing and was played 100% of the total time.
	 */
	MediaPlayed100Percent int64 `json:"mediaPlayed100Percent"`

	/**
	 * Number of users that started playing audio or video in the bubble.
	 */
	UniqueMediaPlayed int64 `json:"uniqueMediaPlayed"`

	/**
	 * Number of users that started playing audio or video in the bubble and played 25% of the total time.
	 */
	UniqueMediaPlayed25Percent int64 `json:"uniqueMediaPlayed25Percent"`

	/**
	 * Number of users that started playing audio or video in the bubble and played 50% of the total time.
	 */
	UniqueMediaPlayed50Percent int64 `json:"uniqueMediaPlayed50Percent"`

	/**
	 * Number of users that started playing audio or video in the bubble and played 75% of the total time.
	 */
	UniqueMediaPlayed75Percent int64 `json:"uniqueMediaPlayed75Percent"`

	/**
	 * Number of users that started playing audio or video in the bubble and played 100% of the total time.
	 */
	UniqueMediaPlayed100Percent int64 `json:"uniqueMediaPlayed100Percent"`
}

type GetMessageEventResponseOverview

type GetMessageEventResponseOverview struct {

	/**
	 * Request ID.
	 */
	RequestId string `json:"requestId,omitempty"`

	/**
	 * UNIX timestamp for message delivery time in seconds.
	 */
	Timestamp int64 `json:"timestamp"`

	/**
	 * Number of messages delivered. This property shows values of less than 20. However, if all messages have not been sent, it will be null.
	 */
	Delivered int64 `json:"delivered"`

	/**
	 * Number of users who opened the message, meaning they displayed at least 1 bubble.
	 */
	UniqueImpression int64 `json:"uniqueImpression"`

	/**
	 * Number of users who opened any URL in the message.
	 */
	UniqueClick int64 `json:"uniqueClick"`

	/**
	 * Number of users who started playing any video or audio in the message.
	 */
	UniqueMediaPlayed int64 `json:"uniqueMediaPlayed"`

	/**
	 * Number of users who played the entirety of any video or audio in the message.
	 */
	UniqueMediaPlayed100Percent int64 `json:"uniqueMediaPlayed100Percent"`
}

type GetNumberOfFollowersResponse

type GetNumberOfFollowersResponse struct {

	/**
	 * Calculation status.
	 */
	Status GetNumberOfFollowersResponseSTATUS `json:"status,omitempty"`

	/**
	 * The number of times, as of the specified date, that a user added this LINE Official Account as a friend for the first time. The number doesn't decrease even if a user later blocks the account or when they delete their LINE account.
	 */
	Followers int64 `json:"followers"`

	/**
	 * The number of users, as of the specified date, that the LINE Official Account can reach through targeted messages based on gender, age, and/or region. This number only includes users who are active on LINE or LINE services and whose demographics have a high level of certainty.
	 */
	TargetedReaches int64 `json:"targetedReaches"`

	/**
	 * The number of users blocking the account as of the specified date. The number decreases when a user unblocks the account.
	 */
	Blocks int64 `json:"blocks"`
}

GetNumberOfFollowersResponse Get number of followers https://developers.line.biz/en/reference/messaging-api/#get-number-of-followers

type GetNumberOfFollowersResponseSTATUS

type GetNumberOfFollowersResponseSTATUS string

GetNumberOfFollowersResponseSTATUS type

Calculation status.
const (
	GetNumberOfFollowersResponseSTATUS_READY GetNumberOfFollowersResponseSTATUS = "ready"

	GetNumberOfFollowersResponseSTATUS_UNREADY GetNumberOfFollowersResponseSTATUS = "unready"

	GetNumberOfFollowersResponseSTATUS_OUT_OF_SERVICE GetNumberOfFollowersResponseSTATUS = "out_of_service"
)

GetNumberOfFollowersResponseSTATUS constants

type GetNumberOfMessageDeliveriesResponse

type GetNumberOfMessageDeliveriesResponse struct {

	/**
	 * Status of the counting process.
	 */
	Status GetNumberOfMessageDeliveriesResponseSTATUS `json:"status,omitempty"`

	/**
	 * Number of messages sent to all of this LINE Official Account's friends (broadcast messages).
	 */
	Broadcast int64 `json:"broadcast"`

	/**
	 * Number of messages sent to some of this LINE Official Account's friends, based on specific attributes (targeted messages).
	 */
	Targeting int64 `json:"targeting"`

	/**
	 * Number of auto-response messages sent.
	 */
	AutoResponse int64 `json:"autoResponse"`

	/**
	 * Number of greeting messages sent.
	 */
	WelcomeResponse int64 `json:"welcomeResponse"`

	/**
	 * Number of messages sent from LINE Official Account Manager [Chat screen](https://www.linebiz.com/jp/manual/OfficialAccountManager/chats/) (only available in Japanese).
	 */
	Chat int64 `json:"chat"`

	/**
	 * Number of broadcast messages sent with the `Send broadcast message` Messaging API operation.
	 */
	ApiBroadcast int64 `json:"apiBroadcast"`

	/**
	 * Number of push messages sent with the `Send push message` Messaging API operation.
	 */
	ApiPush int64 `json:"apiPush"`

	/**
	 * Number of multicast messages sent with the `Send multicast message` Messaging API operation.
	 */
	ApiMulticast int64 `json:"apiMulticast"`

	/**
	 * Number of narrowcast messages sent with the `Send narrowcast message` Messaging API operation.
	 */
	ApiNarrowcast int64 `json:"apiNarrowcast"`

	/**
	 * Number of replies sent with the `Send reply message` Messaging API operation.
	 */
	ApiReply int64 `json:"apiReply"`
}

GetNumberOfMessageDeliveriesResponse Get number of message deliveries https://developers.line.biz/en/reference/messaging-api/#get-number-of-delivery-messages

type GetNumberOfMessageDeliveriesResponseSTATUS

type GetNumberOfMessageDeliveriesResponseSTATUS string

GetNumberOfMessageDeliveriesResponseSTATUS type

Status of the counting process.
const (
	GetNumberOfMessageDeliveriesResponseSTATUS_READY GetNumberOfMessageDeliveriesResponseSTATUS = "ready"

	GetNumberOfMessageDeliveriesResponseSTATUS_UNREADY GetNumberOfMessageDeliveriesResponseSTATUS = "unready"

	GetNumberOfMessageDeliveriesResponseSTATUS_OUT_OF_SERVICE GetNumberOfMessageDeliveriesResponseSTATUS = "out_of_service"
)

GetNumberOfMessageDeliveriesResponseSTATUS constants

type GetStatisticsPerUnitResponse

type GetStatisticsPerUnitResponse struct {

	/**
	 * Get Overview
	 */
	Overview *GetStatisticsPerUnitResponseOverview `json:"overview"`

	/**
	 * Array of information about individual message bubbles. (Required)
	 */
	Messages []GetStatisticsPerUnitResponseMessage `json:"messages"`

	/**
	 * Array of information about opened URLs in the message. (Required)
	 */
	Clicks []GetStatisticsPerUnitResponseClick `json:"clicks"`
}

GetStatisticsPerUnitResponse Response object for `get statistics per unit` https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit-response

type GetStatisticsPerUnitResponseClick

type GetStatisticsPerUnitResponseClick struct {

	/**
	 * The URL's serial number. (Required)
	 */
	Seq int64 `json:"seq"`

	/**
	 * URL. (Required)
	 */
	Url string `json:"url"`

	/**
	 * Number of times the URL in the bubble was opened.
	 */
	Click int64 `json:"click"`

	/**
	 * Number of users that opened the URL in the bubble.
	 */
	UniqueClick int64 `json:"uniqueClick"`

	/**
	 * Number of users who opened this url through any link in the message. If another message bubble contains the same URL and a user opens both links, it's counted only once.
	 */
	UniqueClickOfRequest int64 `json:"uniqueClickOfRequest"`
}

GetStatisticsPerUnitResponseClick GetStatisticsPerUnitResponseClick https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit-response

type GetStatisticsPerUnitResponseMessage

type GetStatisticsPerUnitResponseMessage struct {

	/**
	 * Bubble's serial number. (Required)
	 */
	Seq int32 `json:"seq"`

	/**
	 * Number of times the bubble was displayed.
	 */
	Impression int64 `json:"impression"`

	/**
	 * Number of times audio or video in the bubble started playing.
	 */
	MediaPlayed int64 `json:"mediaPlayed"`

	/**
	 * Number of times audio or video in the bubble started playing and was played 25% of the total time.
	 */
	MediaPlayed25Percent int64 `json:"mediaPlayed25Percent"`

	/**
	 * Number of times audio or video in the bubble started playing and was played 50% of the total time.
	 */
	MediaPlayed50Percent int64 `json:"mediaPlayed50Percent"`

	/**
	 * Number of times audio or video in the bubble started playing and was played 75% of the total time.
	 */
	MediaPlayed75Percent int64 `json:"mediaPlayed75Percent"`

	/**
	 * Number of times audio or video in the bubble started playing and was played 100% of the total time.
	 */
	MediaPlayed100Percent int64 `json:"mediaPlayed100Percent"`

	/**
	 * Number of users the bubble was displayed.
	 */
	UniqueImpression int64 `json:"uniqueImpression"`

	/**
	 * Number of users that started playing audio or video in the bubble.
	 */
	UniqueMediaPlayed int64 `json:"uniqueMediaPlayed"`

	/**
	 * Number of users that started playing audio or video in the bubble and played 25% of the total time.
	 */
	UniqueMediaPlayed25Percent int64 `json:"uniqueMediaPlayed25Percent"`

	/**
	 * Number of users that started playing audio or video in the bubble and played 50% of the total time.
	 */
	UniqueMediaPlayed50Percent int64 `json:"uniqueMediaPlayed50Percent"`

	/**
	 * Number of users that started playing audio or video in the bubble and played 75% of the total time.
	 */
	UniqueMediaPlayed75Percent int64 `json:"uniqueMediaPlayed75Percent"`

	/**
	 * Number of users that started playing audio or video in the bubble and played 100% of the total time.
	 */
	UniqueMediaPlayed100Percent int64 `json:"uniqueMediaPlayed100Percent"`
}

GetStatisticsPerUnitResponseMessage GetStatisticsPerUnitResponseMessage https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit-response

type GetStatisticsPerUnitResponseOverview

type GetStatisticsPerUnitResponseOverview struct {

	/**
	 * Number of users who opened the message, meaning they displayed at least 1 bubble.
	 */
	UniqueImpression int64 `json:"uniqueImpression"`

	/**
	 * Number of users who opened any URL in the message.
	 */
	UniqueClick int64 `json:"uniqueClick"`

	/**
	 * Number of users who started playing any video or audio in the message.
	 */
	UniqueMediaPlayed int64 `json:"uniqueMediaPlayed"`

	/**
	 * Number of users who played the entirety of any video or audio in the message.
	 */
	UniqueMediaPlayed100Percent int64 `json:"uniqueMediaPlayed100Percent"`
}

GetStatisticsPerUnitResponseOverview Statistics related to messages. https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit-response

type InsightAPI

type InsightAPI struct {
	// contains filtered or unexported fields
}

func NewInsightAPI

func NewInsightAPI(channelToken string, options ...InsightAPIOption) (*InsightAPI, error)

New returns a new bot client instance.

func (*InsightAPI) Do

func (client *InsightAPI) Do(req *http.Request) (*http.Response, error)

func (*InsightAPI) Url

func (client *InsightAPI) Url(endpointPath string) string

func (*InsightAPI) WithContext

func (call *InsightAPI) WithContext(ctx context.Context) *InsightAPI

WithContext method

type InsightAPIOption

type InsightAPIOption func(*InsightAPI) error

InsightAPIOption type

func WithEndpoint

func WithEndpoint(endpoint string) InsightAPIOption

WithEndpointClient function

func WithHTTPClient

func WithHTTPClient(c *http.Client) InsightAPIOption

WithHTTPClient function

type SubscriptionPeriodTile

type SubscriptionPeriodTile struct {

	/**
	 * Subscription period. Possible values: `within7days`, `within90days`, `unknown` etc.
	 */
	SubscriptionPeriod SubscriptionPeriodTileSUBSCRIPTION_PERIOD `json:"subscriptionPeriod,omitempty"`

	/**
	 * Percentage. Possible values: [0.0,100.0] e.g. 0, 2.9, 37.6.
	 */
	Percentage float64 `json:"percentage"`
}

type SubscriptionPeriodTileSUBSCRIPTION_PERIOD

type SubscriptionPeriodTileSUBSCRIPTION_PERIOD string

SubscriptionPeriodTileSUBSCRIPTION_PERIOD type

Subscription period. Possible values: `within7days`, `within90days`, `unknown` etc.
const (
	SubscriptionPeriodTileSUBSCRIPTION_PERIOD_WITHIN7DAYS SubscriptionPeriodTileSUBSCRIPTION_PERIOD = "within7days"

	SubscriptionPeriodTileSUBSCRIPTION_PERIOD_WITHIN30DAYS SubscriptionPeriodTileSUBSCRIPTION_PERIOD = "within30days"

	SubscriptionPeriodTileSUBSCRIPTION_PERIOD_WITHIN90DAYS SubscriptionPeriodTileSUBSCRIPTION_PERIOD = "within90days"

	SubscriptionPeriodTileSUBSCRIPTION_PERIOD_WITHIN180DAYS SubscriptionPeriodTileSUBSCRIPTION_PERIOD = "within180days"

	SubscriptionPeriodTileSUBSCRIPTION_PERIOD_WITHIN365DAYS SubscriptionPeriodTileSUBSCRIPTION_PERIOD = "within365days"

	SubscriptionPeriodTileSUBSCRIPTION_PERIOD_OVER365DAYS SubscriptionPeriodTileSUBSCRIPTION_PERIOD = "over365days"

	SubscriptionPeriodTileSUBSCRIPTION_PERIOD_UNKNOWN SubscriptionPeriodTileSUBSCRIPTION_PERIOD = "unknown"
)

SubscriptionPeriodTileSUBSCRIPTION_PERIOD constants

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL