department

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package department 家校沟通/部门管理

Index

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/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/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

func Delete(ctx *corporation.App, params url.Values) (resp []byte, err error)

删除部门

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/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/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

func List(ctx *corporation.App, params url.Values) (resp []byte, err error)

获取部门列表

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/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/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/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/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/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/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.

Jump to

Keyboard shortcuts

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