Documentation ¶
Overview ¶
Package department 家校沟通/部门管理
Index ¶
- func Create(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func Delete(ctx *corporation.App, params url.Values) (resp []byte, err error)
- func List(ctx *corporation.App, params url.Values) (resp []byte, err error)
- func SetUpgradeInfo(ctx *corporation.App, payload []byte) (resp []byte, err error)
- func Update(ctx *corporation.App, payload []byte) (resp []byte, err error)
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(ctx *corporation.App, payload []byte) (resp []byte, err error)
创建部门
See: https://work.weixin.qq.com/api/doc/90000/90135/92340
POST https://qyapi.weixin.qq.com/cgi-bin/school/department/create?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/school/department" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := department.Create(ctx, payload) fmt.Println(resp, err) }
Output:
func Delete ¶
删除部门
See: https://work.weixin.qq.com/api/doc/90000/90135/92342
GET https://qyapi.weixin.qq.com/cgi-bin/school/department/delete?access_token=ACCESS_TOKEN&id=ID
Example ¶
package main import ( "fmt" "net/url" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/school/department" ) func main() { var ctx *corporation.App params := url.Values{} resp, err := department.Delete(ctx, params) fmt.Println(resp, err) }
Output:
func List ¶
获取部门列表
See: https://work.weixin.qq.com/api/doc/90000/90135/92343
GET https://qyapi.weixin.qq.com/cgi-bin/school/department/list?access_token=ACCESS_TOKEN&id=ID
Example ¶
package main import ( "fmt" "net/url" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/school/department" ) func main() { var ctx *corporation.App params := url.Values{} resp, err := department.List(ctx, params) fmt.Println(resp, err) }
Output:
func SetUpgradeInfo ¶
func SetUpgradeInfo(ctx *corporation.App, payload []byte) (resp []byte, err error)
修改自动升年级的配置
See: https://work.weixin.qq.com/api/doc/90000/90135/92949
POST https://qyapi.weixin.qq.com/cgi-bin/school/set_upgrade_info?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/school/department" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := department.SetUpgradeInfo(ctx, payload) fmt.Println(resp, err) }
Output:
func Update ¶
func Update(ctx *corporation.App, payload []byte) (resp []byte, err error)
更新部门
See: https://work.weixin.qq.com/api/doc/90000/90135/92341
POST https://qyapi.weixin.qq.com/cgi-bin/school/department/update?access_token=ACCESS_TOKEN
Example ¶
package main import ( "fmt" "github.com/cvblood/qywxapi/corporation" "github.com/cvblood/qywxapi/corporation/apis/school/department" ) func main() { var ctx *corporation.App payload := []byte("{}") resp, err := department.Update(ctx, payload) fmt.Println(resp, err) }
Output:
Types ¶
This section is empty.