Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
wiki:software:beuthbot:weather-service [13.12.2019 09:51] Timo Bruns [Getting Started] |
wiki:software:beuthbot:weather-service [22.07.2020 18:09] (aktuell) Denny Schumann |
||
---|---|---|---|
Zeile 7: | Zeile 7: | ||
===== Table of content===== | ===== Table of content===== | ||
- | - [Weather microservice](# | + | |
- | - [Table of content](# | + | - [[wiki: |
- | - [Getting Started](# | + | - [[wiki: |
- | - [Prerequisites](# | + | - [[wiki: |
- | - [Cloning](#cloning) | + | - [[wiki: |
- | - [Installing](#installing) | + | - [[wiki: |
- | - [Overview](#overview) | + | - [[wiki: |
- | - [Structure](#structure) | + | - [[wiki: |
- | - [Functionalities](# | + | - [[wiki: |
- | - [The scripts-folder](#the-scripts-folder) | + | - [[wiki: |
- | - [The services-folder](#the-services-folder) | + | - [[wiki: |
- | - [generateResponse.js](# | + | - [[wiki: |
- | - [weatherService.js](# | + | - [[wiki: |
- | - [fiveDayWeatherService.js](# | + | - [[wiki: |
- | - [The routes-folder](#the-routes-folder) | + | - [[wiki: |
- | - [Further Development](# | + | - [[wiki: |
- | - [Further Reading](# | + | - [[[wiki: |
- | - [Built With](# | + | - [[wiki: |
- | - [Versioning](#versioning) | + | - [[wiki: |
- | - [Authors](#authors) | + | - [[wiki: |
===== Getting Started ===== | ===== Getting Started ===== | ||
Zeile 52: | Zeile 52: | ||
'' | '' | ||
- | If you don't have node or npm installed, download the Softare via the links provided in [[wiki: | + | If you don't have node or npm installed, download the Softare via the links provided in [[wiki: |
After that install all necessesary dependencies | After that install all necessesary dependencies | ||
Zeile 68: | Zeile 68: | ||
===== Overview ===== | ===== Overview ===== | ||
- | The weather microservice is basically a _Node_-_Express_-Backend. Incoming requests are checked and specifically handled. It can give you a general forecast for the next five days or a detailed forecast for the current day. | + | The weather microservice is basically a //Node//-//Express//-Backend. Incoming requests are checked and specifically handled. It can give you a general forecast for the next five days or a detailed forecast for the current day. |
=== Structure === | === Structure === | ||
Zeile 76: | Zeile 76: | ||
=== Functionalities === | === Functionalities === | ||
- | On request, this microservice makes calls to the [OpenWeatherMap API](https:// | + | On request, this microservice makes calls to the [[https:// |
== The scripts-folder == | == The scripts-folder == | ||
- | This folder contains two scripts, that will be called by a cron job multiple times a day, since we can only do a maximum of 60 requests to the API per day. '' | + | This folder contains two scripts, that will be called by a cron job multiple times a day, since we can only do a maximum of 60 requests to the API per day. '' |
== The services-folder == | == The services-folder == | ||
Zeile 86: | Zeile 86: | ||
This folder consists of several services, that perform specific tasks for the microservice. | This folder consists of several services, that perform specific tasks for the microservice. | ||
- | **generateResponse.js** | + | == generateResponse.js |
Creates a nicely formatted string from a weather-JSON-object and caches it. | Creates a nicely formatted string from a weather-JSON-object and caches it. | ||
- | ** weatherService.js | + | == weatherService.js |
Makes a request to the '' | Makes a request to the '' | ||
- | ** fiveDayWeatherService.js | + | == fiveDayWeatherService.js |
If a weather forecast for the next days is requested, than this script requests the necessary data from the '' | If a weather forecast for the next days is requested, than this script requests the necessary data from the '' | ||
Zeile 108: | Zeile 108: | ||
===== Further Reading ===== | ===== Further Reading ===== | ||
- | - [OpenMensa API](https:// | + | - [[https:// |
===== Built With ===== | ===== Built With ===== | ||
- | - [Node.js](https:// | + | - [[https:// |
- | - [Express.js](https:// | + | - [[https:// |
- | - [Axios](https:// | + | - [[https:// |
===== Versioning ===== | ===== Versioning ===== | ||
- | We use [SemVer](http:// | + | We use [[http:// |
===== Authors ===== | ===== Authors ===== | ||
- | - **Tolga Karaoglu** | + | - **Tolga Karaoglu** |
- **Steven Sobkowski** | - **Steven Sobkowski** | ||
- | See also the list of [contributors](https:// | + | See also the list of [[[https:// |
+ | <WRAP pagebreak></ |