1 Star 0 Fork 2

wanyuan/go-qq-openapi-v3

forked from Rex/go-qq-openapi-v3 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
openapi_test.go 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
Rex 提交于 2013-12-31 19:19 . Update openapi_test.go
package qqopenapi_v3
import (
"net/url"
"testing"
)
func TestOpenAPI_HTTP(t *testing.T) {
var appid = 600
var appkey = "04017120b52c43cbb6b1c7d87fd042c9"
var openid = "0000000000000000000000000039811C"
var openkey = "BAA4A7F86ABCE56A4FC98AD0B81FB542"
var pf = "qzone"
var api = NewOpenAPIV3(appid, appkey, nil)
var param = url.Values{
"pf": []string{pf},
"openid": []string{openid},
"openkey": []string{openkey},
}
var jdata = api.Call("post", "/v3/user/get_info", HTTP_PROTOCOL, param)
if jdata != nil {
strJdata, _ := jdata.ToString()
t.Log(strJdata)
}
}
func TestOpenAPI_HTTPS(t *testing.T) {
var appid = 600
var appkey = "04017120b52c43cbb6b1c7d87fd042c9"
var openid = "0000000000000000000000000039811C"
var openkey = "BAA4A7F86ABCE56A4FC98AD0B81FB542"
var pf = "qzone"
var api = NewOpenAPIV3(appid, appkey, nil)
var param = url.Values{
"pf": []string{pf},
"openid": []string{openid},
"openkey": []string{openkey},
}
var jdata = api.Call("post", "/v3/user/get_info", HTTPS_PROTOCOL, param)
if jdata != nil {
strJdata, _ := jdata.ToString()
t.Log(strJdata)
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wanyuan/go-qq-openapi-v3.git
git@gitee.com:wanyuan/go-qq-openapi-v3.git
wanyuan
go-qq-openapi-v3
go-qq-openapi-v3
master

搜索帮助