Documentation ¶
Index ¶
- Constants
- func BrotliDecompress(data []byte) ([]byte, error)
- func MessageID() string
- func NewToken(phone int, password string) (string, error)
- func SafeMessage(msg string) string
- type Client
- type FMAdmin
- type FMChannel
- type FMCreator
- type FMGift
- type FMInfo
- type FMJoin
- type FMMedal
- type FMMembers
- type FMMessage
- type FMNoble
- type FMPK
- type FMQuestion
- type FMRankMember
- type FMResp
- type FMRoom
- type FMStatistics
- type FMStatus
- type FMSuperFan
- type FMTarget
- type FMTitle
- type FMUser
- type SendResp
Constants ¶
View Source
const ( FM_SESS int = iota FM_SESS_SIG TOKEN )
View Source
const ( UserInfoUrl = "https://fm.missevan.com/api/user/info" LoginUrl = "https://app.missevan.com/member/login" MessageSendUrl = "https://fm.missevan.com/api/chatroom/message/send" WebsocketUrl = "wss://im.missevan.com/ws" LiveOnlineUrl = "https://fm.missevan.com/api/v2/chatroom/online" )
View Source
const ( MessagesSize = 100 CookieSize = 3 )
View Source
const ( TypeRoom = "room" TypeCreator = "creator" TypeGift = "gift" TypeMessage = "message" TypeNotify = "notify" TypeMember = "member" TypeChannel = "channel" TypeQuestion = "question" TypeNoble = "noble" TypePK = "pk" TypeSuperFan = "super_fan" )
View Source
const ( EventSend = "send" // gift send. EventNew = "new" // new message received. EventStatistic = "statistics" // statistics of the live room. EventJoin = "join" // connect to the live room channel. EventJoinQueue = "join_queue" // members join the live room. EventFollowed = "followed" // user followed the room creator. EventOpen = "open" // the live room opened. EventClose = "close" // the live room closed. EventNewRank = "new_rank" // the new rank information of the live room. EventLeave = "leave" // user leaved the live room. EventAddAdmin = "add_admin" // add a room admin. EventRemoveAdmin = "remove_admin" // Remove a room admin. EventRemoveMute = "remove_mute" // unmute a user in the live room. EventAsk = "ask" // ask a question. EventAnswer = "answer" // answer a question. EventConnect = "connect" // connect to the live room. EventUpdate = "update" EventStart = "start" EventFinish = "finish" EventLastHourRank = "last_hour_rank" // the last hour rank information of the live room. EventRenewal = "renewal" // 续费(超粉、贵族)事件 EventRegistration = "registration" // EventHorn = "horn" // horn message )
Event defines the message events.
Variables ¶
This section is empty.
Functions ¶
func BrotliDecompress ¶
func SafeMessage ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetUserInfo ¶
func (*Client) NewRequest ¶
type FMGift ¶
type FMGift struct { GiftID int64 `json:"gift_id"` Name string `json:"name"` Price int64 `json:"price"` Number int64 `json:"num"` EffectURL string `json:"effect_url"` WebEffectURL string `json:"web_effect_url"` }
FmGift represents the information of gift.
type FMJoin ¶
type FMJoin struct { Contribution int64 `json:"contribution"` IconUrl string `json:"iconurl"` Titles []FMTitle `json:"titles"` UserID int64 `json:"user_id"` Username string `json:"username"` }
FmJoin represents basic information of the user who is joining.
type FMMessage ¶
type FMMessage struct { Type string `json:"type"` Event string `json:"event"` NotifyType string `json:"notify_type"` RoomID int64 `json:"room_id"` Message string `json:"message"` MessageID string `json:"msg_id"` User *FMUser `json:"user"` Queue []*FMJoin `json:"queue"` Noble *FMNoble `json:"noble"` SuperFan *FMSuperFan `json:"super_fan"` Info *FMInfo `json:"info"` Gift *FMGift `json:"gift"` Lucky *FMGift `json:"lucky"` Target *FMTarget `json:"target"` Statistics *FMStatistics `json:"statistics"` PK *FMPK `json:"pk"` Question *FMQuestion `json:"question"` }
type FMQuestion ¶
type FMRankMember ¶
type FMRoom ¶
type FMRoom struct { RoomID int64 `json:"room_id"` // 直播间ID Name string `json:"name"` // 直播间名 Announcement string `json:"announcement"` // 公告 Members *FMMembers `json:"members"` // 直播间成员 Statistics *FMStatistics `json:"statistics"` // 统计数据 Status *FMStatus `json:"status"` // 状态信息 CatalogID int64 `json:"catalog_id"` // 子分区ID GuildID int64 `json:"guild_id"` // 公会ID Medal FMMedal `json:"medal"` Background struct { Enable bool `json:"enable"` ImageURL string `json:"image_url"` Opacity float64 `json:"opacity"` } `json:"background"` // 背景图 }
type FMStatistics ¶
type FMSuperFan ¶
type FMSuperFan struct {
Num int64 `json:"num"`
}
Click to show internal directories.
Click to hide internal directories.