user

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 user 家校沟通/学生与家长管理

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func BatchCreateParent

func BatchCreateParent(ctx *corporation.App, payload []byte) (resp []byte, err error)

批量创建家长

See: https://work.weixin.qq.com/api/doc/90000/90135/92334

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_create_parent?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func BatchCreateStudent

func BatchCreateStudent(ctx *corporation.App, payload []byte) (resp []byte, err error)

批量创建学生

See: https://work.weixin.qq.com/api/doc/90000/90135/92328

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_create_student?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func BatchDeleteParent

func BatchDeleteParent(ctx *corporation.App, payload []byte) (resp []byte, err error)

批量删除家长

See: https://work.weixin.qq.com/api/doc/90000/90135/92335

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_delete_parent?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func BatchDeleteStudent

func BatchDeleteStudent(ctx *corporation.App, payload []byte) (resp []byte, err error)

批量删除学生

See: https://work.weixin.qq.com/api/doc/90000/90135/92329

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_delete_student?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func BatchUpdateParent

func BatchUpdateParent(ctx *corporation.App, payload []byte) (resp []byte, err error)

批量更新家长

See: https://work.weixin.qq.com/api/doc/90000/90135/92336

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_update_parent?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func BatchUpdateStudent

func BatchUpdateStudent(ctx *corporation.App, payload []byte) (resp []byte, err error)

批量更新学生

See: https://work.weixin.qq.com/api/doc/90000/90135/92330

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/batch_update_student?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func CreateParent

func CreateParent(ctx *corporation.App, payload []byte) (resp []byte, err error)

创建家长

See: https://work.weixin.qq.com/api/doc/90000/90135/92331

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/create_parent?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func CreateStudent

func CreateStudent(ctx *corporation.App, payload []byte) (resp []byte, err error)

创建学生

See: https://work.weixin.qq.com/api/doc/90000/90135/92325

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/create_student?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func DeleteParent

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

删除家长

See: https://work.weixin.qq.com/api/doc/90000/90135/92332

GET https://qyapi.weixin.qq.com/cgi-bin/school/user/delete_parent?access_token=ACCESS_TOKEN&userid=USERID

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

	params := url.Values{}
	resp, err := user.DeleteParent(ctx, params)

	fmt.Println(resp, err)
}
Output:

func DeleteStudent

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

删除学生

See: https://work.weixin.qq.com/api/doc/90000/90135/92326

GET https://qyapi.weixin.qq.com/cgi-bin/school/user/delete_student?access_token=ACCESS_TOKEN&userid=USERID

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

	params := url.Values{}
	resp, err := user.DeleteStudent(ctx, params)

	fmt.Println(resp, err)
}
Output:

func Get

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

读取学生或家长

See: https://work.weixin.qq.com/api/doc/90000/90135/92337

GET https://qyapi.weixin.qq.com/cgi-bin/school/user/get?access_token=ACCESS_TOKEN&userid=USERID

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

	params := url.Values{}
	resp, err := user.Get(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/92338

GET https://qyapi.weixin.qq.com/cgi-bin/school/user/list?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID&fetch_child=FETCH_CHILD

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

	params := url.Values{}
	resp, err := user.List(ctx, params)

	fmt.Println(resp, err)
}
Output:

func ListParent

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

获取部门家长详情

See: https://work.weixin.qq.com/api/doc/90000/90135/92446

GET https://qyapi.weixin.qq.com/cgi-bin/school/user/list_parent?access_token=ACCESS_TOKEN&department_id=DEPARTMENT_ID

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

	params := url.Values{}
	resp, err := user.ListParent(ctx, params)

	fmt.Println(resp, err)
}
Output:

func SetArchSyncMode

func SetArchSyncMode(ctx *corporation.App, payload []byte) (resp []byte, err error)

设置家校通讯录自动同步模式

企业和第三方可通过此接口修改家校通讯录与班级标签之间的自动同步模式,注意,一旦设置禁止自动同步,将无法再次开启。

See: https://work.weixin.qq.com/api/doc/90000/90135/92345

POST https://qyapi.weixin.qq.com/cgi-bin/school/set_arch_sync_mode?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func UpdateParent

func UpdateParent(ctx *corporation.App, payload []byte) (resp []byte, err error)

更新家长

See: https://work.weixin.qq.com/api/doc/90000/90135/92333

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/update_parent?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func UpdateStudent

func UpdateStudent(ctx *corporation.App, payload []byte) (resp []byte, err error)

更新学生

See: https://work.weixin.qq.com/api/doc/90000/90135/92327

POST https://qyapi.weixin.qq.com/cgi-bin/school/user/update_student?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/school/user"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := user.UpdateStudent(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