Star Wars api (https://swapi.co/)
- Create a command-line application that takes a planet name from the Star Wars universe and returns a list of people that are from that planet.
StarwarDemo
is just for command-line / Web Browser demo purpose.- Trying to use Akka un-Typed Actors and Akka Http REST API to achieve non-blocking, reactive, event-driven.
-
in Mac Terminal or Windows Command Prompt, type
sbt clean compile
-
after above-sbt-commands completes, then type
sbt run
-
in Web Browser, paste in the following URL -
http://localhost:8080/starwars?planetName=Tatooine
4a) after pasting above URL, you should see the following output:
Luke Skywalker
C-3PO
Darth Vader
Owen Lars
Beru Whitesun lars
R5-D4
Biggs Darklighter
Anakin Skywalker
Shmi Skywalker
Cliegg Lars
4b) in Web Browser, another example URL is - http://localhost:8080/starwars?planetName=Alderaan
4c) after pasting second-example-URL, you should see the following output:
Leia Organa
Bail Prestor Organa
Raymus Antilles
- with latest commit, only working for single-word planet name (see above examples)
- may need some URL parameter encode/decode for multi-words name (specifically peopleName)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.