Documentation ¶
Overview ¶
Package app 应用管理
Index ¶
- func AgentGet(ctx *corporation.App, params url.Values) (resp []byte, err error)
- func AgentList(ctx *corporation.App) (resp []byte, err error)
- func AgentSet(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func GetWorkbenchTemplate(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func MenuCreate(ctx *corporation.App, payload []byte, params url.Values) (resp []byte, err error)
- func MenuDelete(ctx *corporation.App, params url.Values) (resp []byte, err error)
- func MenuGet(ctx *corporation.App, params url.Values) (resp []byte, err error)
- func SetWorkbenchData(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func SetWorkbenchTemplate(ctx *corporation.App, payload []byte) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentGet ¶
获取指定的应用详情
See: https://work.weixin.qq.com/api/doc/90000/90135/90227
GET https://qyapi.weixin.qq.com/cgi-bin/agent/get?access_token=ACCESS_TOKEN&agentid=AGENTID参数说明
Example ¶
package main import ( "fmt" "net/url" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App params := url.Values{} resp, err := app.AgentGet(ctx, params) fmt.Println(resp, err) }
Output:
func AgentList ¶
func AgentList(ctx *corporation.App) (resp []byte, err error)
获取access_token对应的应用列表
See: https://work.weixin.qq.com/api/doc/90000/90135/90227
GET https://qyapi.weixin.qq.com/cgi-bin/agent/list?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App resp, err := app.AgentList(ctx) fmt.Println(resp, err) }
Output:
func AgentSet ¶
func AgentSet(ctx *corporation.App, payload []byte) (resp []byte, err error)
设置应用
See: https://work.weixin.qq.com/api/doc/90000/90135/90228
POST https://qyapi.weixin.qq.com/cgi-bin/agent/set?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := app.AgentSet(ctx, payload) fmt.Println(resp, err) }
Output:
func GetWorkbenchTemplate ¶
func GetWorkbenchTemplate(ctx *corporation.App, payload []byte) (resp []byte, err error)
获取应用在工作台展示的模版
See: https://work.weixin.qq.com/api/doc/90000/90135/92535
POST https://qyapi.weixin.qq.com/cgi-bin/agent/get_workbench_template?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := app.GetWorkbenchTemplate(ctx, payload) fmt.Println(resp, err) }
Output:
func MenuCreate ¶
创建菜单
See: https://work.weixin.qq.com/api/doc/90000/90135/90231
POST https://qyapi.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN&agentid=AGENTID
Example ¶
package main import ( "fmt" "net/url" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App payload := []byte("{}") params := url.Values{} resp, err := app.MenuCreate(ctx, payload, params) fmt.Println(resp, err) }
Output:
func MenuDelete ¶
删除菜单
See: https://work.weixin.qq.com/api/doc/90000/90135/90233
GET https://qyapi.weixin.qq.com/cgi-bin/menu/delete?access_token=ACCESS_TOKEN&agentid=AGENTID
Example ¶
package main import ( "fmt" "net/url" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App params := url.Values{} resp, err := app.MenuDelete(ctx, params) fmt.Println(resp, err) }
Output:
func MenuGet ¶
获取菜单
See: https://work.weixin.qq.com/api/doc/90000/90135/90232
GET https://qyapi.weixin.qq.com/cgi-bin/menu/get?access_token=ACCESS_TOKEN&agentid=AGENTID
Example ¶
package main import ( "fmt" "net/url" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App params := url.Values{} resp, err := app.MenuGet(ctx, params) fmt.Println(resp, err) }
Output:
func SetWorkbenchData ¶
func SetWorkbenchData(ctx *corporation.App, payload []byte) (resp []byte, err error)
设置应用在用户工作台展示的数据
See: https://work.weixin.qq.com/api/doc/90000/90135/92535
POST https://qyapi.weixin.qq.com/cgi-bin/agent/set_workbench_data?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := app.SetWorkbenchData(ctx, payload) fmt.Println(resp, err) }
Output:
func SetWorkbenchTemplate ¶
func SetWorkbenchTemplate(ctx *corporation.App, payload []byte) (resp []byte, err error)
设置应用在工作台展示的模版
See: https://work.weixin.qq.com/api/doc/90000/90135/92535
POST https://qyapi.weixin.qq.com/cgi-bin/agent/set_workbench_template?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation" "gitlab.laodianhuang.cn/nbe/wxwork-sdk/corporation/apis/app" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := app.SetWorkbenchTemplate(ctx, payload) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.