oa

package
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package oa OA

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyEvent

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

提交审批申请

企业可通过审批应用或自建应用Secret调用本接口,代应用可见范围内员工在企业微信“审批应用”内提交指定类型的审批申请。

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetApprovalData

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

获取审批数据(旧)

通过本接口来获取公司一段时间内的审批记录。一次拉取调用最多拉取100个审批记录,可以通过多次拉取的方式来满足需求,但调用频率不可超过600次/分。

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetApprovalDetail

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

获取审批申请详情

企业可通过审批应用或自建应用Secret调用本接口,根据审批单号查询企业微信“审批应用”的审批申请详情。

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetApprovalInfo

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

批量获取审批单号

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetCheckinData

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

获取打卡数据

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetCheckinPption

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

获取打卡规则

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetDialRecord

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

获取公费电话拨打记录

企业可通过此接口,按时间范围拉取成功接通的公费电话拨打记录。

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetOpenApprovalData

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

查询自建应用审批单当前状态

开发者也可主动查询审批单的当前审批状态。

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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

	fmt.Println(resp, err)
}
Output:

func GetTemplateDetail

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

获取审批模板详情

企业可通过审批应用或自建应用Secret调用本接口,获取企业微信“审批应用”内指定审批模板的详情。

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

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

Example
package main

import (
	"fmt"

	"github.com/fastwego/wechat4work/corporation"
	"github.com/fastwego/wechat4work/corporation/apis/oa"
)

func main() {
	var ctx *corporation.App

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