|
@@ -16,9 +16,9 @@ var (
|
|
// appid = "jyNjdXQgUDAwdaTklMPz5i"
|
|
// appid = "jyNjdXQgUDAwdaTklMPz5i"
|
|
// key = "404M0v2j"
|
|
// key = "404M0v2j"
|
|
// apiurl = "http://127.0.0.1:8801"
|
|
// apiurl = "http://127.0.0.1:8801"
|
|
- appid = "jyPz5XQgMABgVeTkdOMTBx"
|
|
|
|
- key = "349300qe"
|
|
|
|
- apiurl = "https://api.jianyu360.com"
|
|
|
|
|
|
+ appid = "jyOh1XQgUJBQ5bTUlKCyZ1"
|
|
|
|
+ key = "56IrWR74"
|
|
|
|
+ apiurl = "https://testapi.jianyu360.com"
|
|
)
|
|
)
|
|
|
|
|
|
func main() {
|
|
func main() {
|
|
@@ -30,9 +30,10 @@ func getToken() (token string) {
|
|
res := post(apiurl+"/user/access_token", map[string]string{
|
|
res := post(apiurl+"/user/access_token", map[string]string{
|
|
"appid": appid,
|
|
"appid": appid,
|
|
"timestamp": tm,
|
|
"timestamp": tm,
|
|
|
|
+ //"key": "6PzV0CUa",
|
|
"signature": MD5(appid + tm + key),
|
|
"signature": MD5(appid + tm + key),
|
|
})
|
|
})
|
|
- log.Println(res)
|
|
|
|
|
|
+ log.Println(tm, MD5(appid+tm+key), res)
|
|
if res != nil && res["access_token"] != "" {
|
|
if res != nil && res["access_token"] != "" {
|
|
token, _ = res["access_token"].(string)
|
|
token, _ = res["access_token"].(string)
|
|
}
|
|
}
|
|
@@ -43,9 +44,10 @@ func getData() {
|
|
token := getToken()
|
|
token := getToken()
|
|
data := post(apiurl+"/data/getalldata", map[string]string{
|
|
data := post(apiurl+"/data/getalldata", map[string]string{
|
|
"access_token": token,
|
|
"access_token": token,
|
|
- "day": "0",
|
|
|
|
- "next": "1",
|
|
|
|
|
|
+ //"day": "-3",
|
|
|
|
+ "next": "0",
|
|
})
|
|
})
|
|
|
|
+ //s, _ := json.Marshal(data["data"])
|
|
log.Println(data)
|
|
log.Println(data)
|
|
}
|
|
}
|
|
|
|
|