-
Notifications
You must be signed in to change notification settings - Fork 2
Endpoints
Run the ApiApplication
file and visit localhost:8080
.
This is a test endpoint to make sure that project is working correctly.
It optionally takes a parameter name
.
For example:
localhost:8080/hello
localhost:8080/hello?name=World
Collection resource
This is an endpoint that returns all movies available. A year range can be specified with the syntax /all/year1/year2
where year2
is optional.
For example:
localhost:8080/all
localhost:8080/all/1965
localhost:8080/all/2000/2005
Singleton resource
This is an endpoint that returns a specific movie by title, returns a title containing the search if an exact match isn't found.
It uses the syntax /movie/{title}
.
For example:
localhost:8080/movie/joker
If there are duplicates of a movie by title, the oldest one is returned. To handle this, a year
option can be specified.
For example:
localhost:8080/movie/titanic
returns the 1953 version, and
localhost:8080/movie/titanic?year=1997
returns the 1997 version.
Singleton resource
This is an endpoint that returns a random Oscar-nominated movie.
For example:
localhost:8080/random
Collection resource
This is an endpoint that returns a collection of movies that have an award in a specific category.
It uses the syntax /movie/{category}
, where category
is from the list below.
Optionally, you can add the option winner
to filter movies that have won or not.
For example:
localhost:8080/category/ACTOR
localhost:8080/category/DIRECTING?winner=true
localhost:8080/category/BEST%20PICTURE?winner=false
You can make your search less specific, for example
localhost:8080/category/MUSIC
return all of the movies with nominations/wins in the MUSIC
categories.
The categories available to search by are:
ACTOR
ACTOR IN A LEADING ROLE
ACTOR IN A SUPPORTING ROLE
ACTRESS
ACTRESS IN A LEADING ROLE
ACTRESS IN A SUPPORTING ROLE
ANIMATED FEATURE FILM
ART DIRECTION
ART DIRECTION (Black-and-White)
ART DIRECTION (Color)
ASSISTANT DIRECTOR
BEST MOTION PICTURE
BEST PICTURE
CINEMATOGRAPHY
CINEMATOGRAPHY (Black-and-White)
CINEMATOGRAPHY (Color)
COSTUME DESIGN
COSTUME DESIGN (Black-and-White)
COSTUME DESIGN (Color)
DANCE DIRECTION
DIRECTING
DIRECTING (Comedy Picture)
DIRECTING (Dramatic Picture)
DOCUMENTARY
DOCUMENTARY (Feature)
DOCUMENTARY (Short Subject)
ENGINEERING EFFECTS
FILM EDITING
FOREIGN LANGUAGE FILM
HONORARY FOREIGN LANGUAGE FILM AWARD
INTERNATIONAL FEATURE FILM
MAKEUP
MAKEUP AND HAIRSTYLING
MUSIC (Adaptation Score)
MUSIC (Music Score of a Dramatic Picture)
MUSIC (Music Score of a Dramatic or Comedy Picture)
MUSIC (Music Score--substantially original)
MUSIC (Original Dramatic Score)
MUSIC (Original Music Score)
MUSIC (Original Musical or Comedy Score)
MUSIC (Original Score)
MUSIC (Original Score--for a motion picture [not a musical])
MUSIC (Original Song Score and Its Adaptation -or- Adaptation Score)
MUSIC (Original Song Score and Its Adaptation or Adaptation Score)
MUSIC (Original Song Score or Adaptation Score)
MUSIC (Original Song Score)
MUSIC (Original Song)
MUSIC (Score of a Musical Picture--original or adaptation)
MUSIC (Scoring of Music--adaptation or treatment)
MUSIC (Scoring of a Musical Picture)
MUSIC (Scoring)
MUSIC (Scoring: Adaptation and Original Song Score)
MUSIC (Scoring: Original Song Score and Adaptation -or- Scoring: Adaptation)
MUSIC (Song)
MUSIC (Song--Original for the Picture)
OUTSTANDING MOTION PICTURE
OUTSTANDING PICTURE
OUTSTANDING PRODUCTION
PRODUCTION DESIGN
SHORT FILM (Animated)
SHORT FILM (Dramatic Live Action)
SHORT FILM (Live Action)
SHORT SUBJECT (Animated)
SHORT SUBJECT (Cartoon)
SHORT SUBJECT (Color)
SHORT SUBJECT (Comedy)
SHORT SUBJECT (Live Action)
SHORT SUBJECT (Novelty)
SHORT SUBJECT (One-reel)
SHORT SUBJECT (Two-reel)
SOUND
SOUND EDITING
SOUND EFFECTS
SOUND EFFECTS EDITING
SOUND MIXING
SOUND RECORDING
SPECIAL ACHIEVEMENT AWARD
SPECIAL ACHIEVEMENT AWARD (Sound Editing)
SPECIAL ACHIEVEMENT AWARD (Sound Effects Editing)
SPECIAL ACHIEVEMENT AWARD (Sound Effects)
SPECIAL ACHIEVEMENT AWARD (Visual Effects)
SPECIAL AWARD
SPECIAL EFFECTS
SPECIAL FOREIGN LANGUAGE FILM AWARD
SPECIAL VISUAL EFFECTS
UNIQUE AND ARTISTIC PICTURE
VISUAL EFFECTS
WRITING
WRITING (Adaptation)
WRITING (Adapted Screenplay)
WRITING (Motion Picture Story)
WRITING (Original Motion Picture Story)
WRITING (Original Screenplay)
WRITING (Original Story)
WRITING (Screenplay Adapted from Other Material)
WRITING (Screenplay Based on Material Previously Produced or Published)
WRITING (Screenplay Based on Material from Another Medium)
WRITING (Screenplay Written Directly for the Screen)
WRITING (Screenplay Written Directly for the Screen--based on factual material or on story material not previously published or produced)
WRITING (Screenplay)
WRITING (Screenplay--Adapted)
WRITING (Screenplay--Original)
WRITING (Screenplay--based on material from another medium)
WRITING (Story and Screenplay)
WRITING (Story and Screenplay--based on factual material or material not previously published or produced)
WRITING (Story and Screenplay--based on material not previously published or produced)
WRITING (Story and Screenplay--written directly for the screen)
WRITING (Title Writing)
Collection resource
This is an endpoint that returns a collection of Oscar-winning movies.
For example:
localhost:8080/winner
Each endpoint returns a Movie
object that contains fields about the movie. Each Movie
has an array of Award
s that the movie has been nominated for, or won.
For example
http://localhost:8080/movie/top%20gun
returns this JSON response:
{
"title": "Top Gun",
"year": "1986",
"ceremony": "59",
"awards": [
{
"category": "FILM EDITING",
"name": "Billy Weber, Chris Lebenzon",
"winner": false
},
{
"category": "MUSIC (Original Song)",
"name": "Music by Giorgio Moroder; Lyric by Tom Whitlock",
"winner": true
},
{
"category": "SOUND",
"name": "Donald O. Mitchell, Kevin O'Connell, Rick Kline, William B. Kaplan",
"winner": false
},
{
"category": "SOUND EFFECTS EDITING",
"name": "Cecelia Hall, George Watters II",
"winner": false
}
],
"genre": "Action, Drama",
"plot": "Lieutenant Pete \"Maverick\" Mitchell is an expert United States Naval Aviator. When he encounters a pair of MiGs over the Persian Gulf, his wingman is clearly outflown and freaks. On almost no fuel, Maverick is able to talk him back down to the carrier. When his wingman turns in his wings, Maverick is moved up in the standings and sent to the Top Gun Naval Flying School. There he fights the attitudes of the other pilots and an old story of his father's death in combat that killed others due to his father's error. Maverick struggles to be the best pilot, stepping on the toes of his other students and in another way to Charlie Blackwood, a civilian instructor to whom he is strongly attracted.",
"poster": "https://m.media-amazon.com/images/M/MV5BZjQxYTA3ODItNzgxMy00N2Y2LWJlZGMtMTRlM2JkZjI1ZDhhXkEyXkFqcGdeQXVyNDk3NzU2MTQ@._V1_SX300.jpg",
"website": "https://www.imdb.com/title/tt0092099/",
"error": "false"
}
For endpoints that return a collection, the return JSON will be an array of Movie
objects.
If a specified movie or category isn't found, an error message is returned along with a status code. For example:
{
"error": "Category not found",
"status_code": 404
}