-
Notifications
You must be signed in to change notification settings - Fork 151
/
client.go
33 lines (29 loc) · 882 Bytes
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package corp
import (
"github.com/ArtisanCloud/PowerWeChat/v2/src/kernel"
suite "github.com/ArtisanCloud/PowerWeChat/v2/src/openWork/suitAuth"
)
type Client struct {
*kernel.BaseClient
}
func NewClient(app *kernel.ApplicationInterface) (*Client, error) {
token := (*app).GetComponent("ProviderAccessToken").(*suite.AccessToken)
baseClient, err := kernel.NewBaseClient(app, token.AccessToken)
if err != nil {
return nil, err
}
return &Client{
baseClient,
}, nil
}
//// 获取代码草稿列表
//// https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/api/ThirdParty/code_template/gettemplatedraftlist.html
//func (comp *Client) GetPreAuthorizationUrl() (*response.ResponseGetDrafts, error) {
//
// result := &response.ResponseGetDrafts{}
//
// _, err := comp.HttpGet("wxa/gettemplatedraftlist", nil, nil, result)
//
// return result, err
//
//}