async_batch

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 async_batch 通讯录管理/异步批量接口

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResult

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

获取异步任务结果

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

GET https://qyapi.weixin.qq.com/cgi-bin/batch/getresult?access_token=ACCESS_TOKEN&jobid=JOBID

Example
package main

import (
	"fmt"
	"net/url"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/contact/async_batch"
)

func main() {
	var ctx *corporation.App

	params := url.Values{}
	resp, err := async_batch.GetResult(ctx, params)

	fmt.Println(resp, err)
}
Output:

func ReplaceParty

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

全量覆盖部门

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

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

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/contact/async_batch"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func ReplaceUser

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

全量覆盖成员

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

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

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/contact/async_batch"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func User

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

增量更新成员

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

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

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/contact/async_batch"
)

func main() {
	var ctx *corporation.App

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