It fetches the gas station prices from a Spanish government API
(API guide here)
and then saves the current prices to a SQLite database (named db.sqlite3
)
I made this to learn a bit of Go and try to improve the efficiency of the price updates of my website.
Current version should work but I'm not currently using it.
- Navigate to the desired folder to store the code:
cd <path>
- Clone the repo:
git clone https://github.com/appuchias/gasdbupdater.git
- Navigate into the repo folder:
cd gasdbupdater
- Compile the code:
go build
- Run it! (
./gasdbupdater
on Unix-like systems)
This code is licensed under the GPLv3 license.
Coded with ๐ค by Appu