A simple CLI written in Kotlin/Native to retrieve resources from The Star Wars API
Prerequisites:
- Java >= 8
- cURL
- ncurses5-compat-libs
./gradlew clean buildThe binary executable swapi-cli.kexe will be generated in the dir build/bin/native/releaseExecutable.
The CLI expects the following command format:
./swapi-cli.kexe [resource] [operation] [param]resourceis the API resource to retrieve (people, films, starships, vehicles, species and planets)operationis the operation to retrieve the resource (count, list, search and get)paramis only required for search and get operations
People:
./swapi-cli.kexe people count
./swapi-cli.kexe people list
./swapi-cli.kexe people search Luke
./swapi-cli.kexe people get 1Films:
./swapi-cli.kexe films count
./swapi-cli.kexe films list
./swapi-cli.kexe films search Hope
./swapi-cli.kexe films get 1Starships:
./swapi-cli.kexe starships count
./swapi-cli.kexe starships list
./swapi-cli.kexe starships search Star
./swapi-cli.kexe starships get 1Vehicles:
./swapi-cli.kexe vehicles count
./swapi-cli.kexe vehicles list
./swapi-cli.kexe vehicles search Crawler
./swapi-cli.kexe vehicles get 1Species:
./swapi-cli.kexe species count
./swapi-cli.kexe species list
./swapi-cli.kexe species search Rod
./swapi-cli.kexe species get 1Planets:
./swapi-cli.kexe planets count
./swapi-cli.kexe planets list
./swapi-cli.kexe planets search Yavin
./swapi-cli.kexe planets get 1