line-bot-sdk-go: github.com/line/line-bot-sdk-go/linebot Index | Examples | Files | Directories

package linebot

import "github.com/line/line-bot-sdk-go/linebot"

Index

Examples

Package Files

account_link.go actions.go client.go delivery.go demographic_filter.go emoji.go error.go event.go flex.go flex_unmarshal.go get_content.go get_count.go get_ids.go get_profile.go get_quota.go get_summary.go imagemap.go insight.go leave.go liff.go message.go oauth.go oauth2.go progress.go quick_reply.go recipient.go response.go richmenu.go send_message.go sender.go template.go version.go webhook.go

Constants

const (
    APIEndpointBase     = "https://api.line.me"
    APIEndpointBaseData = "https://api-data.line.me"

    APIEndpointPushMessage                = "/v2/bot/message/push"
    APIEndpointBroadcastMessage           = "/v2/bot/message/broadcast"
    APIEndpointReplyMessage               = "/v2/bot/message/reply"
    APIEndpointMulticast                  = "/v2/bot/message/multicast"
    APIEndpointNarrowcast                 = "/v2/bot/message/narrowcast"
    APIEndpointGetMessageContent          = "/v2/bot/message/%s/content"
    APIEndpointGetMessageQuota            = "/v2/bot/message/quota"
    APIEndpointGetMessageConsumption      = "/v2/bot/message/quota/consumption"
    APIEndpointGetMessageQuotaConsumption = "/v2/bot/message/quota/consumption"
    APIEndpointLeaveGroup                 = "/v2/bot/group/%s/leave"
    APIEndpointLeaveRoom                  = "/v2/bot/room/%s/leave"
    APIEndpointGetProfile                 = "/v2/bot/profile/%s"
    APIEndpointGetGroupMemberProfile      = "/v2/bot/group/%s/member/%s"
    APIEndpointGetRoomMemberProfile       = "/v2/bot/room/%s/member/%s"
    APIEndpointGetGroupMemberIDs          = "/v2/bot/group/%s/members/ids"
    APIEndpointGetRoomMemberIDs           = "/v2/bot/room/%s/members/ids"
    APIEndpointGetGroupMemberCount        = "/v2/bot/group/%s/members/count"
    APIEndpointGetRoomMemberCount         = "/v2/bot/room/%s/members/count"
    APIEndpointGetGroupSummary            = "/v2/bot/group/%s/summary"
    APIEndpointCreateRichMenu             = "/v2/bot/richmenu"
    APIEndpointGetRichMenu                = "/v2/bot/richmenu/%s"
    APIEndpointListRichMenu               = "/v2/bot/richmenu/list"
    APIEndpointDeleteRichMenu             = "/v2/bot/richmenu/%s"
    APIEndpointGetUserRichMenu            = "/v2/bot/user/%s/richmenu"
    APIEndpointLinkUserRichMenu           = "/v2/bot/user/%s/richmenu/%s"
    APIEndpointUnlinkUserRichMenu         = "/v2/bot/user/%s/richmenu"
    APIEndpointSetDefaultRichMenu         = "/v2/bot/user/all/richmenu/%s"
    APIEndpointDefaultRichMenu            = "/v2/bot/user/all/richmenu"   // Get: GET / Delete: DELETE
    APIEndpointDownloadRichMenuImage      = "/v2/bot/richmenu/%s/content" // Download: GET / Upload: POST
    APIEndpointUploadRichMenuImage        = "/v2/bot/richmenu/%s/content" // Download: GET / Upload: POST
    APIEndpointBulkLinkRichMenu           = "/v2/bot/richmenu/bulk/link"
    APIEndpointBulkUnlinkRichMenu         = "/v2/bot/richmenu/bulk/unlink"

    APIEndpointGetAllLIFFApps = "/liff/v1/apps"
    APIEndpointAddLIFFApp     = "/liff/v1/apps"
    APIEndpointUpdateLIFFApp  = "/liff/v1/apps/%s/view"
    APIEndpointDeleteLIFFApp  = "/liff/v1/apps/%s"

    APIEndpointLinkToken = "/v2/bot/user/%s/linkToken"

    APIEndpointGetMessageDelivery = "/v2/bot/message/delivery/%s"
    APIEndpointGetMessageProgress = "/v2/bot/message/progress/%s"
    APIEndpointInsight            = "/v2/bot/insight/%s"

    APIEndpointIssueAccessToken  = "/v2/oauth/accessToken"
    APIEndpointRevokeAccessToken = "/v2/oauth/revoke"

    APIEndpointIssueAccessTokenV2  = "/oauth2/v2.1/token"
    APIEndpointGetAccessTokensV2   = "/oauth2/v2.1/tokens"
    APIEndpointRevokeAccessTokenV2 = "/oauth2/v2.1/revoke"
)

APIEndpoint constants

Variables

var (
    ErrInvalidSignature = errors.New("invalid signature")
)

errors

func IntPtr Uses

func IntPtr(v int) *int

IntPtr is a helper function for using *int values

type APIError Uses

type APIError struct {
    Code     int
    Response *ErrorResponse
}

APIError type

func (*APIError) Error Uses

func (e *APIError) Error() string

Error method

type AccessTokenResponse Uses

type AccessTokenResponse struct {
    AccessToken string `json:"access_token"`
    ExpiresIn   int64  `json:"expires_in"`
    TokenType   string `json:"token_type"`
}

AccessTokenResponse type

type AccessTokensResponse Uses

type AccessTokensResponse struct {
    AccessTokens []string `json:"access_tokens"`
}

AccessTokensResponse type

type AccountLink struct {
    Result AccountLinkResult
    Nonce  string
}

AccountLink type

type AccountLinkResult Uses

type AccountLinkResult string

AccountLinkResult type

const (
    AccountLinkResultOK     AccountLinkResult = "ok"
    AccountLinkResultFailed AccountLinkResult = "failed"
)

AccountLinkResult constants

type Action Uses

type Action interface {
    json.Marshaler
}

Action interface

type ActionType Uses

type ActionType string

ActionType type

const (
    ActionTypeURI            ActionType = "uri"
    ActionTypeMessage        ActionType = "message"
    ActionTypePostback       ActionType = "postback"
    ActionTypeDatetimePicker ActionType = "datetimepicker"
    ActionTypeCamera         ActionType = "camera"
    ActionTypeCameraRoll     ActionType = "cameraRoll"
    ActionTypeLocation       ActionType = "location"
)

ActionType constants

type AddLIFFCall Uses

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

AddLIFFCall type

func (*AddLIFFCall) Do Uses

func (call *AddLIFFCall) Do() (*LIFFIDResponse, error)

Do method

func (*AddLIFFCall) WithContext Uses

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

WithContext method

type AgeDetail Uses

type AgeDetail struct {
    Age        string  `json:"age"`
    Percentage float64 `json:"percentage"`
}

AgeDetail type

type AgeFilter Uses

type AgeFilter struct {
    Type string  `json:"type"`
    GTE  AgeType `json:"gte,omitempty"` // greater than or equal to
    LT   AgeType `json:"lt,omitempty"`  // less than
}

AgeFilter type

func NewAgeFilter Uses

func NewAgeFilter(gte, lt AgeType) *AgeFilter

NewAgeFilter function

func (*AgeFilter) DemographicFilter Uses

func (*AgeFilter) DemographicFilter()

DemographicFilter implements DemographicFilter interface

type AgeType Uses

type AgeType string

AgeType type

const (
    AgeEmpty AgeType = ""
    Age15    AgeType = "age_15"
    Age20    AgeType = "age_20"
    Age25    AgeType = "age_25"
    Age30    AgeType = "age_30"
    Age35    AgeType = "age_35"
    Age40    AgeType = "age_40"
    Age45    AgeType = "age_45"
    Age50    AgeType = "age_50"
)

AgeType constants

type AppType Uses

type AppType string

AppType type

const (
    AppTypeIOS     AppType = "ios"
    AppTypeAndroid AppType = "android"
)

AppType constants

type AppTypeDetail Uses

type AppTypeDetail struct {
    AppType    string  `json:"appType"`
    Percentage float64 `json:"percentage"`
}

AppTypeDetail type

type AppTypeFilter Uses

type AppTypeFilter struct {
    Type     string    `json:"type"`
    AppTypes []AppType `json:"oneOf"`
}

AppTypeFilter type

func NewAppTypeFilter Uses

func NewAppTypeFilter(appTypes ...AppType) *AppTypeFilter

NewAppTypeFilter function

func (*AppTypeFilter) DemographicFilter Uses

func (*AppTypeFilter) DemographicFilter()

DemographicFilter implements DemographicFilter interface

type AreaDetail Uses

type AreaDetail struct {
    Bounds RichMenuBounds `json:"bounds"`
    Action RichMenuAction `json:"action"`
}

AreaDetail type for areas array

type AreaFilter Uses

type AreaFilter struct {
    Type  string     `json:"type"`
    Areas []AreaType `json:"oneOf"`
}

AreaFilter type

func NewAreaFilter Uses

func NewAreaFilter(areaTypes ...AreaType) *AreaFilter

NewAreaFilter function

func (*AreaFilter) DemographicFilter Uses

func (*AreaFilter) DemographicFilter()

DemographicFilter implements DemographicFilter interface

type AreaType Uses

type AreaType string

AreaType type

const (
    AreaJPHokkaido         AreaType = "jp_01"
    AreaJPAomori           AreaType = "jp_02"
    AreaJPIwate            AreaType = "jp_03"
    AreaJPMiyagi           AreaType = "jp_04"
    AreaJPAkita            AreaType = "jp_05"
    AreaJPYamagata         AreaType = "jp_06"
    AreaJPFukushima        AreaType = "jp_07"
    AreaJPIbaraki          AreaType = "jp_08"
    AreaJPTochigi          AreaType = "jp_09"
    AreaJPGunma            AreaType = "jp_10"
    AreaJPSaitama          AreaType = "jp_11"
    AreaJPChiba            AreaType = "jp_12"
    AreaJPTokyo            AreaType = "jp_13"
    AreaJPKanagawa         AreaType = "jp_14"
    AreaJPNiigata          AreaType = "jp_15"
    AreaJPToyama           AreaType = "jp_16"
    AreaJPIshikawa         AreaType = "jp_17"
    AreaJPFukui            AreaType = "jp_18"
    AreaJPYamanashi        AreaType = "jp_19"
    AreaJPNagano           AreaType = "jp_20"
    AreaJPGifu             AreaType = "jp_21"
    AreaJPShizuoka         AreaType = "jp_22"
    AreaJPAichi            AreaType = "jp_23"
    AreaJPMie              AreaType = "jp_24"
    AreaJPShiga            AreaType = "jp_25"
    AreaJPKyoto            AreaType = "jp_26"
    AreaJPOsaka            AreaType = "jp_27"
    AreaJPHyougo           AreaType = "jp_28"
    AreaJPNara             AreaType = "jp_29"
    AreaJPWakayama         AreaType = "jp_30"
    AreaJPTottori          AreaType = "jp_31"
    AreaJPShimane          AreaType = "jp_32"
    AreaJPOkayama          AreaType = "jp_33"
    AreaJPHiroshima        AreaType = "jp_34"
    AreaJPYamaguchi        AreaType = "jp_35"
    AreaJPTokushima        AreaType = "jp_36"
    AreaJPKagawa           AreaType = "jp_37"
    AreaJPEhime            AreaType = "jp_38"
    AreaJPKouchi           AreaType = "jp_39"
    AreaJPFukuoka          AreaType = "jp_40"
    AreaJPSaga             AreaType = "jp_41"
    AreaJPNagasaki         AreaType = "jp_42"
    AreaJPKumamoto         AreaType = "jp_43"
    AreaJPOita             AreaType = "jp_44"
    AreaJPMiyazaki         AreaType = "jp_45"
    AreaJPKagoshima        AreaType = "jp_46"
    AreaJPOkinawa          AreaType = "jp_47"
    AreaTWTaipeiCity       AreaType = "tw_01"
    AreaTWNewTaipeiCity    AreaType = "tw_02"
    AreaTWTaoyuanCity      AreaType = "tw_03"
    AreaTWTaichungCity     AreaType = "tw_04"
    AreaTWTainanCity       AreaType = "tw_05"
    AreaTWKaohsiungCity    AreaType = "tw_06"
    AreaTWKeelungCity      AreaType = "tw_07"
    AreaTWHsinchuCity      AreaType = "tw_08"
    AreaTWChiayiCity       AreaType = "tw_09"
    AreaTWHsinchuCounty    AreaType = "tw_10"
    AreaTWMiaoliCounty     AreaType = "tw_11"
    AreaTWChanghuaCounty   AreaType = "tw_12"
    AreaTWNantouCounty     AreaType = "tw_13"
    AreaTWYunlinCounty     AreaType = "tw_14"
    AreaTWChiayiCounty     AreaType = "tw_15"
    AreaTWPingtungCounty   AreaType = "tw_16"
    AreaTWYilanCounty      AreaType = "tw_17"
    AreaTWHualienCounty    AreaType = "tw_18"
    AreaTWTaitungCounty    AreaType = "tw_19"
    AreaTWPenghuCounty     AreaType = "tw_20"
    AreaTWKinmenCounty     AreaType = "tw_21"
    AreaTWLienchiangCounty AreaType = "tw_22"
    AreaTHBangkok          AreaType = "th_01"
    AreaTHPattaya          AreaType = "th_02"
    AreaTHNorthern         AreaType = "th_03"
    AreaTHCentral          AreaType = "th_04"
    AreaTHSouthern         AreaType = "th_05"
    AreaTHEastern          AreaType = "th_06"
    AreaTHNorthEastern     AreaType = "th_07"
    AreaTHWestern          AreaType = "th_08"
    AreaIDBali             AreaType = "id_01"
    AreaIDBandung          AreaType = "id_02"
    AreaIDBanjarmasin      AreaType = "id_03"
    AreaIDJabodetabek      AreaType = "id_04"
    AreaIDLainnya          AreaType = "id_05"
    AreaIDMakassar         AreaType = "id_06"
    AreaIDMedan            AreaType = "id_07"
    AreaIDPalembang        AreaType = "id_08"
    AreaIDSamarinda        AreaType = "id_09"
    AreaIDSemarang         AreaType = "id_10"
    AreaIDSurabaya         AreaType = "id_11"
    AreaIDYogyakarta       AreaType = "id_12"
)

AreaType constants

type AreasDetail Uses

type AreasDetail struct {
    Area       string  `json:"area"`
    Percentage float64 `json:"percentage"`
}

AreasDetail type

type AudienceObject Uses

type AudienceObject struct {
    Type    string `json:"type"`
    GroupID int    `json:"audienceGroupId"`
}

AudienceObject type is created to be used with specific recipient objects

func NewAudienceObject Uses

func NewAudienceObject(groupID int) *AudienceObject

NewAudienceObject function

func (*AudienceObject) Recipient Uses

func (*AudienceObject) Recipient()

Recipient implements Recipient interface

type AudioMessage Uses

type AudioMessage struct {
    ID                 string
    OriginalContentURL string
    Duration           int
    // contains filtered or unexported fields
}

AudioMessage type

func NewAudioMessage Uses

func NewAudioMessage(originalContentURL string, duration int) *AudioMessage

NewAudioMessage function

func (*AudioMessage) AddEmoji Uses

func (m *AudioMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of AudioMessage

func (*AudioMessage) MarshalJSON Uses

func (m *AudioMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of AudioMessage

func (*AudioMessage) Message Uses

func (*AudioMessage) Message()

Message implements Message interface

func (*AudioMessage) WithQuickReplies Uses

func (m *AudioMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of AudioMessage

func (*AudioMessage) WithSender Uses

func (m *AudioMessage) WithSender(sender *Sender) SendingMessage

WithSender method of AudioMessage

type BasicResponse Uses

type BasicResponse struct {
    RequestID string
}

BasicResponse type

type Beacon Uses

type Beacon struct {
    Hwid          string
    Type          BeaconEventType
    DeviceMessage []byte
}

Beacon type

type BeaconEventType Uses

type BeaconEventType string

BeaconEventType type

const (
    BeaconEventTypeEnter  BeaconEventType = "enter"
    BeaconEventTypeLeave  BeaconEventType = "leave"
    BeaconEventTypeBanner BeaconEventType = "banner"
    BeaconEventTypeStay   BeaconEventType = "stay"
)

BeaconEventType constants

type BlockStyle Uses

type BlockStyle struct {
    BackgroundColor string `json:"backgroundColor,omitempty"`
    Separator       bool   `json:"separator,omitempty"`
    SeparatorColor  string `json:"separatorColor,omitempty"`
}

BlockStyle type

type BoxComponent Uses

type BoxComponent struct {
    Type            FlexComponentType
    Layout          FlexBoxLayoutType
    Contents        []FlexComponent
    Flex            *int
    Spacing         FlexComponentSpacingType
    Margin          FlexComponentMarginType
    Width           string
    Height          string
    CornerRadius    FlexComponentCornerRadiusType
    BackgroundColor string
    BorderColor     string
}

BoxComponent type

func (*BoxComponent) FlexComponent Uses

func (*BoxComponent) FlexComponent()

FlexComponent implements FlexComponent interface

func (*BoxComponent) MarshalJSON Uses

func (c *BoxComponent) MarshalJSON() ([]byte, error)

MarshalJSON method of BoxComponent

func (*BoxComponent) UnmarshalJSON Uses

func (c *BoxComponent) UnmarshalJSON(data []byte) error

UnmarshalJSON method for BoxComponent

type BroadcastMessageCall Uses

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

BroadcastMessageCall type

func (*BroadcastMessageCall) Do Uses

func (call *BroadcastMessageCall) Do() (*BasicResponse, error)

Do method

func (*BroadcastMessageCall) WithContext Uses

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

WithContext method

type BubbleContainer Uses

type BubbleContainer struct {
    Type      FlexContainerType
    Size      FlexBubbleSizeType
    Direction FlexBubbleDirectionType
    Header    *BoxComponent
    Hero      *ImageComponent
    Body      *BoxComponent
    Footer    *BoxComponent
    Styles    *BubbleStyle
}

BubbleContainer type

func (*BubbleContainer) FlexContainer Uses

func (*BubbleContainer) FlexContainer()

FlexContainer implements FlexContainer interface

func (*BubbleContainer) MarshalJSON Uses

func (c *BubbleContainer) MarshalJSON() ([]byte, error)

MarshalJSON method of BubbleContainer

type BubbleStyle Uses

type BubbleStyle struct {
    Header *BlockStyle `json:"header,omitempty"`
    Hero   *BlockStyle `json:"hero,omitempty"`
    Body   *BlockStyle `json:"body,omitempty"`
    Footer *BlockStyle `json:"footer,omitempty"`
}

BubbleStyle type

type BulkLinkRichMenuCall Uses

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

BulkLinkRichMenuCall type

func (*BulkLinkRichMenuCall) Do Uses

func (call *BulkLinkRichMenuCall) Do() (*BasicResponse, error)

Do method

func (*BulkLinkRichMenuCall) WithContext Uses

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

WithContext method

type BulkUnlinkRichMenuCall Uses

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

BulkUnlinkRichMenuCall type

func (*BulkUnlinkRichMenuCall) Do Uses

func (call *BulkUnlinkRichMenuCall) Do() (*BasicResponse, error)

Do method

func (*BulkUnlinkRichMenuCall) WithContext Uses

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

WithContext method

type ButtonComponent Uses

type ButtonComponent struct {
    Type    FlexComponentType
    Action  TemplateAction
    Flex    *int
    Margin  FlexComponentMarginType
    Height  FlexButtonHeightType
    Style   FlexButtonStyleType
    Color   string
    Gravity FlexComponentGravityType
}

ButtonComponent type

func (*ButtonComponent) FlexComponent Uses

func (*ButtonComponent) FlexComponent()

FlexComponent implements FlexComponent interface

func (*ButtonComponent) MarshalJSON Uses

func (c *ButtonComponent) MarshalJSON() ([]byte, error)

MarshalJSON method of ButtonComponent

func (*ButtonComponent) UnmarshalJSON Uses

func (c *ButtonComponent) UnmarshalJSON(data []byte) error

UnmarshalJSON method for ButtonComponent

type ButtonsTemplate Uses

type ButtonsTemplate struct {
    ThumbnailImageURL    string
    ImageAspectRatio     ImageAspectRatioType
    ImageSize            ImageSizeType
    ImageBackgroundColor string
    Title                string
    Text                 string
    Actions              []TemplateAction
}

ButtonsTemplate type

func NewButtonsTemplate Uses

func NewButtonsTemplate(thumbnailImageURL, title, text string, actions ...TemplateAction) *ButtonsTemplate

NewButtonsTemplate function `thumbnailImageURL` and `title` are optional. they can be empty.

func (*ButtonsTemplate) MarshalJSON Uses

func (t *ButtonsTemplate) MarshalJSON() ([]byte, error)

MarshalJSON method of ButtonsTemplate

func (*ButtonsTemplate) Template Uses

func (*ButtonsTemplate) Template()

Template implements Template interface

func (*ButtonsTemplate) WithImageOptions Uses

func (t *ButtonsTemplate) WithImageOptions(imageAspectRatio ImageAspectRatioType, imageSize ImageSizeType, imageBackgroundColor string) *ButtonsTemplate

WithImageOptions method, ButtonsTemplate can set imageAspectRatio, imageSize and imageBackgroundColor

type CameraAction Uses

type CameraAction struct {
    Label string
}

CameraAction type

func NewCameraAction Uses

func NewCameraAction(label string) *CameraAction

NewCameraAction function

func (*CameraAction) MarshalJSON Uses

func (a *CameraAction) MarshalJSON() ([]byte, error)

MarshalJSON method of CameraAction

func (*CameraAction) QuickReplyAction Uses

func (*CameraAction) QuickReplyAction()

QuickReplyAction implements QuickReplyAction interface

type CameraRollAction Uses

type CameraRollAction struct {
    Label string
}

CameraRollAction type

func NewCameraRollAction Uses

func NewCameraRollAction(label string) *CameraRollAction

NewCameraRollAction function

func (*CameraRollAction) MarshalJSON Uses

func (a *CameraRollAction) MarshalJSON() ([]byte, error)

MarshalJSON method of CameraRollAction

func (*CameraRollAction) QuickReplyAction Uses

func (*CameraRollAction) QuickReplyAction()

QuickReplyAction implements QuickReplyAction interface

type CancelDefaultRichMenuCall Uses

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

CancelDefaultRichMenuCall type

func (*CancelDefaultRichMenuCall) Do Uses

func (call *CancelDefaultRichMenuCall) Do() (*BasicResponse, error)

Do method

func (*CancelDefaultRichMenuCall) WithContext Uses

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

WithContext method

type CarouselColumn Uses

type CarouselColumn struct {
    ThumbnailImageURL    string           `json:"thumbnailImageUrl,omitempty"`
    ImageBackgroundColor string           `json:"imageBackgroundColor,omitempty"`
    Title                string           `json:"title,omitempty"`
    Text                 string           `json:"text"`
    Actions              []TemplateAction `json:"actions"`
}

CarouselColumn type

func NewCarouselColumn Uses

func NewCarouselColumn(thumbnailImageURL, title, text string, actions ...TemplateAction) *CarouselColumn

NewCarouselColumn function `thumbnailImageURL` and `title` are optional. they can be empty.

func (*CarouselColumn) WithImageOptions Uses

func (t *CarouselColumn) WithImageOptions(imageBackgroundColor string) *CarouselColumn

WithImageOptions method, CarouselColumn can set imageBackgroundColor

type CarouselContainer Uses

type CarouselContainer struct {
    Type     FlexContainerType
    Contents []*BubbleContainer
}

CarouselContainer type

func (*CarouselContainer) FlexContainer Uses

func (*CarouselContainer) FlexContainer()

FlexContainer implements FlexContainer interface

func (*CarouselContainer) MarshalJSON Uses

func (c *CarouselContainer) MarshalJSON() ([]byte, error)

MarshalJSON method of CarouselContainer

type CarouselTemplate Uses

type CarouselTemplate struct {
    Columns          []*CarouselColumn
    ImageAspectRatio ImageAspectRatioType
    ImageSize        ImageSizeType
}

CarouselTemplate type

func NewCarouselTemplate Uses

func NewCarouselTemplate(columns ...*CarouselColumn) *CarouselTemplate

NewCarouselTemplate function

func (*CarouselTemplate) MarshalJSON Uses

func (t *CarouselTemplate) MarshalJSON() ([]byte, error)

MarshalJSON method of CarouselTemplate

func (*CarouselTemplate) Template Uses

func (*CarouselTemplate) Template()

Template implements Template interface

func (*CarouselTemplate) WithImageOptions Uses

func (t *CarouselTemplate) WithImageOptions(imageAspectRatio ImageAspectRatioType, imageSize ImageSizeType) *CarouselTemplate

WithImageOptions method, CarouselTemplate can set imageAspectRatio and imageSize

type ClickDetail Uses

type ClickDetail struct {
    Seq                  int64  `json:"seq"`
    URL                  string `json:"url"`
    Click                int64  `json:"click"`
    UniqueClick          int64  `json:"uniqueClick"`
    UniqueClickOfRequest int64  `json:"uniqueClickOfRequest"`
}

ClickDetail type

type Client Uses

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

Client type

func New Uses

func New(channelSecret, channelToken string, options ...ClientOption) (*Client, error)

New returns a new bot client instance.

func (*Client) AddLIFF Uses

func (client *Client) AddLIFF(view View) *AddLIFFCall

AddLIFF method

func (*Client) BroadcastMessage Uses

func (client *Client) BroadcastMessage(messages ...SendingMessage) *BroadcastMessageCall

BroadcastMessage method

func (*Client) BulkLinkRichMenu Uses

func (client *Client) BulkLinkRichMenu(richMenuID string, userIDs ...string) *BulkLinkRichMenuCall

BulkLinkRichMenu method

func (*Client) BulkUnlinkRichMenu Uses

func (client *Client) BulkUnlinkRichMenu(userIDs ...string) *BulkUnlinkRichMenuCall

BulkUnlinkRichMenu method

func (*Client) CancelDefaultRichMenu Uses

func (client *Client) CancelDefaultRichMenu() *CancelDefaultRichMenuCall

CancelDefaultRichMenu method

func (*Client) CreateRichMenu Uses

func (client *Client) CreateRichMenu(richMenu RichMenu) *CreateRichMenuCall

CreateRichMenu method

func (*Client) DeleteLIFF Uses

func (client *Client) DeleteLIFF(liffID string) *DeleteLIFFCall

DeleteLIFF method

func (*Client) DeleteRichMenu Uses

func (client *Client) DeleteRichMenu(richMenuID string) *DeleteRichMenuCall

DeleteRichMenu method

func (*Client) DownloadRichMenuImage Uses

func (client *Client) DownloadRichMenuImage(richMenuID string) *DownloadRichMenuImageCall

DownloadRichMenuImage method

func (*Client) GetAccessTokensV2 Uses

func (client *Client) GetAccessTokensV2(clientAssertion string) *GetAccessTokensV2Call

GetAccessTokensV2 method

func (*Client) GetDefaultRichMenu Uses

func (client *Client) GetDefaultRichMenu() *GetDefaultRichMenuCall

GetDefaultRichMenu method

func (*Client) GetFriendDemographics Uses

func (client *Client) GetFriendDemographics() *GetFriendDemographicsCall

GetFriendDemographics method

func (*Client) GetGroupMemberCount Uses

func (client *Client) GetGroupMemberCount(groupID string) *GetGroupMemberCountCall

GetGroupMemberCount method

func (*Client) GetGroupMemberIDs Uses

func (client *Client) GetGroupMemberIDs(groupID, continuationToken string) *GetGroupMemberIDsCall

GetGroupMemberIDs method

func (*Client) GetGroupMemberProfile Uses

func (client *Client) GetGroupMemberProfile(groupID, userID string) *GetGroupMemberProfileCall

GetGroupMemberProfile method

func (*Client) GetGroupSummary Uses

func (client *Client) GetGroupSummary(groupID string) *GetGroupSummaryCall

GetGroupSummary method

func (*Client) GetLIFF Uses

func (client *Client) GetLIFF() *GetLIFFAllCall

GetLIFF method

func (*Client) GetMessageConsumption Uses

func (client *Client) GetMessageConsumption() *GetMessageConsumptionCall

GetMessageConsumption method

func (*Client) GetMessageContent Uses

func (client *Client) GetMessageContent(messageID string) *GetMessageContentCall

GetMessageContent method

func (*Client) GetMessageQuota Uses

func (client *Client) GetMessageQuota() *GetMessageQuotaCall

GetMessageQuota method

func (*Client) GetMessageQuotaConsumption Uses

func (client *Client) GetMessageQuotaConsumption() *GetMessageQuotaCall

GetMessageQuotaConsumption method

func (*Client) GetNumberBroadcastMessages Uses

func (client *Client) GetNumberBroadcastMessages(date string) *GetNumberMessagesCall

GetNumberBroadcastMessages method

func (*Client) GetNumberFollowers Uses

func (client *Client) GetNumberFollowers(date string) *GetNumberFollowersCall

GetNumberFollowers method

func (*Client) GetNumberMessagesDelivery Uses

func (client *Client) GetNumberMessagesDelivery(date string) *GetNumberMessagesDeliveryCall

GetNumberMessagesDelivery method

func (*Client) GetNumberMulticastMessages Uses

func (client *Client) GetNumberMulticastMessages(date string) *GetNumberMessagesCall

GetNumberMulticastMessages method

func (*Client) GetNumberPushMessages Uses

func (client *Client) GetNumberPushMessages(date string) *GetNumberMessagesCall

GetNumberPushMessages method

func (*Client) GetNumberReplyMessages Uses

func (client *Client) GetNumberReplyMessages(date string) *GetNumberMessagesCall

GetNumberReplyMessages method

func (*Client) GetProfile Uses

func (client *Client) GetProfile(userID string) *GetProfileCall

GetProfile method

func (*Client) GetProgressNarrowcastMessages Uses

func (client *Client) GetProgressNarrowcastMessages(requestID string) *GetProgressMessagesCall

GetProgressNarrowcastMessages method

func (*Client) GetRichMenu Uses

func (client *Client) GetRichMenu(richMenuID string) *GetRichMenuCall

GetRichMenu method

func (*Client) GetRichMenuList Uses

func (client *Client) GetRichMenuList() *GetRichMenuListCall

GetRichMenuList method

func (*Client) GetRoomMemberCount Uses

func (client *Client) GetRoomMemberCount(roomID string) *GetRoomMemberCountCall

GetRoomMemberCount method

func (*Client) GetRoomMemberIDs Uses

func (client *Client) GetRoomMemberIDs(roomID, continuationToken string) *GetRoomMemberIDsCall

GetRoomMemberIDs method

func (*Client) GetRoomMemberProfile Uses

func (client *Client) GetRoomMemberProfile(roomID, userID string) *GetRoomMemberProfileCall

GetRoomMemberProfile method

func (*Client) GetUserInteractionStats Uses

func (client *Client) GetUserInteractionStats(requestID string) *GetUserInteractionStatsCall

GetUserInteractionStats method

func (*Client) GetUserRichMenu Uses

func (client *Client) GetUserRichMenu(userID string) *GetUserRichMenuCall

GetUserRichMenu method

func (*Client) IssueAccessToken Uses

func (client *Client) IssueAccessToken(channelID, channelSecret string) *IssueAccessTokenCall

IssueAccessToken method

func (*Client) IssueAccessTokenV2 Uses

func (client *Client) IssueAccessTokenV2(clientAssertion string) *IssueAccessTokenV2Call

IssueAccessTokenV2 method

func (*Client) IssueLinkToken Uses

func (client *Client) IssueLinkToken(userID string) *IssueLinkTokenCall

IssueLinkToken method https://developers.line.me/en/reference/messaging-api/#issue-link-token

func (*Client) LeaveGroup Uses

func (client *Client) LeaveGroup(groupID string) *LeaveGroupCall

LeaveGroup method

func (*Client) LeaveRoom Uses

func (client *Client) LeaveRoom(roomID string) *LeaveRoomCall

LeaveRoom method

func (*Client) LinkUserRichMenu Uses

func (client *Client) LinkUserRichMenu(userID, richMenuID string) *LinkUserRichMenuCall

LinkUserRichMenu method

func (*Client) Multicast Uses

func (client *Client) Multicast(to []string, messages ...SendingMessage) *MulticastCall

Multicast method

func (*Client) Narrowcast Uses

func (client *Client) Narrowcast(messages ...SendingMessage) *NarrowcastCall

Narrowcast method

func (*Client) ParseRequest Uses

func (client *Client) ParseRequest(r *http.Request) ([]*Event, error)

ParseRequest method

func (*Client) PushMessage Uses

func (client *Client) PushMessage(to string, messages ...SendingMessage) *PushMessageCall

PushMessage method

func (*Client) ReplyMessage Uses

func (client *Client) ReplyMessage(replyToken string, messages ...SendingMessage) *ReplyMessageCall

ReplyMessage method

func (*Client) RevokeAccessToken Uses

func (client *Client) RevokeAccessToken(accessToken string) *RevokeAccessTokenCall

RevokeAccessToken method

func (*Client) RevokeAccessTokenV2 Uses

func (client *Client) RevokeAccessTokenV2(channelID, channelSecret, accessToken string) *RevokeAccessTokenV2Call

RevokeAccessTokenV2 method

func (*Client) SetDefaultRichMenu Uses

func (client *Client) SetDefaultRichMenu(richMenuID string) *SetDefaultRichMenuCall

SetDefaultRichMenu method

func (*Client) UnlinkUserRichMenu Uses

func (client *Client) UnlinkUserRichMenu(userID string) *UnlinkUserRichMenuCall

UnlinkUserRichMenu method

func (*Client) UpdateLIFF Uses

func (client *Client) UpdateLIFF(liffID string, view View) *UpdateLIFFCall

UpdateLIFF method

func (*Client) UploadRichMenuImage Uses

func (client *Client) UploadRichMenuImage(richMenuID, imgPath string) *UploadRichMenuImageCall

UploadRichMenuImage method

type ClientOption Uses

type ClientOption func(*Client) error

ClientOption type

func WithEndpointBase Uses

func WithEndpointBase(endpointBase string) ClientOption

WithEndpointBase function

func WithEndpointBaseData Uses

func WithEndpointBaseData(endpointBaseData string) ClientOption

WithEndpointBaseData function

func WithHTTPClient Uses

func WithHTTPClient(c *http.Client) ClientOption

WithHTTPClient function

type ConfirmTemplate Uses

type ConfirmTemplate struct {
    Text    string
    Actions []TemplateAction
}

ConfirmTemplate type

func NewConfirmTemplate Uses

func NewConfirmTemplate(text string, left, right TemplateAction) *ConfirmTemplate

NewConfirmTemplate function

func (*ConfirmTemplate) MarshalJSON Uses

func (t *ConfirmTemplate) MarshalJSON() ([]byte, error)

MarshalJSON method of ConfirmTemplate

func (*ConfirmTemplate) Template Uses

func (*ConfirmTemplate) Template()

Template implements Template interface

type CreateRichMenuCall Uses

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

CreateRichMenuCall type

func (*CreateRichMenuCall) Do Uses

func (call *CreateRichMenuCall) Do() (*RichMenuIDResponse, error)

Do method

func (*CreateRichMenuCall) WithContext Uses

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

WithContext method

type DatetimePickerAction Uses

type DatetimePickerAction struct {
    Label   string
    Data    string
    Mode    string
    Initial string
    Max     string
    Min     string
}

DatetimePickerAction type

func NewDatetimePickerAction Uses

func NewDatetimePickerAction(label, data, mode, initial, max, min string) *DatetimePickerAction

NewDatetimePickerAction function

func (*DatetimePickerAction) MarshalJSON Uses

func (a *DatetimePickerAction) MarshalJSON() ([]byte, error)

MarshalJSON method of DatetimePickerAction

func (*DatetimePickerAction) QuickReplyAction Uses

func (*DatetimePickerAction) QuickReplyAction()

QuickReplyAction implements QuickReplyAction interface

func (*DatetimePickerAction) TemplateAction Uses

func (*DatetimePickerAction) TemplateAction()

TemplateAction implements TemplateAction interface

type DeleteLIFFCall Uses

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

DeleteLIFFCall type

func (*DeleteLIFFCall) Do Uses

func (call *DeleteLIFFCall) Do() (*BasicResponse, error)

Do method

func (*DeleteLIFFCall) WithContext Uses

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

WithContext method

type DeleteRichMenuCall Uses

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

DeleteRichMenuCall type

func (*DeleteRichMenuCall) Do Uses

func (call *DeleteRichMenuCall) Do() (*BasicResponse, error)

Do method

func (*DeleteRichMenuCall) WithContext Uses

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

WithContext method

type DeliveryType Uses

type DeliveryType string

DeliveryType type

const (
    DeliveryTypeMulticast DeliveryType = "multicast"
    DeliveryTypePush      DeliveryType = "push"
    DeliveryTypeReply     DeliveryType = "reply"
    DeliveryTypeBroadcast DeliveryType = "broadcast"
)

DeliveryType constants

type DemographicFilter Uses

type DemographicFilter interface {
    DemographicFilter()
}

DemographicFilter interface

type DemographicFilterOperator Uses

type DemographicFilterOperator struct {
    ConditionAnd []DemographicFilter `json:"and,omitempty"`
    ConditionOr  []DemographicFilter `json:"or,omitempty"`
    ConditionNot DemographicFilter   `json:"not,omitempty"`
}

DemographicFilterOperator struct

func DemographicFilterOperatorAnd Uses

func DemographicFilterOperatorAnd(conditions ...DemographicFilter) *DemographicFilterOperator

DemographicFilterOperatorAnd method

func DemographicFilterOperatorNot Uses

func DemographicFilterOperatorNot(condition DemographicFilter) *DemographicFilterOperator

DemographicFilterOperatorNot method

func DemographicFilterOperatorOr Uses

func DemographicFilterOperatorOr(conditions ...DemographicFilter) *DemographicFilterOperator

DemographicFilterOperatorOr method

func (*DemographicFilterOperator) DemographicFilter Uses

func (*DemographicFilterOperator) DemographicFilter()

DemographicFilter implements DemographicFilter interface

func (*DemographicFilterOperator) MarshalJSON Uses

func (o *DemographicFilterOperator) MarshalJSON() ([]byte, error)

MarshalJSON method of DemographicFilterOperator

type DownloadRichMenuImageCall Uses

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

DownloadRichMenuImageCall type

func (*DownloadRichMenuImageCall) Do Uses

func (call *DownloadRichMenuImageCall) Do() (*MessageContentResponse, error)

Do method

func (*DownloadRichMenuImageCall) WithContext Uses

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

WithContext method

type Emoji Uses

type Emoji struct {
    Index     int    `json:"index"`
    Length    int    `json:"length,omitempty"`
    ProductID string `json:"productId,omitempty"`
    EmojiID   string `json:"emojiId,omitempty"`
}

Emoji type

func NewEmoji Uses

func NewEmoji(index int, productID, emojiID string) *Emoji

NewEmoji function

type ErrorResponse Uses

type ErrorResponse struct {
    Message string                `json:"message"`
    Details []errorResponseDetail `json:"details"`
    // OAuth Errors
    Error            string `json:"error"`
    ErrorDescription string `json:"error_description"`
}

ErrorResponse type

type Event Uses

type Event struct {
    ReplyToken  string
    Type        EventType
    Mode        EventMode
    Timestamp   time.Time
    Source      *EventSource
    Message     Message
    Joined      *Members
    Left        *Members
    Postback    *Postback
    Beacon      *Beacon
    AccountLink *AccountLink
    Things      *Things
    Members     []*EventSource
}

Event type

func ParseRequest Uses

func ParseRequest(channelSecret string, r *http.Request) ([]*Event, error)

ParseRequest func

func (*Event) MarshalJSON Uses

func (e *Event) MarshalJSON() ([]byte, error)

MarshalJSON method of Event

func (*Event) UnmarshalJSON Uses

func (e *Event) UnmarshalJSON(body []byte) (err error)

UnmarshalJSON method of Event

type EventMode Uses

type EventMode string

EventMode type

const (
    EventModeActive  EventMode = "active"
    EventModeStandby EventMode = "standby"
)

EventMode constants

type EventSource Uses

type EventSource struct {
    Type    EventSourceType `json:"type"`
    UserID  string          `json:"userId,omitempty"`
    GroupID string          `json:"groupId,omitempty"`
    RoomID  string          `json:"roomId,omitempty"`
}

EventSource type

type EventSourceType Uses

type EventSourceType string

EventSourceType type

const (
    EventSourceTypeUser  EventSourceType = "user"
    EventSourceTypeGroup EventSourceType = "group"
    EventSourceTypeRoom  EventSourceType = "room"
)

EventSourceType constants

type EventType Uses

type EventType string

EventType type

const (
    EventTypeMessage      EventType = "message"
    EventTypeFollow       EventType = "follow"
    EventTypeUnfollow     EventType = "unfollow"
    EventTypeJoin         EventType = "join"
    EventTypeLeave        EventType = "leave"
    EventTypeMemberJoined EventType = "memberJoined"
    EventTypeMemberLeft   EventType = "memberLeft"
    EventTypePostback     EventType = "postback"
    EventTypeBeacon       EventType = "beacon"
    EventTypeAccountLink  EventType = "accountLink"
    EventTypeThings       EventType = "things"
)

EventType constants

type FileMessage Uses

type FileMessage struct {
    ID       string
    FileName string
    FileSize int
}

FileMessage type

func (*FileMessage) Message Uses

func (*FileMessage) Message()

Message implements Message interface

type FillerComponent Uses

type FillerComponent struct {
    Type FlexComponentType
    Flex *int
}

FillerComponent type

func (*FillerComponent) FlexComponent Uses

func (*FillerComponent) FlexComponent()

FlexComponent implements FlexComponent interface

func (*FillerComponent) MarshalJSON Uses

func (c *FillerComponent) MarshalJSON() ([]byte, error)

MarshalJSON method of FillerComponent

type Filter Uses

type Filter struct {
    Demographic DemographicFilter `json:"demographic"`
}

Filter type

type FlexBoxLayoutType Uses

type FlexBoxLayoutType string

FlexBoxLayoutType type

const (
    FlexBoxLayoutTypeHorizontal FlexBoxLayoutType = "horizontal"
    FlexBoxLayoutTypeVertical   FlexBoxLayoutType = "vertical"
    FlexBoxLayoutTypeBaseline   FlexBoxLayoutType = "baseline"
)

FlexBoxLayoutType constants

type FlexBubbleDirectionType Uses

type FlexBubbleDirectionType string

FlexBubbleDirectionType type

const (
    FlexBubbleDirectionTypeLTR FlexBubbleDirectionType = "ltr"
    FlexBubbleDirectionTypeRTL FlexBubbleDirectionType = "rtl"
)

FlexBubbleDirectionType constants

type FlexBubbleSizeType Uses

type FlexBubbleSizeType string

FlexBubbleSizeType type

const (
    FlexBubbleSizeTypeNano  FlexBubbleSizeType = "nano"
    FlexBubbleSizeTypeMicro FlexBubbleSizeType = "micro"
    FlexBubbleSizeTypeKilo  FlexBubbleSizeType = "kilo"
    FlexBubbleSizeTypeMega  FlexBubbleSizeType = "mega"
    FlexBubbleSizeTypeGiga  FlexBubbleSizeType = "giga"
)

FlexBubbleSizeType constants

type FlexButtonHeightType Uses

type FlexButtonHeightType string

FlexButtonHeightType type

const (
    FlexButtonHeightTypeMd FlexButtonHeightType = "md"
    FlexButtonHeightTypeSm FlexButtonHeightType = "sm"
)

FlexButtonHeightType constants

type FlexButtonStyleType Uses

type FlexButtonStyleType string

FlexButtonStyleType type

const (
    FlexButtonStyleTypeLink      FlexButtonStyleType = "link"
    FlexButtonStyleTypePrimary   FlexButtonStyleType = "primary"
    FlexButtonStyleTypeSecondary FlexButtonStyleType = "secondary"
)

FlexButtonStyleType constants

type FlexComponent Uses

type FlexComponent interface {
    FlexComponent()
}

FlexComponent interface

type FlexComponentAlignType Uses

type FlexComponentAlignType string

FlexComponentAlignType type

const (
    FlexComponentAlignTypeStart  FlexComponentAlignType = "start"
    FlexComponentAlignTypeEnd    FlexComponentAlignType = "end"
    FlexComponentAlignTypeCenter FlexComponentAlignType = "center"
)

FlexComponentAlignType constants

type FlexComponentCornerRadiusType Uses

type FlexComponentCornerRadiusType string

FlexComponentCornerRadiusType type

const (
    FlexComponentCornerRadiusTypeNone FlexComponentCornerRadiusType = "none"
    FlexComponentCornerRadiusTypeXs   FlexComponentCornerRadiusType = "xs"
    FlexComponentCornerRadiusTypeSm   FlexComponentCornerRadiusType = "sm"
    FlexComponentCornerRadiusTypeMd   FlexComponentCornerRadiusType = "md"
    FlexComponentCornerRadiusTypeLg   FlexComponentCornerRadiusType = "lg"
    FlexComponentCornerRadiusTypeXl   FlexComponentCornerRadiusType = "xl"
    FlexComponentCornerRadiusTypeXxl  FlexComponentCornerRadiusType = "xxl"
)

FlexComponentCornerRadius constants

type FlexComponentGravityType Uses

type FlexComponentGravityType string

FlexComponentGravityType type

const (
    FlexComponentGravityTypeTop    FlexComponentGravityType = "top"
    FlexComponentGravityTypeBottom FlexComponentGravityType = "bottom"
    FlexComponentGravityTypeCenter FlexComponentGravityType = "center"
)

FlexComponentGravityType constants

type FlexComponentMarginType Uses

type FlexComponentMarginType string

FlexComponentMarginType type

const (
    FlexComponentMarginTypeNone FlexComponentMarginType = "none"
    FlexComponentMarginTypeXs   FlexComponentMarginType = "xs"
    FlexComponentMarginTypeSm   FlexComponentMarginType = "sm"
    FlexComponentMarginTypeMd   FlexComponentMarginType = "md"
    FlexComponentMarginTypeLg   FlexComponentMarginType = "lg"
    FlexComponentMarginTypeXl   FlexComponentMarginType = "xl"
    FlexComponentMarginTypeXxl  FlexComponentMarginType = "xxl"
)

FlexComponentMarginType constants

type FlexComponentSpacingType Uses

type FlexComponentSpacingType string

FlexComponentSpacingType type

const (
    FlexComponentSpacingTypeNone FlexComponentSpacingType = "none"
    FlexComponentSpacingTypeXs   FlexComponentSpacingType = "xs"
    FlexComponentSpacingTypeSm   FlexComponentSpacingType = "sm"
    FlexComponentSpacingTypeMd   FlexComponentSpacingType = "md"
    FlexComponentSpacingTypeLg   FlexComponentSpacingType = "lg"
    FlexComponentSpacingTypeXl   FlexComponentSpacingType = "xl"
    FlexComponentSpacingTypeXxl  FlexComponentSpacingType = "xxl"
)

FlexComponentSpacingType constants

type FlexComponentType Uses

type FlexComponentType string

FlexComponentType type

const (
    FlexComponentTypeBox       FlexComponentType = "box"
    FlexComponentTypeButton    FlexComponentType = "button"
    FlexComponentTypeFiller    FlexComponentType = "filler"
    FlexComponentTypeIcon      FlexComponentType = "icon"
    FlexComponentTypeImage     FlexComponentType = "image"
    FlexComponentTypeSeparator FlexComponentType = "separator"
    FlexComponentTypeSpacer    FlexComponentType = "spacer"
    FlexComponentTypeText      FlexComponentType = "text"
)

FlexComponentType constants

type FlexContainer Uses

type FlexContainer interface {
    FlexContainer()
}

FlexContainer interface

func UnmarshalFlexMessageJSON Uses

func UnmarshalFlexMessageJSON(data []byte) (FlexContainer, error)

UnmarshalFlexMessageJSON function

Code:

container, err := linebot.UnmarshalFlexMessageJSON([]byte(`{
"type": "bubble",
"body": {
  "type": "box",
  "layout": "vertical",
  "contents": [
    {
      "type": "text",
      "text": "hello"
    },
    {
      "type": "text",
      "text": "world"
    }
  ]
}
  }`))
if err != nil {
    panic(err)
}

linebot.NewFlexMessage("alt text", container)

type FlexContainerType Uses

type FlexContainerType string

FlexContainerType type

const (
    FlexContainerTypeBubble   FlexContainerType = "bubble"
    FlexContainerTypeCarousel FlexContainerType = "carousel"
)

FlexContainerType constants

type FlexIconAspectRatioType Uses

type FlexIconAspectRatioType string

FlexIconAspectRatioType type

const (
    FlexIconAspectRatioType1to1 FlexIconAspectRatioType = "1:1"
    FlexIconAspectRatioType2to1 FlexIconAspectRatioType = "2:1"
    FlexIconAspectRatioType3to1 FlexIconAspectRatioType = "3:1"
)

FlexIconAspectRatioType constants

type FlexIconSizeType Uses

type FlexIconSizeType string

FlexIconSizeType type

const (
    FlexIconSizeTypeXxs FlexIconSizeType = "xxs"
    FlexIconSizeTypeXs  FlexIconSizeType = "xs"
    FlexIconSizeTypeSm  FlexIconSizeType = "sm"
    FlexIconSizeTypeMd  FlexIconSizeType = "md"
    FlexIconSizeTypeLg  FlexIconSizeType = "lg"
    FlexIconSizeTypeXl  FlexIconSizeType = "xl"
    FlexIconSizeTypeXxl FlexIconSizeType = "xxl"
    FlexIconSizeType3xl FlexIconSizeType = "3xl"
    FlexIconSizeType4xl FlexIconSizeType = "4xl"
    FlexIconSizeType5xl FlexIconSizeType = "5xl"
)

FlexIconSizeType constants

type FlexImageAspectModeType Uses

type FlexImageAspectModeType string

FlexImageAspectModeType type

const (
    FlexImageAspectModeTypeCover FlexImageAspectModeType = "cover"
    FlexImageAspectModeTypeFit   FlexImageAspectModeType = "fit"
)

FlexImageAspectModeType constants

type FlexImageAspectRatioType Uses

type FlexImageAspectRatioType string

FlexImageAspectRatioType type

const (
    FlexImageAspectRatioType1to1    FlexImageAspectRatioType = "1:1"
    FlexImageAspectRatioType1_51to1 FlexImageAspectRatioType = "1.51:1"
    FlexImageAspectRatioType1_91to1 FlexImageAspectRatioType = "1.91:1"
    FlexImageAspectRatioType4to3    FlexImageAspectRatioType = "4:3"
    FlexImageAspectRatioType16to9   FlexImageAspectRatioType = "16:9"
    FlexImageAspectRatioType20to13  FlexImageAspectRatioType = "20:13"
    FlexImageAspectRatioType2to1    FlexImageAspectRatioType = "2:1"
    FlexImageAspectRatioType3to1    FlexImageAspectRatioType = "3:1"
    FlexImageAspectRatioType3to4    FlexImageAspectRatioType = "3:4"
    FlexImageAspectRatioType9to16   FlexImageAspectRatioType = "9:16"
    FlexImageAspectRatioType1to2    FlexImageAspectRatioType = "1:2"
    FlexImageAspectRatioType1to3    FlexImageAspectRatioType = "1:3"
)

FlexImageAspectRatioType constants

type FlexImageSizeType Uses

type FlexImageSizeType string

FlexImageSizeType type

const (
    FlexImageSizeTypeXxs  FlexImageSizeType = "xxs"
    FlexImageSizeTypeXs   FlexImageSizeType = "xs"
    FlexImageSizeTypeSm   FlexImageSizeType = "sm"
    FlexImageSizeTypeMd   FlexImageSizeType = "md"
    FlexImageSizeTypeLg   FlexImageSizeType = "lg"
    FlexImageSizeTypeXl   FlexImageSizeType = "xl"
    FlexImageSizeTypeXxl  FlexImageSizeType = "xxl"
    FlexImageSizeType3xl  FlexImageSizeType = "3xl"
    FlexImageSizeType4xl  FlexImageSizeType = "4xl"
    FlexImageSizeType5xl  FlexImageSizeType = "5xl"
    FlexImageSizeTypeFull FlexImageSizeType = "full"
)

FlexImageSizeType constants

type FlexMessage Uses

type FlexMessage struct {
    AltText  string
    Contents FlexContainer
    // contains filtered or unexported fields
}

FlexMessage type

func NewFlexMessage Uses

func NewFlexMessage(altText string, contents FlexContainer) *FlexMessage

NewFlexMessage function

func (*FlexMessage) AddEmoji Uses

func (m *FlexMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of FlexMessage

func (*FlexMessage) MarshalJSON Uses

func (m *FlexMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of FlexMessage

func (*FlexMessage) Message Uses

func (*FlexMessage) Message()

Message implements Message interface

func (*FlexMessage) WithQuickReplies Uses

func (m *FlexMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of FlexMessage

func (*FlexMessage) WithSender Uses

func (m *FlexMessage) WithSender(sender *Sender) SendingMessage

WithSender method of FlexMessage

type FlexSpacerSizeType Uses

type FlexSpacerSizeType string

FlexSpacerSizeType type

const (
    FlexSpacerSizeTypeXs  FlexSpacerSizeType = "xs"
    FlexSpacerSizeTypeSm  FlexSpacerSizeType = "sm"
    FlexSpacerSizeTypeMd  FlexSpacerSizeType = "md"
    FlexSpacerSizeTypeLg  FlexSpacerSizeType = "lg"
    FlexSpacerSizeTypeXl  FlexSpacerSizeType = "xl"
    FlexSpacerSizeTypeXxl FlexSpacerSizeType = "xxl"
)

FlexSpacerSizeType constants

type FlexTextDecorationType Uses

type FlexTextDecorationType string

FlexTextDecorationType type

const (
    FlexTextDecorationTypeNone        FlexTextDecorationType = "none"
    FlexTextDecorationTypeUnderline   FlexTextDecorationType = "underline"
    FlexTextDecorationTypeLineThrough FlexTextDecorationType = "line-through"
)

FlexTextDecorationType constants

type FlexTextSizeType Uses

type FlexTextSizeType string

FlexTextSizeType type

const (
    FlexTextSizeTypeXxs FlexTextSizeType = "xxs"
    FlexTextSizeTypeXs  FlexTextSizeType = "xs"
    FlexTextSizeTypeSm  FlexTextSizeType = "sm"
    FlexTextSizeTypeMd  FlexTextSizeType = "md"
    FlexTextSizeTypeLg  FlexTextSizeType = "lg"
    FlexTextSizeTypeXl  FlexTextSizeType = "xl"
    FlexTextSizeTypeXxl FlexTextSizeType = "xxl"
    FlexTextSizeType3xl FlexTextSizeType = "3xl"
    FlexTextSizeType4xl FlexTextSizeType = "4xl"
    FlexTextSizeType5xl FlexTextSizeType = "5xl"
)

FlexTextSizeType constants

type FlexTextStyleType Uses

type FlexTextStyleType string

FlexTextStyleType type

const (
    FlexTextStyleTypeNormal FlexTextStyleType = "normal"
    FlexTextStyleTypeItalic FlexTextStyleType = "italic"
)

FlexTextStyleType constants

type FlexTextWeightType Uses

type FlexTextWeightType string

FlexTextWeightType type

const (
    FlexTextWeightTypeRegular FlexTextWeightType = "regular"
    FlexTextWeightTypeBold    FlexTextWeightType = "bold"
)

FlexTextWeightType constants

type GenderDetail Uses

type GenderDetail struct {
    Gender     string  `json:"gender"`
    Percentage float64 `json:"percentage"`
}

GenderDetail type

type GenderFilter Uses

type GenderFilter struct {
    Type    string       `json:"type"`
    Genders []GenderType `json:"oneOf"`
}

GenderFilter type

func NewGenderFilter Uses

func NewGenderFilter(genders ...GenderType) *GenderFilter

NewGenderFilter function

func (*GenderFilter) DemographicFilter Uses

func (*GenderFilter) DemographicFilter()

DemographicFilter implements DemographicFilter interface

type GenderType Uses

type GenderType string

GenderType type

const (
    GenderMale   GenderType = "male"
    GenderFemale GenderType = "female"
)

GenderType constants

type GetAccessTokensV2Call Uses

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

GetAccessTokensV2Call type

func (*GetAccessTokensV2Call) Do Uses

func (call *GetAccessTokensV2Call) Do() (*AccessTokensResponse, error)

Do method

func (*GetAccessTokensV2Call) WithContext Uses

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

WithContext method

type GetDefaultRichMenuCall Uses

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

GetDefaultRichMenuCall type

func (*GetDefaultRichMenuCall) Do Uses

func (call *GetDefaultRichMenuCall) Do() (*RichMenuIDResponse, error)

Do method

func (*GetDefaultRichMenuCall) WithContext Uses

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

WithContext method

type GetFriendDemographicsCall Uses

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

GetFriendDemographicsCall type

func (*GetFriendDemographicsCall) Do Uses

func (call *GetFriendDemographicsCall) Do() (*MessagesFriendDemographicsResponse, error)

Do method

func (*GetFriendDemographicsCall) WithContext Uses

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

WithContext method

type GetGroupMemberCountCall Uses

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

GetGroupMemberCountCall type

func (*GetGroupMemberCountCall) Do Uses

func (call *GetGroupMemberCountCall) Do() (*MemberCountResponse, error)

Do method

func (*GetGroupMemberCountCall) WithContext Uses

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

WithContext method

type GetGroupMemberIDsCall Uses

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

GetGroupMemberIDsCall type

func (*GetGroupMemberIDsCall) Do Uses

func (call *GetGroupMemberIDsCall) Do() (*MemberIDsResponse, error)

Do method

func (*GetGroupMemberIDsCall) NewScanner Uses

func (call *GetGroupMemberIDsCall) NewScanner() *IDsScanner

NewScanner returns Group IDs scanner.

func (*GetGroupMemberIDsCall) WithContext Uses

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

WithContext method

type GetGroupMemberProfileCall Uses

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

GetGroupMemberProfileCall type

func (*GetGroupMemberProfileCall) Do Uses

func (call *GetGroupMemberProfileCall) Do() (*UserProfileResponse, error)

Do method

func (*GetGroupMemberProfileCall) WithContext Uses

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

WithContext method

type GetGroupSummaryCall Uses

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

GetGroupSummaryCall type

func (*GetGroupSummaryCall) Do Uses

func (call *GetGroupSummaryCall) Do() (*GroupSummaryResponse, error)

Do method

func (*GetGroupSummaryCall) WithContext Uses

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

WithContext method

type GetLIFFAllCall Uses

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

GetLIFFAllCall type

func (*GetLIFFAllCall) Do Uses

func (call *GetLIFFAllCall) Do() (*LIFFAppsResponse, error)

Do method

func (*GetLIFFAllCall) WithContext Uses

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

WithContext method

type GetMessageConsumptionCall Uses

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

GetMessageConsumptionCall type

func (*GetMessageConsumptionCall) Do Uses

func (call *GetMessageConsumptionCall) Do() (*MessageConsumptionResponse, error)

Do method

func (*GetMessageConsumptionCall) WithContext Uses

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

WithContext method

type GetMessageContentCall Uses

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

GetMessageContentCall type

func (*GetMessageContentCall) Do Uses

func (call *GetMessageContentCall) Do() (*MessageContentResponse, error)

Do method

func (*GetMessageContentCall) WithContext Uses

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

WithContext method

type GetMessageQuotaCall Uses

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

GetMessageQuotaCall type

func (*GetMessageQuotaCall) Do Uses

func (call *GetMessageQuotaCall) Do() (*MessageQuotaResponse, error)

Do method

func (*GetMessageQuotaCall) WithContext Uses

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

WithContext method

type GetNumberFollowersCall Uses

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

GetNumberFollowersCall type

func (*GetNumberFollowersCall) Do Uses

func (call *GetNumberFollowersCall) Do() (*MessagesNumberFollowersResponse, error)

Do method

func (*GetNumberFollowersCall) WithContext Uses

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

WithContext method

type GetNumberMessagesCall Uses

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

GetNumberMessagesCall type

func (*GetNumberMessagesCall) Do Uses

func (call *GetNumberMessagesCall) Do() (*MessagesNumberResponse, error)

Do method

func (*GetNumberMessagesCall) WithContext Uses

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

WithContext method

type GetNumberMessagesDeliveryCall Uses

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

GetNumberMessagesDeliveryCall type

func (*GetNumberMessagesDeliveryCall) Do Uses

func (call *GetNumberMessagesDeliveryCall) Do() (*MessagesNumberDeliveryResponse, error)

Do method

func (*GetNumberMessagesDeliveryCall) WithContext Uses

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

WithContext method

type GetProfileCall Uses

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

GetProfileCall type

func (*GetProfileCall) Do Uses

func (call *GetProfileCall) Do() (*UserProfileResponse, error)

Do method

func (*GetProfileCall) WithContext Uses

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

WithContext method

type GetProgressMessagesCall Uses

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

GetProgressMessagesCall type

func (*GetProgressMessagesCall) Do Uses

func (call *GetProgressMessagesCall) Do() (*MessagesProgressResponse, error)

Do method

func (*GetProgressMessagesCall) WithContext Uses

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

WithContext method

type GetRichMenuCall Uses

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

GetRichMenuCall type

func (*GetRichMenuCall) Do Uses

func (call *GetRichMenuCall) Do() (*RichMenuResponse, error)

Do method

func (*GetRichMenuCall) WithContext Uses

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

WithContext method

type GetRichMenuListCall Uses

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

GetRichMenuListCall type

func (*GetRichMenuListCall) Do Uses

func (call *GetRichMenuListCall) Do() ([]*RichMenuResponse, error)

Do method

func (*GetRichMenuListCall) WithContext Uses

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

WithContext method

type GetRoomMemberCountCall Uses

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

GetRoomMemberCountCall type

func (*GetRoomMemberCountCall) Do Uses

func (call *GetRoomMemberCountCall) Do() (*MemberCountResponse, error)

Do method

func (*GetRoomMemberCountCall) WithContext Uses

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

WithContext method

type GetRoomMemberIDsCall Uses

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

GetRoomMemberIDsCall type

func (*GetRoomMemberIDsCall) Do Uses

func (call *GetRoomMemberIDsCall) Do() (*MemberIDsResponse, error)

Do method

func (*GetRoomMemberIDsCall) NewScanner Uses

func (call *GetRoomMemberIDsCall) NewScanner() *IDsScanner

NewScanner returns Room IDs scanner.

func (*GetRoomMemberIDsCall) WithContext Uses

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

WithContext method

type GetRoomMemberProfileCall Uses

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

GetRoomMemberProfileCall type

func (*GetRoomMemberProfileCall) Do Uses

func (call *GetRoomMemberProfileCall) Do() (*UserProfileResponse, error)

Do method

func (*GetRoomMemberProfileCall) WithContext Uses

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

WithContext method

type GetUserInteractionStatsCall Uses

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

GetUserInteractionStatsCall type

func (*GetUserInteractionStatsCall) Do Uses

func (call *GetUserInteractionStatsCall) Do() (*MessagesUserInteractionStatsResponse, error)

Do method, returns MessagesUserInteractionStatsResponse

func (*GetUserInteractionStatsCall) WithContext Uses

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

WithContext method

type GetUserRichMenuCall Uses

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

GetUserRichMenuCall type

func (*GetUserRichMenuCall) Do Uses

func (call *GetUserRichMenuCall) Do() (*RichMenuResponse, error)

Do method

func (*GetUserRichMenuCall) WithContext Uses

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

WithContext method

type GroupSummaryResponse Uses

type GroupSummaryResponse struct {
    GroupID    string `json:"groupId"`
    GroupName  string `json:"groupName"`
    PictureURL string `json:"pictureUrl"`
}

GroupSummaryResponse type

type IDsScanner Uses

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

IDsScanner type

Code:

bot, err := linebot.New("secret", "token")
if err != nil {
    fmt.Fprintln(os.Stderr, "linebot.New:", err)
}
s := bot.GetGroupMemberIDs("cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "").NewScanner()
for s.Scan() {
    fmt.Fprintln(os.Stdout, s.ID())
}
if err := s.Err(); err != nil {
    fmt.Fprintln(os.Stderr, "GetGroupMemberIDs:", err)
}

func (*IDsScanner) Err Uses

func (s *IDsScanner) Err() error

Err returns scan error.

func (*IDsScanner) ID Uses

func (s *IDsScanner) ID() string

ID returns member id.

func (*IDsScanner) Scan Uses

func (s *IDsScanner) Scan() bool

Scan method

type IconComponent Uses

type IconComponent struct {
    Type        FlexComponentType
    URL         string
    Margin      FlexComponentMarginType
    Size        FlexIconSizeType
    AspectRatio FlexIconAspectRatioType
}

IconComponent type

func (*IconComponent) FlexComponent Uses

func (*IconComponent) FlexComponent()

FlexComponent implements FlexComponent interface

func (*IconComponent) MarshalJSON Uses

func (c *IconComponent) MarshalJSON() ([]byte, error)

MarshalJSON method of IconComponent

type ImageAspectRatioType Uses

type ImageAspectRatioType string

ImageAspectRatioType type

const (
    ImageAspectRatioTypeRectangle ImageAspectRatioType = "rectangle"
    ImageAspectRatioTypeSquare    ImageAspectRatioType = "square"
)

ImageAspectRatioType constants

type ImageCarouselColumn Uses

type ImageCarouselColumn struct {
    ImageURL string         `json:"imageUrl"`
    Action   TemplateAction `json:"action"`
}

ImageCarouselColumn type

func NewImageCarouselColumn Uses

func NewImageCarouselColumn(imageURL string, action TemplateAction) *ImageCarouselColumn

NewImageCarouselColumn function

type ImageCarouselTemplate Uses

type ImageCarouselTemplate struct {
    Columns []*ImageCarouselColumn
}

ImageCarouselTemplate type

func NewImageCarouselTemplate Uses

func NewImageCarouselTemplate(columns ...*ImageCarouselColumn) *ImageCarouselTemplate

NewImageCarouselTemplate function

func (*ImageCarouselTemplate) MarshalJSON Uses

func (t *ImageCarouselTemplate) MarshalJSON() ([]byte, error)

MarshalJSON method of ImageCarouselTemplate

func (*ImageCarouselTemplate) Template Uses

func (*ImageCarouselTemplate) Template()

Template implements Template interface

type ImageComponent Uses

type ImageComponent struct {
    Type            FlexComponentType
    URL             string
    Flex            *int
    Margin          FlexComponentMarginType
    Align           FlexComponentAlignType
    Gravity         FlexComponentGravityType
    Size            FlexImageSizeType
    AspectRatio     FlexImageAspectRatioType
    AspectMode      FlexImageAspectModeType
    BackgroundColor string
    Action          TemplateAction
}

ImageComponent type

func (*ImageComponent) FlexComponent Uses

func (*ImageComponent) FlexComponent()

FlexComponent implements FlexComponent interface

func (*ImageComponent) MarshalJSON Uses

func (c *ImageComponent) MarshalJSON() ([]byte, error)

MarshalJSON method of ImageComponent

func (*ImageComponent) UnmarshalJSON Uses

func (c *ImageComponent) UnmarshalJSON(data []byte) error

UnmarshalJSON method for ImageComponent

type ImageMessage Uses

type ImageMessage struct {
    ID                 string
    OriginalContentURL string
    PreviewImageURL    string
    // contains filtered or unexported fields
}

ImageMessage type

func NewImageMessage Uses

func NewImageMessage(originalContentURL, previewImageURL string) *ImageMessage

NewImageMessage function

func (*ImageMessage) AddEmoji Uses

func (m *ImageMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of ImageMessage

func (*ImageMessage) MarshalJSON Uses

func (m *ImageMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of ImageMessage

func (*ImageMessage) Message Uses

func (*ImageMessage) Message()

Message implements Message interface

func (*ImageMessage) WithQuickReplies Uses

func (m *ImageMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of ImageMessage

func (*ImageMessage) WithSender Uses

func (m *ImageMessage) WithSender(sender *Sender) SendingMessage

WithSender method of ImageMessage

type ImageSizeType Uses

type ImageSizeType string

ImageSizeType type

const (
    ImageSizeTypeCover   ImageSizeType = "cover"
    ImageSizeTypeContain ImageSizeType = "contain"
)

ImageSizeType constants

type ImagemapAction Uses

type ImagemapAction interface {
    json.Marshaler
    ImagemapAction()
}

ImagemapAction type

type ImagemapActionType Uses

type ImagemapActionType string

ImagemapActionType type

const (
    ImagemapActionTypeURI     ImagemapActionType = "uri"
    ImagemapActionTypeMessage ImagemapActionType = "message"
)

ImagemapActionType constants

type ImagemapArea Uses

type ImagemapArea struct {
    X      int `json:"x"`
    Y      int `json:"y"`
    Width  int `json:"width"`
    Height int `json:"height"`
}

ImagemapArea type

type ImagemapBaseSize Uses

type ImagemapBaseSize struct {
    Width  int `json:"width"`
    Height int `json:"height"`
}

ImagemapBaseSize type

type ImagemapMessage Uses

type ImagemapMessage struct {
    BaseURL  string
    AltText  string
    BaseSize ImagemapBaseSize
    Actions  []ImagemapAction
    Video    *ImagemapVideo
    // contains filtered or unexported fields
}

ImagemapMessage type

func NewImagemapMessage Uses

func NewImagemapMessage(baseURL, altText string, baseSize ImagemapBaseSize, actions ...ImagemapAction) *ImagemapMessage

NewImagemapMessage function

func (*ImagemapMessage) AddEmoji Uses

func (m *ImagemapMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of ImagemapMessage

func (*ImagemapMessage) MarshalJSON Uses

func (m *ImagemapMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of ImagemapMessage

func (*ImagemapMessage) Message Uses

func (*ImagemapMessage) Message()

Message implements Message interface

func (*ImagemapMessage) WithQuickReplies Uses

func (m *ImagemapMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of ImagemapMessage

func (*ImagemapMessage) WithSender Uses

func (m *ImagemapMessage) WithSender(sender *Sender) SendingMessage

WithSender method of ImagemapMessage

func (*ImagemapMessage) WithVideo Uses

func (m *ImagemapMessage) WithVideo(video *ImagemapVideo) *ImagemapMessage

WithVideo method

type ImagemapVideo Uses

type ImagemapVideo struct {
    OriginalContentURL string                     `json:"originalContentUrl"`
    PreviewImageURL    string                     `json:"previewImageUrl"`
    Area               ImagemapArea               `json:"area"`
    ExternalLink       *ImagemapVideoExternalLink `json:"externalLink,omitempty"`
}

ImagemapVideo type

type ImagemapVideoExternalLink struct {
    LinkURI string `json:"linkUri"`
    Label   string `json:"label"`
}

ImagemapVideoExternalLink type

type InsightType Uses

type InsightType string

InsightType type

const (
    InsightTypeMessageDelivery      InsightType = "message/delivery"
    InsightTypeUserInteractionStats InsightType = "message/event"
    InsightTypeFollowers            InsightType = "followers"
    InsightTypeDemographic          InsightType = "demographic"
)

InsightType constants

type IssueAccessTokenCall Uses

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

IssueAccessTokenCall type

func (*IssueAccessTokenCall) Do Uses

func (call *IssueAccessTokenCall) Do() (*AccessTokenResponse, error)

Do method

func (*IssueAccessTokenCall) WithContext Uses

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

WithContext method

type IssueAccessTokenV2Call Uses

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

IssueAccessTokenV2Call type

func (*IssueAccessTokenV2Call) Do Uses

func (call *IssueAccessTokenV2Call) Do() (*AccessTokenResponse, error)

Do method

func (*IssueAccessTokenV2Call) WithContext Uses

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

WithContext method

type IssueLinkTokenCall Uses

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

IssueLinkTokenCall type

func (*IssueLinkTokenCall) Do Uses

func (call *IssueLinkTokenCall) Do() (*LinkTokenResponse, error)

Do method

func (*IssueLinkTokenCall) WithContext Uses

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

WithContext method

type LIFFApp Uses

type LIFFApp struct {
    LIFFID string `json:"liffId"`
    View   View   `json:"view"`
}

LIFFApp type

type LIFFAppsResponse Uses

type LIFFAppsResponse struct {
    Apps []LIFFApp `json:"apps"`
}

LIFFAppsResponse type

type LIFFIDResponse Uses

type LIFFIDResponse struct {
    LIFFID string `json:"liffId"`
}

LIFFIDResponse type

type LIFFViewType Uses

type LIFFViewType string

LIFFViewType type

const (
    LIFFViewTypeCompact LIFFViewType = "compact"
    LIFFViewTypeTall    LIFFViewType = "tall"
    LIFFViewTypeFull    LIFFViewType = "full"
)

LIFFViewType constants

type LeaveGroupCall Uses

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

LeaveGroupCall type

func (*LeaveGroupCall) Do Uses

func (call *LeaveGroupCall) Do() (*BasicResponse, error)

Do method

func (*LeaveGroupCall) WithContext Uses

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

WithContext method

type LeaveRoomCall Uses

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

LeaveRoomCall type

func (*LeaveRoomCall) Do Uses

func (call *LeaveRoomCall) Do() (*BasicResponse, error)

Do method

func (*LeaveRoomCall) WithContext Uses

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

WithContext method

type LinkTokenResponse Uses

type LinkTokenResponse struct {
    LinkToken string `json:"linkToken"`
}

LinkTokenResponse type

type LinkUserRichMenuCall Uses

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

LinkUserRichMenuCall type

func (*LinkUserRichMenuCall) Do Uses

func (call *LinkUserRichMenuCall) Do() (*BasicResponse, error)

Do method

func (*LinkUserRichMenuCall) WithContext Uses

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

WithContext method

type LocationAction Uses

type LocationAction struct {
    Label string
}

LocationAction type

func NewLocationAction Uses

func NewLocationAction(label string) *LocationAction

NewLocationAction function

func (*LocationAction) MarshalJSON Uses

func (a *LocationAction) MarshalJSON() ([]byte, error)

MarshalJSON method of LocationAction

func (*LocationAction) QuickReplyAction Uses

func (*LocationAction) QuickReplyAction()

QuickReplyAction implements QuickReplyAction interface

type LocationMessage Uses

type LocationMessage struct {
    ID        string
    Title     string
    Address   string
    Latitude  float64
    Longitude float64
    // contains filtered or unexported fields
}

LocationMessage type

func NewLocationMessage Uses

func NewLocationMessage(title, address string, latitude, longitude float64) *LocationMessage

NewLocationMessage function

func (*LocationMessage) AddEmoji Uses

func (m *LocationMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of LocationMessage

func (*LocationMessage) MarshalJSON Uses

func (m *LocationMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of LocationMessage

func (*LocationMessage) Message Uses

func (*LocationMessage) Message()

Message implements Message interface

func (*LocationMessage) WithQuickReplies Uses

func (m *LocationMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of LocationMessage

func (*LocationMessage) WithSender Uses

func (m *LocationMessage) WithSender(sender *Sender) SendingMessage

WithSender method of LocationMessage

type MemberCountResponse Uses

type MemberCountResponse struct {
    Count int `json:"count"`
}

MemberCountResponse type

type MemberIDsResponse Uses

type MemberIDsResponse struct {
    MemberIDs []string `json:"memberIds"`
    Next      string   `json:"next"`
}

MemberIDsResponse type

type Members Uses

type Members struct {
    Members []EventSource `json:"members"`
}

Members type

type Message Uses

type Message interface {
    Message()
}

Message interface

type MessageAction Uses

type MessageAction struct {
    Label string
    Text  string
}

MessageAction type

func NewMessageAction Uses

func NewMessageAction(label, text string) *MessageAction

NewMessageAction function

func (*MessageAction) MarshalJSON Uses

func (a *MessageAction) MarshalJSON() ([]byte, error)

MarshalJSON method of MessageAction

func (*MessageAction) QuickReplyAction Uses

func (*MessageAction) QuickReplyAction()

QuickReplyAction implements QuickReplyAction interface

func (*MessageAction) TemplateAction Uses

func (*MessageAction) TemplateAction()

TemplateAction implements TemplateAction interface

type MessageConsumptionResponse Uses

type MessageConsumptionResponse struct {
    TotalUsage int64
}

MessageConsumptionResponse type

type MessageContentResponse Uses

type MessageContentResponse struct {
    Content       io.ReadCloser
    ContentLength int64
    ContentType   string
}

MessageContentResponse type

type MessageDetail Uses

type MessageDetail struct {
    Seq                         int64 `json:"seq"`
    Impression                  int64 `json:"impression"`
    MediaPlayed                 int64 `json:"mediaPlayed"`
    MediaPlayed25Percent        int64 `json:"mediaPlayed25Percent"`
    MediaPlayed50Percent        int64 `json:"mediaPlayed50Percent"`
    MediaPlayed75Percent        int64 `json:"mediaPlayed75Percent"`
    MediaPlayed100Percent       int64 `json:"mediaPlayed100Percent"`
    UniqueMediaPlayed           int64 `json:"uniqueMediaPlayed"`
    UniqueMediaPlayed25Percent  int64 `json:"uniqueMediaPlayed25Percent"`
    UniqueMediaPlayed50Percent  int64 `json:"uniqueMediaPlayed50Percent"`
    UniqueMediaPlayed75Percent  int64 `json:"uniqueMediaPlayed75Percent"`
    UniqueMediaPlayed100Percent int64 `json:"uniqueMediaPlayed100Percent"`
}

MessageDetail type

type MessageImagemapAction Uses

type MessageImagemapAction struct {
    Label string
    Text  string
    Area  ImagemapArea
}

MessageImagemapAction type

func NewMessageImagemapAction Uses

func NewMessageImagemapAction(label, text string, area ImagemapArea) *MessageImagemapAction

NewMessageImagemapAction function

func (*MessageImagemapAction) ImagemapAction Uses

func (a *MessageImagemapAction) ImagemapAction()

ImagemapAction implements ImagemapAction interface

func (*MessageImagemapAction) MarshalJSON Uses

func (a *MessageImagemapAction) MarshalJSON() ([]byte, error)

MarshalJSON method of MessageImagemapAction

type MessageQuotaResponse Uses

type MessageQuotaResponse struct {
    Type       string
    Value      int64
    TotalUsage int64 `json:"totalUsage"`
}

MessageQuotaResponse type

type MessageType Uses

type MessageType string

MessageType type

const (
    MessageTypeText     MessageType = "text"
    MessageTypeImage    MessageType = "image"
    MessageTypeVideo    MessageType = "video"
    MessageTypeAudio    MessageType = "audio"
    MessageTypeFile     MessageType = "file"
    MessageTypeLocation MessageType = "location"
    MessageTypeSticker  MessageType = "sticker"
    MessageTypeTemplate MessageType = "template"
    MessageTypeImagemap MessageType = "imagemap"
    MessageTypeFlex     MessageType = "flex"
)

MessageType constants

type MessagesFriendDemographicsResponse Uses

type MessagesFriendDemographicsResponse struct {
    Available           bool                       `json:"available"`
    Genders             []GenderDetail             `json:"genders"`
    Ages                []AgeDetail                `json:"ages"`
    Areas               []AreasDetail              `json:"areas"`
    AppTypes            []AppTypeDetail            `json:"appTypes"`
    SubscriptionPeriods []SubscriptionPeriodDetail `json:"subscriptionPeriods"`
}

MessagesFriendDemographicsResponse type

type MessagesNumberDeliveryResponse Uses

type MessagesNumberDeliveryResponse struct {
    Status          string `json:"status"`
    Broadcast       int64  `json:"broadcast"`
    Targeting       int64  `json:"targeting"`
    AutoResponse    int64  `json:"autoResponse"`
    WelcomeResponse int64  `json:"welcomeResponse"`
    Chat            int64  `json:"chat"`
    APIBroadcast    int64  `json:"apiBroadcast"`
    APIPush         int64  `json:"apiPush"`
    APIMulticast    int64  `json:"apiMulticast"`
    APINarrowcast   int64  `json:"apiNarrowcast"`
    APIReply        int64  `json:"apiReply"`
}

MessagesNumberDeliveryResponse type

type MessagesNumberFollowersResponse Uses

type MessagesNumberFollowersResponse struct {
    Status          string `json:"status"`
    Followers       int64  `json:"followers"`
    TargetedReaches int64  `json:"targetedReaches"`
    Blocks          int64  `json:"blocks"`
}

MessagesNumberFollowersResponse type

type MessagesNumberResponse Uses

type MessagesNumberResponse struct {
    Status  string
    Success int64
}

MessagesNumberResponse type

type MessagesProgressResponse Uses

type MessagesProgressResponse struct {
    Phase             string `json:"phase"`
    SuccessCount      int64  `json:"successCount"`
    FailureCount      int64  `json:"failureCount"`
    TargetCount       int64  `json:"targetCount"`
    FailedDescription string `json:"failedDescription"`
    ErrorCode         int    `json:"errorCode"`
}

MessagesProgressResponse type

type MessagesUserInteractionStatsResponse Uses

type MessagesUserInteractionStatsResponse struct {
    Overview OverviewDetail  `json:"overview"`
    Messages []MessageDetail `json:"messages"`
    Clicks   []ClickDetail   `json:"clicks"`
}

MessagesUserInteractionStatsResponse type

type MulticastCall Uses

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

MulticastCall type

func (*MulticastCall) Do Uses

func (call *MulticastCall) Do() (*BasicResponse, error)

Do method

func (*MulticastCall) WithContext Uses

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

WithContext method

func (*MulticastCall) WithNotificationDisabled Uses

func (call *MulticastCall) WithNotificationDisabled() *MulticastCall

WithNotificationDisabled method will disable push notification

type NarrowcastCall Uses

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

NarrowcastCall type

func (*NarrowcastCall) Do Uses

func (call *NarrowcastCall) Do() (*BasicResponse, error)

Do method

func (*NarrowcastCall) WithContext Uses

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

WithContext method

func (*NarrowcastCall) WithDemographic Uses

func (call *NarrowcastCall) WithDemographic(demographic DemographicFilter) *NarrowcastCall

WithDemographic method will send to specific recipients filter by demographic

func (*NarrowcastCall) WithLimitMax Uses

func (call *NarrowcastCall) WithLimitMax(max int) *NarrowcastCall

WithLimitMax method will set maximum number of recipients

func (*NarrowcastCall) WithRecipient Uses

func (call *NarrowcastCall) WithRecipient(recipient Recipient) *NarrowcastCall

WithRecipient method will send to specific recipient objects

type NarrowcastMessageLimit Uses

type NarrowcastMessageLimit struct {
    Max int `json:"max"`
}

NarrowcastMessageLimit type

type OverviewDetail Uses

type OverviewDetail struct {
    RequestID                   string `json:"requestId"`
    Timestamp                   int64  `json:"timestamp"`
    Delivered                   int64  `json:"delivered"`
    UniqueImpression            int64  `json:"uniqueImpression"`
    UniqueClick                 int64  `json:"uniqueClick"`
    UniqueMediaPlayed           int64  `json:"uniqueMediaPlayed"`
    UniqueMediaPlayed100Percent int64  `json:"uniqueMediaPlayed100Percent"`
}

OverviewDetail type

type Params Uses

type Params struct {
    Date     string `json:"date,omitempty"`
    Time     string `json:"time,omitempty"`
    Datetime string `json:"datetime,omitempty"`
}

Params type

type PeriodType Uses

type PeriodType string

PeriodType type

const (
    PeriodEmpty  PeriodType = ""
    PeriodDay7   PeriodType = "day_7"
    PeriodDay30  PeriodType = "day_30"
    PeriodDay90  PeriodType = "day_90"
    PeriodDay180 PeriodType = "day_180"
    PeriodDay365 PeriodType = "day_365"
)

PeriodType constants

type Postback Uses

type Postback struct {
    Data   string  `json:"data"`
    Params *Params `json:"params,omitempty"`
}

Postback type

type PostbackAction Uses

type PostbackAction struct {
    Label       string
    Data        string
    Text        string
    DisplayText string
}

PostbackAction type

func NewPostbackAction Uses

func NewPostbackAction(label, data, text, displayText string) *PostbackAction

NewPostbackAction function

func (*PostbackAction) MarshalJSON Uses

func (a *PostbackAction) MarshalJSON() ([]byte, error)

MarshalJSON method of PostbackAction

func (*PostbackAction) QuickReplyAction Uses

func (*PostbackAction) QuickReplyAction()

QuickReplyAction implements QuickReplyAction interface

func (*PostbackAction) TemplateAction Uses

func (*PostbackAction) TemplateAction()

TemplateAction implements TemplateAction interface

type ProgressType Uses

type ProgressType string

ProgressType type

const (
    ProgressTypeNarrowcast ProgressType = "narrowcast"
)

ProgressType constants

type PushMessageCall Uses

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

PushMessageCall type

func (*PushMessageCall) Do Uses

func (call *PushMessageCall) Do() (*BasicResponse, error)

Do method

func (*PushMessageCall) WithContext Uses

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

WithContext method

func (*PushMessageCall) WithNotificationDisabled Uses

func (call *PushMessageCall) WithNotificationDisabled() *PushMessageCall

WithNotificationDisabled method will disable push notification

type QuickReplyAction Uses

type QuickReplyAction interface {
    Action
    QuickReplyAction()
}

QuickReplyAction type

type QuickReplyButton Uses

type QuickReplyButton struct {
    ImageURL string
    Action   QuickReplyAction
}

QuickReplyButton type

func NewQuickReplyButton Uses

func NewQuickReplyButton(imageURL string, action QuickReplyAction) *QuickReplyButton

NewQuickReplyButton function

func (*QuickReplyButton) MarshalJSON Uses

func (b *QuickReplyButton) MarshalJSON() ([]byte, error)

MarshalJSON method of QuickReplyButton

type QuickReplyItems Uses

type QuickReplyItems struct {
    Items []*QuickReplyButton `json:"items"`
}

QuickReplyItems struct

func NewQuickReplyItems Uses

func NewQuickReplyItems(buttons ...*QuickReplyButton) *QuickReplyItems

NewQuickReplyItems function

type Recipient Uses

type Recipient interface {
    Recipient()
}

Recipient interface

type RecipientOperator Uses

type RecipientOperator struct {
    ConditionAnd []Recipient `json:"and,omitempty"`
    ConditionOr  []Recipient `json:"or,omitempty"`
    ConditionNot Recipient   `json:"not,omitempty"`
}

RecipientOperator struct

func RecipientOperatorAnd Uses

func RecipientOperatorAnd(conditions ...Recipient) *RecipientOperator

RecipientOperatorAnd method

func RecipientOperatorNot Uses

func RecipientOperatorNot(condition Recipient) *RecipientOperator

RecipientOperatorNot method

func RecipientOperatorOr Uses

func RecipientOperatorOr(conditions ...Recipient) *RecipientOperator

RecipientOperatorOr method

func (*RecipientOperator) MarshalJSON Uses

func (o *RecipientOperator) MarshalJSON() ([]byte, error)

MarshalJSON method of Operator

func (*RecipientOperator) Recipient Uses

func (*RecipientOperator) Recipient()

Recipient implements Recipient interface

type ReplyMessageCall Uses

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

ReplyMessageCall type

func (*ReplyMessageCall) Do Uses

func (call *ReplyMessageCall) Do() (*BasicResponse, error)

Do method

func (*ReplyMessageCall) WithContext Uses

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

WithContext method

func (*ReplyMessageCall) WithNotificationDisabled Uses

func (call *ReplyMessageCall) WithNotificationDisabled() *ReplyMessageCall

WithNotificationDisabled method will disable push notification

type RevokeAccessTokenCall Uses

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

RevokeAccessTokenCall type

func (*RevokeAccessTokenCall) Do Uses

func (call *RevokeAccessTokenCall) Do() (*BasicResponse, error)

Do method

func (*RevokeAccessTokenCall) WithContext Uses

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

WithContext method

type RevokeAccessTokenV2Call Uses

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

RevokeAccessTokenV2Call type

func (*RevokeAccessTokenV2Call) Do Uses

func (call *RevokeAccessTokenV2Call) Do() (*BasicResponse, error)

Do method

func (*RevokeAccessTokenV2Call) WithContext Uses

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

WithContext method

type RichMenu Uses

type RichMenu struct {
    Size        RichMenuSize
    Selected    bool
    Name        string
    ChatBarText string
    Areas       []AreaDetail
}

RichMenu type

type RichMenuAction Uses

type RichMenuAction struct {
    Type    RichMenuActionType `json:"type"`
    URI     string             `json:"uri,omitempty"`
    Text    string             `json:"text,omitempty"`
    Data    string             `json:"data,omitempty"`
    Mode    string             `json:"mode,omitempty"`
    Initial string             `json:"initial,omitempty"`
    Max     string             `json:"max,omitempty"`
    Min     string             `json:"min,omitempty"`
}

RichMenuAction with type

type RichMenuActionType Uses

type RichMenuActionType string

RichMenuActionType type

const (
    RichMenuActionTypeURI            RichMenuActionType = "uri"
    RichMenuActionTypeMessage        RichMenuActionType = "message"
    RichMenuActionTypePostback       RichMenuActionType = "postback"
    RichMenuActionTypeDatetimePicker RichMenuActionType = "datetimepicker"
)

RichMenuActionType constants

type RichMenuBounds Uses

type RichMenuBounds struct {
    X      int `json:"x"`
    Y      int `json:"y"`
    Width  int `json:"width"`
    Height int `json:"height"`
}

RichMenuBounds type

type RichMenuIDResponse Uses

type RichMenuIDResponse struct {
    RichMenuID string `json:"richMenuId"`
}

RichMenuIDResponse type

type RichMenuResponse Uses

type RichMenuResponse struct {
    RichMenuID  string       `json:"richMenuId"`
    Size        RichMenuSize `json:"size"`
    Selected    bool         `json:"selected"`
    Name        string       `json:"name"`
    ChatBarText string       `json:"chatBarText"`
    Areas       []AreaDetail `json:"areas"`
}

RichMenuResponse type

type RichMenuSize Uses

type RichMenuSize struct {
    Width  int `json:"width"`
    Height int `json:"height"`
}

RichMenuSize type

type Sender Uses

type Sender struct {
    Name    string
    IconURL string
}

Sender type

func NewSender Uses

func NewSender(name, iconURL string) *Sender

NewSender function

func (*Sender) MarshalJSON Uses

func (s *Sender) MarshalJSON() ([]byte, error)

MarshalJSON method of QuickReplyButton

type SendingMessage Uses

type SendingMessage interface {
    Message
    WithQuickReplies(*QuickReplyItems) SendingMessage
    WithSender(*Sender) SendingMessage
    AddEmoji(emoji *Emoji) SendingMessage
}

SendingMessage interface

type SeparatorComponent Uses

type SeparatorComponent struct {
    Type   FlexComponentType
    Margin FlexComponentMarginType
    Color  string
}

SeparatorComponent type

func (*SeparatorComponent) FlexComponent Uses

func (*SeparatorComponent) FlexComponent()

FlexComponent implements FlexComponent interface

func (*SeparatorComponent) MarshalJSON Uses

func (c *SeparatorComponent) MarshalJSON() ([]byte, error)

MarshalJSON method of SeparatorComponent

type SetDefaultRichMenuCall Uses

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

SetDefaultRichMenuCall type

func (*SetDefaultRichMenuCall) Do Uses

func (call *SetDefaultRichMenuCall) Do() (*BasicResponse, error)

Do method

func (*SetDefaultRichMenuCall) WithContext Uses

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

WithContext method

type SpacerComponent Uses

type SpacerComponent struct {
    Type FlexComponentType
    Size FlexSpacerSizeType
}

SpacerComponent type

func (*SpacerComponent) FlexComponent Uses

func (*SpacerComponent) FlexComponent()

FlexComponent implements FlexComponent interface

func (*SpacerComponent) MarshalJSON Uses

func (c *SpacerComponent) MarshalJSON() ([]byte, error)

MarshalJSON method of SpacerComponent

type StickerMessage Uses

type StickerMessage struct {
    ID                  string
    PackageID           string
    StickerID           string
    StickerResourceType StickerResourceType
    // contains filtered or unexported fields
}

StickerMessage type

func NewStickerMessage Uses

func NewStickerMessage(packageID, stickerID string) *StickerMessage

NewStickerMessage function

func (*StickerMessage) AddEmoji Uses

func (m *StickerMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of StickerMessage

func (*StickerMessage) MarshalJSON Uses

func (m *StickerMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of StickerMessage

func (*StickerMessage) Message Uses

func (*StickerMessage) Message()

Message implements Message interface

func (*StickerMessage) WithQuickReplies Uses

func (m *StickerMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of StickerMessage

func (*StickerMessage) WithSender Uses

func (m *StickerMessage) WithSender(sender *Sender) SendingMessage

WithSender method of StickerMessage

type StickerResourceType Uses

type StickerResourceType string

StickerResourceType type

const (
    StickerResourceTypeStatic         StickerResourceType = "STATIC"
    StickerResourceTypeAnimation      StickerResourceType = "ANIMATION"
    StickerResourceTypeSound          StickerResourceType = "SOUND"
    StickerResourceTypeAnimationSound StickerResourceType = "ANIMATION_SOUND"
    StickerResourceTypePerStickerText StickerResourceType = "PER_STICKER_TEXT"
    StickerResourceTypePopup          StickerResourceType = "POPUP"
    StickerResourceTypePopupSound     StickerResourceType = "POPUP_SOUND"
    StickerResourceTypeNameText       StickerResourceType = "NAME_TEXT"
)

StickerResourceType constants

type SubscriptionPeriodDetail Uses

type SubscriptionPeriodDetail struct {
    SubscriptionPeriod string  `json:"subscriptionPeriod"`
    Percentage         float64 `json:"percentage"`
}

SubscriptionPeriodDetail type

type SubscriptionPeriodFilter Uses

type SubscriptionPeriodFilter struct {
    Type string     `json:"type"`
    GTE  PeriodType `json:"gte,omitempty"` // greater than or equal to
    LT   PeriodType `json:"lt,omitempty"`  // less than
}

SubscriptionPeriodFilter type

func NewSubscriptionPeriodFilter Uses

func NewSubscriptionPeriodFilter(gte, lt PeriodType) *SubscriptionPeriodFilter

NewSubscriptionPeriodFilter function

func (*SubscriptionPeriodFilter) DemographicFilter Uses

func (*SubscriptionPeriodFilter) DemographicFilter()

DemographicFilter implements DemographicFilter interface

type Template Uses

type Template interface {
    json.Marshaler
    Template()
}

Template interface

type TemplateAction Uses

type TemplateAction interface {
    Action
    TemplateAction()
}

TemplateAction interface

type TemplateMessage Uses

type TemplateMessage struct {
    AltText  string
    Template Template
    // contains filtered or unexported fields
}

TemplateMessage type

func NewTemplateMessage Uses

func NewTemplateMessage(altText string, template Template) *TemplateMessage

NewTemplateMessage function

func (*TemplateMessage) AddEmoji Uses

func (m *TemplateMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of TemplateMessage

func (*TemplateMessage) MarshalJSON Uses

func (m *TemplateMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of TemplateMessage

func (*TemplateMessage) Message Uses

func (*TemplateMessage) Message()

Message implements Message interface

func (*TemplateMessage) WithQuickReplies Uses

func (m *TemplateMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of TemplateMessage

func (*TemplateMessage) WithSender Uses

func (m *TemplateMessage) WithSender(sender *Sender) SendingMessage

WithSender method of TemplateMessage

type TemplateType Uses

type TemplateType string

TemplateType type

const (
    TemplateTypeButtons       TemplateType = "buttons"
    TemplateTypeConfirm       TemplateType = "confirm"
    TemplateTypeCarousel      TemplateType = "carousel"
    TemplateTypeImageCarousel TemplateType = "image_carousel"
)

TemplateType constants

type TextComponent Uses

type TextComponent struct {
    Type       FlexComponentType
    Text       string
    Flex       *int
    Margin     FlexComponentMarginType
    Size       FlexTextSizeType
    Align      FlexComponentAlignType
    Gravity    FlexComponentGravityType
    Wrap       bool
    Weight     FlexTextWeightType
    Color      string
    Action     TemplateAction
    Style      FlexTextStyleType
    Decoration FlexTextDecorationType
}

TextComponent type

func (*TextComponent) FlexComponent Uses

func (*TextComponent) FlexComponent()

FlexComponent implements FlexComponent interface

func (*TextComponent) MarshalJSON Uses

func (c *TextComponent) MarshalJSON() ([]byte, error)

MarshalJSON method of TextComponent

func (*TextComponent) UnmarshalJSON Uses

func (c *TextComponent) UnmarshalJSON(data []byte) error

UnmarshalJSON method for TextComponent

type TextMessage Uses

type TextMessage struct {
    ID     string
    Text   string
    Emojis []*Emoji
    // contains filtered or unexported fields
}

TextMessage type

func NewTextMessage Uses

func NewTextMessage(content string) *TextMessage

NewTextMessage function

func (*TextMessage) AddEmoji Uses

func (m *TextMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of TextMessage

func (*TextMessage) MarshalJSON Uses

func (m *TextMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of TextMessage

func (*TextMessage) Message Uses

func (*TextMessage) Message()

Message implements Message interface

func (*TextMessage) WithQuickReplies Uses

func (m *TextMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of TextMessage

func (*TextMessage) WithSender Uses

func (m *TextMessage) WithSender(sender *Sender) SendingMessage

WithSender method of TextMessage

type Things Uses

type Things struct {
    DeviceID string
    Type     string
    Result   *ThingsResult
}

Things type

type ThingsActionResult Uses

type ThingsActionResult struct {
    Type ThingsActionResultType
    Data []byte
}

ThingsActionResult type

type ThingsActionResultType Uses

type ThingsActionResultType string

ThingsActionResultType type

const (
    ThingsActionResultTypeBinary ThingsActionResultType = "binary"
    ThingsActionResultTypeVoid   ThingsActionResultType = "void"
)

ThingsActionResultType contants

type ThingsResult Uses

type ThingsResult struct {
    ScenarioID             string
    Revision               int
    StartTime              int64
    EndTime                int64
    ResultCode             ThingsResultCode
    ActionResults          []*ThingsActionResult
    BLENotificationPayload []byte
    ErrorReason            string
}

ThingsResult type

type ThingsResultCode Uses

type ThingsResultCode string

ThingsResultCode type

const (
    ThingsResultCodeSuccess      ThingsResultCode = "success"
    ThingsResultCodeGattError    ThingsResultCode = "gatt_error"
    ThingsResultCodeRuntimeError ThingsResultCode = "runtime_error"
)

ThingsResultCode constsnts

type URIAction Uses

type URIAction struct {
    Label  string
    URI    string
    AltURI *URIActionAltURI
}

URIAction type

func NewURIAction Uses

func NewURIAction(label, uri string) *URIAction

NewURIAction function

func (*URIAction) MarshalJSON Uses

func (a *URIAction) MarshalJSON() ([]byte, error)

MarshalJSON method of URIAction

func (*URIAction) TemplateAction Uses

func (*URIAction) TemplateAction()

TemplateAction implements TemplateAction interface

type URIActionAltURI Uses

type URIActionAltURI struct {
    Desktop string `json:"desktop"`
}

URIActionAltURI type

type URIImagemapAction Uses

type URIImagemapAction struct {
    Label   string
    LinkURL string
    Area    ImagemapArea
}

URIImagemapAction type

func NewURIImagemapAction Uses

func NewURIImagemapAction(label, linkURL string, area ImagemapArea) *URIImagemapAction

NewURIImagemapAction function

func (*URIImagemapAction) ImagemapAction Uses

func (a *URIImagemapAction) ImagemapAction()

ImagemapAction implements ImagemapAction interface

func (*URIImagemapAction) MarshalJSON Uses

func (a *URIImagemapAction) MarshalJSON() ([]byte, error)

MarshalJSON method of URIImagemapAction

type UnlinkUserRichMenuCall Uses

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

UnlinkUserRichMenuCall type

func (*UnlinkUserRichMenuCall) Do Uses

func (call *UnlinkUserRichMenuCall) Do() (*BasicResponse, error)

Do method

func (*UnlinkUserRichMenuCall) WithContext Uses

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

WithContext method

type UpdateLIFFCall Uses

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

UpdateLIFFCall type

func (*UpdateLIFFCall) Do Uses

func (call *UpdateLIFFCall) Do() (*BasicResponse, error)

Do method

func (*UpdateLIFFCall) WithContext Uses

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

WithContext method

type UploadRichMenuImageCall Uses

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

UploadRichMenuImageCall type

func (*UploadRichMenuImageCall) Do Uses

func (call *UploadRichMenuImageCall) Do() (*BasicResponse, error)

Do method

func (*UploadRichMenuImageCall) WithContext Uses

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

WithContext method

type UserProfileResponse Uses

type UserProfileResponse struct {
    UserID        string `json:"userId"`
    DisplayName   string `json:"displayName"`
    PictureURL    string `json:"pictureUrl"`
    StatusMessage string `json:"statusMessage"`
    Language      string `json:"language"`
}

UserProfileResponse type

type VideoMessage Uses

type VideoMessage struct {
    ID                 string
    OriginalContentURL string
    PreviewImageURL    string
    // contains filtered or unexported fields
}

VideoMessage type

func NewVideoMessage Uses

func NewVideoMessage(originalContentURL, previewImageURL string) *VideoMessage

NewVideoMessage function

func (*VideoMessage) AddEmoji Uses

func (m *VideoMessage) AddEmoji(emoji *Emoji) SendingMessage

AddEmoji method of VideoMessage

func (*VideoMessage) MarshalJSON Uses

func (m *VideoMessage) MarshalJSON() ([]byte, error)

MarshalJSON method of VideoMessage

func (*VideoMessage) Message Uses

func (*VideoMessage) Message()

Message implements Message interface

func (*VideoMessage) WithQuickReplies Uses

func (m *VideoMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage

WithQuickReplies method of VideoMessage

func (*VideoMessage) WithSender Uses

func (m *VideoMessage) WithSender(sender *Sender) SendingMessage

WithSender method of VideoMessage

type View Uses

type View struct {
    Type LIFFViewType `json:"type"`
    URL  string       `json:"url"`
}

View type

type ViewRequest Uses

type ViewRequest struct {
    View View `json:"view"`
}

ViewRequest type

Directories

PathSynopsis
httphandler

Package linebot imports 17 packages (graph) and is imported by 33 packages. Updated 2020-07-31. Refresh now. Tools for package owners.