Skip to content

Commit

Permalink
[feat] 영화 제목 검색 결과 dto에 tmdbId 필드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
syyling committed May 25, 2024
1 parent cc6f91e commit 20938dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ public MovieTitleResponse(String title) {
@Getter
@NoArgsConstructor
public static class MovieTitleSearchResponse {
private String tmdbId;
private String title;
private String director;
private String year;
private String poster;
private String nation;

@Builder
public MovieTitleSearchResponse(String title, String director, String year, String poster, String nation) {
public MovieTitleSearchResponse(String tmdbId, String title, String director, String year, String poster, String nation) {
this.tmdbId = tmdbId;
this.title = title;
this.director = director;
this.year = year;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public List<MovieResponse.MovieTitleSearchResponse> getMovieTitleSearchResult(St
if(j<directors.length()-1) director.append(",");
}
MovieResponse.MovieTitleSearchResponse tmdbMovieTitleSearchResponse = MovieResponse.MovieTitleSearchResponse.builder()
.tmdbId(result.get("id").toString())
.title(titleResult)
.year(year)
.poster("https://image.tmdb.org/t/p/original" + result.get("poster_path"))
Expand Down

0 comments on commit 20938dc

Please sign in to comment.