Temperature finder using OpenWeather API's and My local API coordinates
267
API developed for consumption of OpenWeather API's to search weather infos. Made for study and practice purposes! And of course, to help me with daily research!
To use, a API Key provided by OpenWeather is required to consume APIs. Follow this step by step. or check the documentation about
When running the API, be sure to export your environment variable with the API KEY, or change the source code for that. An example of exporting the API KEY and executing the project on your shell would be:
export API_KEY=ABCDEFG
mvn spring-boot:run
Make sure you have Docker and Docker-compose installed on your machine. Dockerhub
Clone the repository or download the source code
git clone https://github.com/WeversonL/temperature-finder.git
cd temperature-finder
In the docker-compose file, there are two environment variables [API_KEY_TEMPERATURE, API_KEY_GEOCODE]. As stated above, export these variables to run compose
export API_KEY_TEMPERATURE=ABCDEFG
export API_KEY_GEOCODE=ABCDEFG
Start with docker-compose
docker-compose up -d
To obtain the temperature of an address, below is an example curl. The string need not be coded for the search, the program is already in charge of doing this
curl --location 'http://localhost:8081/temperature/find?address=Morumbi%2C%20S%C3%A3o%20Paulo'
Make sure you have Docker installed on your machine. Dockerhub
Clone the image
docker pull weversonlemos/temperature-finder:latest
Create docker network
docker network create ct-apis
Follow the steps in this repository, as the API's were built in separate ways
Start container with image and API KEY
docker run -p 8081:8081 --network ct-apis --name temperature-finder -e API_KEY=YOUR_API_KEY weversonlemos/temperature-finder:latest
To obtain the temperature of an address, below is an example curl. The string need not be coded for the search, the program is already in charge of doing this
curl --location 'http://localhost:8081/temperature/find?address=Morumbi%2C%20S%C3%A3o%20Paulo'
⚠️ Still in development
temperature-finder is released under the GNU General Public License, Version 2
Copyright (C) 2022 Weverson Lemos
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version
Content type
Image
Digest
sha256:41666274b…
Size
248.5 MB
Last updated
about 3 years ago
docker pull weversonlemos/temperature-finder