This is where the code for ferien-api.de lives.
This project is built with Spring Boot and Kotlin, using an embedded h2 database as its data store.
To get a local copy up and running follow these simple steps.
- Clone the repo
git clone https://github.com/paulbrejla/ferien-api.git
- Add .ics calendar files to /main/resources/holidays
- Filenames need to conform to the following format:
ferien_{state}.ics e.g. ferien_Bremen.ics
- Configure environment variables to load .ics files from the classpath or from a git repo
Property | filesystem (classpath) | git |
---|---|---|
source | filesystem |
git |
remoteURL | Not needed | Git URL e.g. https://github.com/paulbrejla/ferien-api.git |
branch | Not needed | Branch e.g. master |
filePath | Not needed | Path to look up ics files e.g. src/test/resources/holidays/ |
- Run
./gradlew bootRun
- Build Docker Image
docker build -t holidays-api .
- Tag Docker Image
docker tag holidays-api:latest remote-repo/holidays-api:latest
- Push Docker Image to remote repo
docker push remote-repo/holidays-api:latest
As the API is heavily abused, aggressive rate limiting is in place. If you need higher rate limits, you need to self-host it.
The source ics files are here: https://github.com/paulbrejla/ferien-api-data. To change a holiday date, open the ics file for the state and year and find the holiday entry. Change the entry and create a pull request against main.
The source ics files are here: https://github.com/paulbrejla/ferien-api-data. To add a holidays for a given state and year, provide an ics file and create a PR against main.
The source ics files are here: https://github.com/paulbrejla/ferien-api-data. To change a holiday date, open the ics file for the state and year and find the holiday entry. Change the entry and create a pull request against main.
Distributed under the MIT License. See LICENSE for more information.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
- Ensure any install or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes, this includes new environment variables, exposed ports, useful file locations and container parameters.
Paul Brejla - paul(at)paulbrejla.com
Project Link: https://github.com/paulbrejla/ferien-api