cl-seniverse-api is a Common Lisp SDK of seniverse API to get weather information(include air information).
Note: Some of the API is NOT free. Note: Project has been rename from cl-thinkpage-api to cl-seniverse-api since Website use www.seniverse.com as domain in 2017-03-14
Copyright(c) 2017 Muyinliu Xing Released under the ISC License.
Relax, usually Quicklisp will download all these packages for you :)
- flexi-streams
- ironclad
- cl-base64
- drakma
In shell:
git clone https://github.com/muyinliu/cl-seniverse-api.git
cp -r cl-seniverse-api ~/quicklisp/local-projects/cl-seniverse-api
Then in Common Lisp:
(ql:quickload 'cl-seniverse-api)
Note: Please use your own *api-key*
and *user-id*
comes from seniverse, for example:
(setf *api-key* "your-api-key")
(setf *user-id* "your-user-id")
(seniverse:weather-now "beijing")
Result example:
"{\"results\":[{\"location\":{\"id\":\"WX4FBXXFKE4F\",\"name\":\"北京\",\"country\":\"CN\",\"path\":\"北京,北京,中国\",\"timezone\":\"Asia/Shanghai\",\"timezone_offset\":\"+08:00\"},\"now\":{\"text\":\"雨夹雪\",\"code\":\"20\",\"temperature\":\"0\",\"feels_like\":\"-1\",\"pressure\":\"1023\",\"humidity\":\"70\",\"visibility\":\"3.1\",\"wind_direction\":\"东南\",\"wind_direction_degree\":\"121\",\"wind_speed\":\"6.48\",\"wind_scale\":\"2\",\"clouds\":\"\",\"dew_point\":\"\"},\"last_update\":\"2017-02-21T15:55:00+08:00\"}]}"
200
Note: More result example should check directory /result-examples/
and seniverse API Document
Note: More function please read file cl-seniverse-api.lisp
Welcome to reply.