puppethostie

package
v0.0.0-...-6b858f3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// WechatyPuppetHostieToken ...
	WechatyPuppetHostieToken string
	// WechatyPuppetHostieEndpoint ...
	WechatyPuppetHostieEndpoint string
)
View Source
var ErrNoEndpoint = errors.New("no endpoint")

ErrNoEndpoint err no endpoint

View Source
var (
	// ErrNotToken token not found error
	ErrNotToken = errors.New("wechaty-puppet-hostie: token not found. See: <https://wechaty-puppet-hostie#1-wechaty_puppet_hostie_token>")
)

Functions

This section is empty.

Types

type HostieEndPoint

type HostieEndPoint struct {
	IP   string `json:"ip"`
	Port int    `json:"port,omitempty"`
}

HostieEndPoint api.chatie.io endpoint api response

func (*HostieEndPoint) IsValid

func (p *HostieEndPoint) IsValid() bool

IsValid EndPoint is valid

func (*HostieEndPoint) Target

func (p *HostieEndPoint) Target() string

Target Export IP+Port

type PuppetHostie

type PuppetHostie struct {
	*wechatyPuppet.Puppet
	// contains filtered or unexported fields
}

PuppetHostie struct

func NewPuppetHostie

func NewPuppetHostie(o wechatyPuppet.Option) (*PuppetHostie, error)

NewPuppetHostie new PuppetHostie struct

func (*PuppetHostie) ContactAlias

func (p *PuppetHostie) ContactAlias(contactID string) (string, error)

ContactAlias ...

func (*PuppetHostie) ContactAvatar

func (p *PuppetHostie) ContactAvatar(contactID string) (*file_box.FileBox, error)

ContactAvatar ...

func (*PuppetHostie) ContactList

func (p *PuppetHostie) ContactList() ([]string, error)

ContactList ...

func (*PuppetHostie) ContactQRCode

func (p *PuppetHostie) ContactQRCode(contactID string) (string, error)

ContactQRCode ...

func (*PuppetHostie) ContactRawPayload

func (p *PuppetHostie) ContactRawPayload(contactID string) (*schemas.ContactPayload, error)

ContactRawPayload ...

func (*PuppetHostie) ContactSelfQRCode

func (p *PuppetHostie) ContactSelfQRCode() (string, error)

ContactSelfQRCode ...

func (*PuppetHostie) Ding

func (p *PuppetHostie) Ding(data string)

Ding ...

func (*PuppetHostie) FriendshipAccept

func (p *PuppetHostie) FriendshipAccept(friendshipID string) (err error)

FriendshipAccept ...

func (*PuppetHostie) FriendshipAdd

func (p *PuppetHostie) FriendshipAdd(contactID, hello string) (err error)

FriendshipAdd ...

func (*PuppetHostie) FriendshipRawPayload

func (p *PuppetHostie) FriendshipRawPayload(id string) (*schemas.FriendshipPayload, error)

FriendshipRawPayload ...

func (*PuppetHostie) FriendshipSearchPhone

func (p *PuppetHostie) FriendshipSearchPhone(phone string) (string, error)

FriendshipSearchPhone ...

func (*PuppetHostie) FriendshipSearchWeixin

func (p *PuppetHostie) FriendshipSearchWeixin(weixin string) (string, error)

FriendshipSearchWeixin ...

func (*PuppetHostie) Logout

func (p *PuppetHostie) Logout() error

Logout ...

func (*PuppetHostie) MessageContact

func (p *PuppetHostie) MessageContact(messageID string) (string, error)

MessageContact ...

func (*PuppetHostie) MessageFile

func (p *PuppetHostie) MessageFile(id string) (*file_box.FileBox, error)

MessageFile ...

func (*PuppetHostie) MessageImage

func (p *PuppetHostie) MessageImage(messageID string, imageType schemas.ImageType) (*file_box.FileBox, error)

MessageImage ...

func (*PuppetHostie) MessageMiniProgram

func (p *PuppetHostie) MessageMiniProgram(messageID string) (*schemas.MiniProgramPayload, error)

MessageMiniProgram ...

func (*PuppetHostie) MessageRawPayload

func (p *PuppetHostie) MessageRawPayload(id string) (*schemas.MessagePayload, error)

MessageRawPayload ...

func (*PuppetHostie) MessageRecall

func (p *PuppetHostie) MessageRecall(messageID string) (bool, error)

MessageRecall ...

func (*PuppetHostie) MessageSendContact

func (p *PuppetHostie) MessageSendContact(conversationID string, contactID string) (string, error)

MessageSendContact ...

func (*PuppetHostie) MessageSendFile

func (p *PuppetHostie) MessageSendFile(conversationID string, fileBox *file_box.FileBox) (string, error)

MessageSendFile ...

func (*PuppetHostie) MessageSendMiniProgram

func (p *PuppetHostie) MessageSendMiniProgram(conversationID string, miniProgramPayload *schemas.MiniProgramPayload) (string, error)

MessageSendMiniProgram ...

func (*PuppetHostie) MessageSendText

func (p *PuppetHostie) MessageSendText(conversationID string, text string, mentionIDList ...string) (string, error)

MessageSendText ...

func (*PuppetHostie) MessageSendURL

func (p *PuppetHostie) MessageSendURL(conversationID string, urlLinkPayload *schemas.UrlLinkPayload) (string, error)

MessageSendURL ...

func (*PuppetHostie) MessageURL

func (p *PuppetHostie) MessageURL(messageID string) (*schemas.UrlLinkPayload, error)

MessageURL ...

func (*PuppetHostie) RoomAdd

func (p *PuppetHostie) RoomAdd(roomID, contactID string) error

RoomAdd ...

func (*PuppetHostie) RoomAnnounce

func (p *PuppetHostie) RoomAnnounce(roomID string) (string, error)

RoomAnnounce ...

func (*PuppetHostie) RoomAvatar

func (p *PuppetHostie) RoomAvatar(roomID string) (*file_box.FileBox, error)

RoomAvatar ...

func (*PuppetHostie) RoomCreate

func (p *PuppetHostie) RoomCreate(contactIDList []string, topic string) (string, error)

RoomCreate ...

func (*PuppetHostie) RoomDel

func (p *PuppetHostie) RoomDel(roomID, contactID string) error

RoomDel ...

func (*PuppetHostie) RoomInvitationAccept

func (p *PuppetHostie) RoomInvitationAccept(roomInvitationID string) error

RoomInvitationAccept ...

func (*PuppetHostie) RoomInvitationRawPayload

func (p *PuppetHostie) RoomInvitationRawPayload(id string) (*schemas.RoomInvitationPayload, error)

RoomInvitationRawPayload ...

func (*PuppetHostie) RoomList

func (p *PuppetHostie) RoomList() ([]string, error)

RoomList ...

func (*PuppetHostie) RoomMemberList

func (p *PuppetHostie) RoomMemberList(roomID string) ([]string, error)

RoomMemberList ...

func (*PuppetHostie) RoomMemberRawPayload

func (p *PuppetHostie) RoomMemberRawPayload(roomID string, contactID string) (*schemas.RoomMemberPayload, error)

RoomMemberRawPayload ...

func (*PuppetHostie) RoomQRCode

func (p *PuppetHostie) RoomQRCode(roomID string) (string, error)

RoomQRCode ...

func (*PuppetHostie) RoomQuit

func (p *PuppetHostie) RoomQuit(roomID string) error

RoomQuit ...

func (*PuppetHostie) RoomRawPayload

func (p *PuppetHostie) RoomRawPayload(id string) (*schemas.RoomPayload, error)

RoomRawPayload ...

func (*PuppetHostie) RoomTopic

func (p *PuppetHostie) RoomTopic(roomID string) (string, error)

RoomTopic ...

func (*PuppetHostie) SetContactAlias

func (p *PuppetHostie) SetContactAlias(contactID string, alias string) error

SetContactAlias ...

func (*PuppetHostie) SetContactAvatar

func (p *PuppetHostie) SetContactAvatar(contactID string, fileBox *file_box.FileBox) error

SetContactAvatar ...

func (*PuppetHostie) SetContactSelfName

func (p *PuppetHostie) SetContactSelfName(name string) error

SetContactSelfName ...

func (*PuppetHostie) SetContactSelfSignature

func (p *PuppetHostie) SetContactSelfSignature(signature string) error

SetContactSelfSignature ...

func (*PuppetHostie) SetRoomAnnounce

func (p *PuppetHostie) SetRoomAnnounce(roomID, text string) error

SetRoomAnnounce ...

func (*PuppetHostie) SetRoomTopic

func (p *PuppetHostie) SetRoomTopic(roomID string, topic string) error

SetRoomTopic ...

func (*PuppetHostie) Start

func (p *PuppetHostie) Start() (err error)

Start ...

func (*PuppetHostie) Stop

func (p *PuppetHostie) Stop()

Stop ...

func (*PuppetHostie) TagContactAdd

func (p *PuppetHostie) TagContactAdd(id, contactID string) (err error)

TagContactAdd ...

func (*PuppetHostie) TagContactDelete

func (p *PuppetHostie) TagContactDelete(id string) (err error)

TagContactDelete ...

func (*PuppetHostie) TagContactList

func (p *PuppetHostie) TagContactList(contactID string) ([]string, error)

TagContactList ...

func (*PuppetHostie) TagContactRemove

func (p *PuppetHostie) TagContactRemove(id, contactID string) (err error)

TagContactRemove ...

Jump to

Keyboard shortcuts

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