Jess.API 是 api.canself.com 的统一 API 服务:基于 ASP.NET Core 10,以 Kestrel Windows 服务方式承载,由 Caddy 反向代理提供 HTTPS 访问。
当前提供两类接口:
完整接口说明与在线调试请见 Swagger UI。
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /Key |
返回 DES 密钥 |
| GET | /KeyNew |
返回新 DES 密钥 |
| GET | /IV |
返回 8 字节初始向量 |
| GET | /UseCode |
返回使用授权码 |
| GET | /Modules?productid=1 |
按产品 ID 返回模块列表(参数 productid) |
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/WeatherForecast/now?city=北京 |
实况天气(温度、湿度、风向风速、天气现象) |
| GET | /api/WeatherForecast/hourly?city=北京 |
未来 24 小时逐小时预报 |
| GET | /api/WeatherForecast/daily?city=北京&days=3 |
逐日预报(days 1~15,免费用户默认 3 天) |
| GET | /api/WeatherForecast |
查询全部模拟预报(?count= 限制返回条数) |
| GET | /api/WeatherForecast/{id} |
按 ID 查询模拟预报 |
| POST | /api/WeatherForecast |
创建模拟预报 |
| PUT | /api/WeatherForecast/{id} |
更新模拟预报 |
| DELETE | /api/WeatherForecast/{id} |
删除模拟预报 |
city 参数支持「北京」「beijing」「39.93:116.40」三种格式;心知天气服务异常时返回 502。