chat

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package chat 群会话管理

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(ctx *dingding.App, payload []byte) (resp []byte, err error)

创建会话

See: https://ding-doc.dingtalk.com/doc#/serverapi2/fg9dze

POST https://oapi.dingtalk.com/chat/create?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/dingding"
	"github.com/fastwego/dingding/apis/chat"
)

func main() {
	var ctx *dingding.App

	payload := []byte("{}")
	resp, err := chat.Create(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func FriendSwitchUpdate

func FriendSwitchUpdate(ctx *dingding.App, payload []byte) (resp []byte, err error)

设置禁止群成员私聊

See: https://ding-doc.dingtalk.com/doc#/serverapi2/zb74qt

POST https://oapi.dingtalk.com/topapi/chat/member/friendswitch/update?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/dingding"
	"github.com/fastwego/dingding/apis/chat"
)

func main() {
	var ctx *dingding.App

	payload := []byte("{}")
	resp, err := chat.FriendSwitchUpdate(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func Get

func Get(ctx *dingding.App) (resp []byte, err error)

获取会话

See: https://ding-doc.dingtalk.com/doc#/serverapi2/kruhy0

GET https://oapi.dingtalk.com/chat/get?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/dingding"
	"github.com/fastwego/dingding/apis/chat"
)

func main() {
	var ctx *dingding.App

	resp, err := chat.Get(ctx)

	fmt.Println(resp, err)
}
Output:

func SubadminUpdate

func SubadminUpdate(ctx *dingding.App, payload []byte) (resp []byte, err error)

设置群管理员

See: https://ding-doc.dingtalk.com/doc#/serverapi2/leqbe8

POST https://oapi.dingtalk.com/topapi/chat/subadmin/update?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/dingding"
	"github.com/fastwego/dingding/apis/chat"
)

func main() {
	var ctx *dingding.App

	payload := []byte("{}")
	resp, err := chat.SubadminUpdate(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func Update

func Update(ctx *dingding.App, payload []byte) (resp []byte, err error)

修改会话

See: https://ding-doc.dingtalk.com/doc#/serverapi2/lewq17

POST https://oapi.dingtalk.com/chat/update?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/dingding"
	"github.com/fastwego/dingding/apis/chat"
)

func main() {
	var ctx *dingding.App

	payload := []byte("{}")
	resp, err := chat.Update(ctx, payload)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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