A simple Go client for the BloomSky API.
- It's possible to show informations in the console or in a embedded web server.
- It's also possible to export datas to Time Series Database InfluxData.
- BloomSky API key (get it here: Bloomsky api)
- Download the binary for your OS and the config.yaml in the same folder.
- Don't forget !!!! : You have to change the API Key in the config.yaml.
- Or use flag "-token xxxxxx"
- This application supports en-us and fr
- Cette application supporte l'anglais et le français
Platform | Architecture | URL |
---|---|---|
Apple macOS | 64-bit Intel | ./goBloomsky-darwin-amd64.bin |
Linux | 64-bit Intel | ./goBloomsky-linux-amd64.bin |
Windows | 64-bit Intel | goBloomsky-windows-amd64.exe |
Execute the binary with the config file "config.yaml" in the same folder.
- Ex : goBloomsky-windows-amd64.exe -token xxxxxxx
There are some others flags : --help for doc
Usage of ./bloomsky-client-go:
-debug string
panic,fatal,error,warning,info,debug
-devel string
true,false
-mock string
true,false
-token string
yourtoken
Bloomsky Clientcomes with an embedded web based object browser. Point your web browser by default to http://localhost:1111/
ensure your server has started successfully.
Bloomsky
--------
Timestamp : 2017-06-09 22:07:10 +0200 CEST
City : Thuin
Device Id : 442C05954A59
Num Of Followers : 2
Index UV : 1
Night : true
Wind Direction : SW
Wind Gust : 4.16
Sustained Wind Speed : 2.17
Wind Gust : 6.6976
Sustained Wind Speed 3.4937
Rain : false
Daily : 0.44
24h Rain : 0.44
Rain Rate : 0
Rain Daily : 0.44
24h Rain : 11.18
Rain Rate : 0
Temperature F : 59.13 °F
Temperature C : 15.07 °C
Humidity : 65
Pressure InHg : 29.38
Pressure HPa : 994.92
docker pull patrickalin/docker-bloomsky docker run -d --name=bloomsky -e bloomskyAccessToken=ToBECompleted patrickalin/docker-bloomsky
https://hub.docker.com/r/patrickalin/docker-bloomsky/
- install git
- install go from
http://golang.org/
- If you want install influxData
git clone https://github.com/patrickalin/bloomsky-client-go.git
cd bloomsky-client-go
export GOPATH=$PWD
go get -v .
go build
In the config file, you can activate a mock. If you don't have a API key.
- mock: true
In the config file, you can change the dev mode to use template, lang locally.
- dev: true
When the dev = false you use assembly files. Execute "go generate" to refresh assembly files.
In the config file, you can change the log level (panic,fatal,error,warn,info,debug)
- logLevel: "debug"
https://github.com/tixu for testing and review
http://mervine.net/json2struct "transform JSON to Go struct library"
http://github.com/spf13/viper "read config library"
The code is licensed under the permissive Apache v2.0 licence. This means you can do what you like with the software, as long as you include the required notices. Read this for a summary.
We have to change the VERSION file and tag the code ./script/git/tag.sh in github.
Travis .travis.yml realises automaticly the build. (./script/travis/compile.sh) If it detects a new tag, travis pushs binaries in github. (see .travis.yml)
Everything is automatic.