Kotlin app for downloading posts from API and saving them as JSON files
Post Downloader
Kotlin app for downloading posts from API and saving them as JSON files.
How To Use • Run application • Credits
How To Use
Application requires JDK 11 to run. Make sure all environment variables including JAVA_HOME are set.
Before running the app you need to create config.json
file with two required entries:
- ApiUri – API base url
- SaveFilePath – local path where files will be stored
{
"ApiUri": "https://jsonplaceholder.typicode.com",
"SaveFilePath": "C:\\example\\file\\path"
}
Save file in root folder of the project.
Note If you want to create file elsewhere you need to specify path by adding
-DconfigPath=<config_path>
vm argument.
Run application
To run the app go to root project folder and type gradlew run
or .\gradlew run
Credits
Application uses multiple external libraries including: