school

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package school 家校沟通

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToOpenid

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

外部联系人openid转换

企业和服务商可通过此接口,将微信外部联系人的userid(如何获取?)转为微信openid,用于调用支付相关接口。暂不支持企业微信外部联系人(ExternalUserid为wo开头)的userid转openid。

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

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

Example
package main

import (
	"fmt"

	"github.com/cvblood/qywxapi/corporation"
	"github.com/cvblood/qywxapi/corporation/apis/school"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetSubscribeMode

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

获取关注「学校通知」的模式

可通过此接口获取家长关注「学校通知」的模式:“可扫码填写资料加入”或“禁止扫码填写资料加入”

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

GET https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_subscribe_mode?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/cvblood/qywxapi/corporation"
	"github.com/cvblood/qywxapi/corporation/apis/school"
)

func main() {
	var ctx *corporation.App

	resp, err := school.GetSubscribeMode(ctx)

	fmt.Println(resp, err)
}
Output:

func GetSubscribeQrCode

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

获取「学校通知」二维码

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

GET https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_subscribe_qr_code?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/cvblood/qywxapi/corporation"
	"github.com/cvblood/qywxapi/corporation/apis/school"
)

func main() {
	var ctx *corporation.App

	resp, err := school.GetSubscribeQrCode(ctx)

	fmt.Println(resp, err)
}
Output:

func Send

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

发送「学校通知」

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

POST https://qyapi.weixin.qq.com/cgi-bin/externalcontact/message/send?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/cvblood/qywxapi/corporation"
	"github.com/cvblood/qywxapi/corporation/apis/school"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func SetSubscribeMode

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

设置关注「学校通知」的模式

可通过此接口修改家长关注「学校通知」的模式:“可扫码填写资料加入”或“禁止扫码填写资料加入”

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

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

Example
package main

import (
	"fmt"

	"github.com/cvblood/qywxapi/corporation"
	"github.com/cvblood/qywxapi/corporation/apis/school"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Directories

Path Synopsis
Package department 家校沟通/部门管理
Package department 家校沟通/部门管理
Package user 家校沟通/学生与家长管理
Package user 家校沟通/学生与家长管理

Jump to

Keyboard shortcuts

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