使用golang查询每日油价(使用showapi接口),当油价调整时自动给微信发送信息(使用server酱提供的服务)
showapi的api地址,使用简单模式secret发送,形如https://route.showapi.com/138-46?prov=你所在的城市&showapi_appid=your_id&showapi_sign=your_secretserver酱的微信通知地址,形如https://sc.ftqq.com/YOUR_SCKEY.senddocker run -d -v /data/logs:/go/src/oilme/logs -e API_URL="https://route.showapi.com/138-46?prov=你所在的城市&showapi_appid=your_id&showapi_sign=your_secret" -e SERVER_URL="https://sc.ftqq.com/YOUR_SCKEY.send" --name oilme erguotou/oilme
golang运行
# 先clone项目,然后进入项目目录
API_URL=https://route.showapi.com/138-46?prov=你所在的城市&showapi_appid=your_id&showapi_sign=your_secret SERVER_URL=https://sc.ftqq.com/YOUR_SCKEY.send go run bee.go
Content type
Image
Digest
Size
79.1 MB
Last updated
about 9 years ago
docker pull erguotou/oilme