echo

package module
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

README

echo

forward group notifications

Blaze

接收入群消息,然后自动发 token 给拉机器人进群的人

Server
POST https://echo.yiplee.com/message

Header:

Authorization: Bearer access_token

Params:

{
   "category": "Plain_Text",
   "data": "base64 msg data"
}
Rate Limit

一分钟一百个请求

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute added in v1.1.1

func Execute(ctx context.Context, method, uri string, body interface{}) ([]byte, error)

Execute execute a request

func Get added in v1.1.1

func Get(ctx context.Context, uri string) ([]byte, error)

Get execute a get request

func ParseToken

func ParseToken(token string, sessionID string) (string, error)

ParseToken parse the jwt token

func SendMessage added in v1.1.1

func SendMessage(ctx context.Context, token string, payload Payload) error

SendMessage send a message

func SignToken

func SignToken(userID, sessionID, conversationID string) (string, error)

SignToken sign a jwt token

Types

type Payload added in v1.1.0

type Payload struct {
	MessageID   string `json:"message_id,omitempty"`
	RecipientID string `json:"recipient_id,omitempty"`
	Category    string `json:"category,omitempty"`
	Data        string `json:"data,omitempty"`
}

Payload represent message content leave RecipientID empty to broadcast

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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