当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 97

开发团队 / 微信Go SDK
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
service_api_test.go 649 Bytes
一键复制 编辑 原始数据 按行查看 历史
leexs 提交于 2019-09-05 16:54 . 拆分文件
package wechat
import (
"fmt"
"testing"
)
func TestBasicAccessToken(t *testing.T) {
fmt.Println("----------获取访问凭证----------")
// 请求接口
appId := "wx80adf00e00fecc80"
appSecret := "fa1c98a5449e909129d08b10c1bbb415"
token, err := GetBasicAccessToken(appId, appSecret)
if err != nil {
t.Error(err)
return
}
t.Logf("返回值: %+v\n", token)
}
func TestBasicUserInfo(t *testing.T) {
fmt.Println("----------获取用户基本信息----------")
// 请求接口
token := ""
openId := ""
user, err := GetBasicUserInfo(token, openId, "")
if err != nil {
t.Error(err)
return
}
t.Logf("返回值: %+v\n", user)
}
Go
1
https://gitee.com/OAGroup/wechat.git
git@gitee.com:OAGroup/wechat.git
OAGroup
wechat
微信Go SDK
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891