For those who prefer English -> README_EN.md
这里是Ink33,你可以亲切地称呼我为ink或者音可
我呢,不同时期喜爱的角色不同,目前最喜欢的是渋谷かのん(Kanon Shibuya)和霧原かすみ(Kasumi Kirihara)和丸山彩(Aya Maruyama)
(Tips: 右边的看板娘可以点击切换哦)
- 我的编程习惯:
- 面向Google
- 面向StackOverflow
- 面向复制粘贴
- 正在使用
在学(不学了)
和风天气的非官方Golang SDK
License: MIT License
For those who prefer English -> README_EN.md
这里是Ink33,你可以亲切地称呼我为ink或者音可
我呢,不同时期喜爱的角色不同,目前最喜欢的是渋谷かのん(Kanon Shibuya)和霧原かすみ(Kasumi Kirihara)和丸山彩(Aya Maruyama)
(Tips: 右边的看板娘可以点击切换哦)
和风城市信息查询
接口,目前参数值为中文时,请求会返回400错误。
需要同时处理下签名计算
// GetSignature 和风天气签名生成算法-Golang版本
func GetSignature(publicID, key string, param map[string]string) (escapedParamstr, signature string) {
sa := []string{}
escapedSa := []string{}
for k, v := range param {
if v != "" {
sa = append(sa, k+"="+v)
// 添加urlencode处理
v = url.QueryEscape(v)
escapedSa = append(escapedSa, k+"="+v)
}
}
escapedSa = append(escapedSa, "t="+strconv.FormatInt(time.Now().Unix(), 10), "username="+publicID)
escapedParamstr = strings.Join(escapedSa, "&")
// 计算签名使用urlencode前的值
sa = append(sa, "t="+strconv.FormatInt(time.Now().Unix(), 10), "username="+publicID)
sort.Strings(sa)
paramstr := strings.Join(sa, "&")
md5c := md5.New()
md5c.Reset()
_, _ = md5c.Write([]byte(paramstr + key))
return escapedParamstr, fmt.Sprintf("%x", md5c.Sum(nil))
}
APIList.go
灾害预警城市列表查询方法 NewWarningListClient
中的参数有误
func NewWarningListClient(WarningRange string) (Client HeWeatherAPI) {
p := map[string]string{"range": WarningRange}
Client = &universeHeWeatherAPI{
Name: "warning",
SubName: "now", // 此处值应为 list
Parameter: p,
}
return
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.