It is a backend service written in .NET Core Framework that register itself as a subscriber into the instance of Orion-LD for simplifying historic weather data analisys. It uses a PostgreSQL server for data persistance and it's secured by an instance of the Wilma PEP Proxy (Powered by FIWARE).
To use the APIs, download and install Microsoft .NET Core Framework SDK v3.1.
It was written using:
- Visual Studio Code
- Azure Data Studio
- Microsoft .NET Core Framework SDK
- PostgreSQL
- FIWARE Data Models
- OpenStreetMap Nominatim
To use Visual Studio Code, it is highly recommended install these plugins:
- .NET Core Add Reference
- Auto-Using for C#
- C# Extensions
- C# Essentials
- C# for Visual Studio Code (powered by OmniSharp)
- MSBuild project file tools
- VScode-icons
- VScode-nuget-package-manager
- XML Documentation Comments Support for Visual Studio Code
To use Azure Data Studio, it is highly recommended install this plugin:
- PostgreSQL extension for Azure Data Studio
Open the Windows Command Line and type this command:
dotnet tool install --global dotnet-efThe available endpoints are:
-
Stations:
- All stations - GET: /api/stations
- Station by ref id - GET: /api/stations/{id}
- Nearest station by location - GET: /api/stations/nearest
- Add new station - POST: /api/stations
- Add new station (LD standard) - POST: /api/stations-ld
- Update a station - PUT: /api/stations
- Update a station (LD standard) - PUT: /api/stations-ld
- Remove a station by ref id - DELETE: /api/stations/{id}
-
Measures:
- Last measure - GET: /api/measures/last
- Measures grouped daily - GET: /api/measures/daily
- Measures grouped weekly - GET: /api/measures/weekly
- Measures grouped monthly - GET: /api/measures/monthly
- Measures in interval - GET: /api/measures/interval
- Add new measure - POST: /api/measures
- Add new measure (LD standard) - POST: /api/measures-ld
- Update a measure - PUT: /api/measures
- Update a measure (LD standard) - PUT: /api/measures-ld
More technical details are availables through the Swagger page in /swagger.
These configuration parameters are in appsettings.json:
- AllowedHosts: CORS configuration
- DataBaseType: database protocol
- AWGPostgreContext: PostgreSQL connection string
- EnableGeocodingForMeasures: Address geocoding enabler
- OpenStreetMapURI: OpenStreetMap Nominatim URI
We use SemVer for versioning.
For the versions available, see the tags on this repository.
See the list of contributors who participated in this project.
- Fork this repository
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
This project is licensed under the AGPL License.
