liff

package
v0.0.0-...-7b38ca7 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	LiffID string `json:"liffId"`
	AppOption
}

type AppOption

type AppOption struct {
	View     View    `json:"view"`
	Features Feature `json:"features"`
}

type Apps

type Apps struct {
	Apps []App
}

func (*Apps) StringArray

func (apps *Apps) StringArray() [][]string

type Feature

type Feature struct {
	Ble bool `json:"ble"`
}

type LIFFClient

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

func NewLIFFClient

func NewLIFFClient(token string) *LIFFClient

func (*LIFFClient) Add

func (liff *LIFFClient) Add(option *AppOption) (*LIFFIDResponse, error)

func (*LIFFClient) Delete

func (liff *LIFFClient) Delete(liffID string) error

func (*LIFFClient) GetLineAccessToken

func (liff *LIFFClient) GetLineAccessToken() string

func (*LIFFClient) List

func (liff *LIFFClient) List() (*Apps, error)

func (LIFFClient) NewAppOption

func (_ LIFFClient) NewAppOption(description, liffType, liffURL string, ble bool) (*AppOption, error)

func (LIFFClient) NewPushMessage

func (_ LIFFClient) NewPushMessage(liffID, userID string) *PushMessage

func (*LIFFClient) Send

func (liff *LIFFClient) Send(pushMessage *PushMessage) error

func (*LIFFClient) Update

func (liff *LIFFClient) Update(liffID string, option *AppOption) error

type LIFFIDResponse

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

type Message

type Message struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

type PushMessage

type PushMessage struct {
	To       string    `json:"to"`
	Messages []Message `json:"messages"`
}

type View

type View struct {
	Description string   `json:"description"`
	Type        ViewType `json:"type"`
	URL         string   `json:"url"`
}

type ViewType

type ViewType int
const (
	Full ViewType = iota + 1
	Tall
	Compact
)

func NewViewType

func NewViewType(viewType string) (ViewType, error)

func (ViewType) MarshalJSON

func (v ViewType) MarshalJSON() ([]byte, error)

Marshal時の動作を定義します

func (ViewType) String

func (v ViewType) String() string

func (*ViewType) UnmarshalJSON

func (v *ViewType) UnmarshalJSON(data []byte) error

Unmarshal時の動作を定義します

Jump to

Keyboard shortcuts

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