Sign inSign up

erguotou/oilme

By erguotou

Updated about 9 years ago

油价提醒

Image
0

1.5K

erguotou/oilme repository overview

油价提醒

使用golang查询每日油价(使用showapi接口),当油价调整时自动给微信发送信息(使用server酱提供的服务)

环境变量

  • API_URL showapi的api地址,使用简单模式secret发送,形如https://route.showapi.com/138-46?prov=你所在的城市&showapi_appid=your_id&showapi_sign=your_secret
  • SERVER_URL server酱的微信通知地址,形如https://sc.ftqq.com/YOUR_SCKEY.send

使用方法

  • 使用docker部署
    docker 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
    

Tag summary

Content type

Image

Digest

Size

79.1 MB

Last updated

about 9 years ago

docker pull erguotou/oilme