Weather Image Generator is a .NET 8 application that generates images with weather data overlays. It uses Azure Functions, Unsplash API, and various other services to fetch weather data and overlay it on images.
To get started with the Weather Image Generator, follow these steps:
-
Clone the repository:
``` git clone https://github.com/RamonKea-inh/WeatherImageApp.git cd weather-image-generator ```
-
Build the solution:
``` dotnet build ```
-
Run the Azure Functions project:
``` cd WeatherImageGenerator.Functions func start ```
The application requires configuration settings for various services. These settings are defined in the `appsettings.json` and `local.settings.json` files.
```json { "WeatherService": { "EnableCaching": true, "CacheDurationMinutes": 5 }, "Unsplash": { "AccessKey": "your-unsplash-access-key" }, "Logging": { "LogLevel": { "Default": "Information", "Microsoft.Hosting.Lifetime": "Information" } }, "AzureWebJobsStorage": "your-azure-webjobs-storage-connection-string" } ```
```json { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "UseDevelopmentStorage=true", "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated", "WeatherService:EnableCaching": true, "WeatherService:CacheDurationMinutes": 5, "Unsplash:AccessKey": "your-unsplash-access-key" } } ```
-
Start Image Generation Job
- Endpoint: `POST /api/image-jobs`
- Description: Initiates a new image generation job.
- Response: Returns the job ID of the newly created job.
-
Get Image Job Status
- Endpoint: `GET /api/image-jobs/{jobId}`
- Description: Retrieves the status of an image generation job.
- Response: Returns the status of the job.
- Get Weather Stations
- Endpoint: `GET /api/weather/stations`
- Description: Retrieves weather stations data.
- Response: Returns a list of weather stations.
- Get Images
- Endpoint: `GET /api/images`
- Description: Retrieves a list of images based on a query.
- Response: Returns a list of image URLs.
-
Start Image Generation Job
- Endpoint: `POST /api/image-jobs`
- Description: Initiates a new image generation job.
- Response: Returns the job ID of the newly created job.
-
Get Image Job Status
- Endpoint: `GET /api/image-jobs/{jobId}`
- Description: Retrieves the status of an image generation job.
- Response: Returns the status of the job.
- Get Weather Stations
- Endpoint: `GET /api/weather/stations`
- Description: Retrieves weather stations data.
- Response: Returns a list of weather stations.
- Get Images
- Endpoint: `GET /api/images`
- Description: Retrieves a list of images based on a query.
- Response: Returns a list of image URLs.
This project is licensed under the MIT License. See the LICENSE file for details.