Showing
1 changed file
with
6 additions
and
5 deletions
... | @@ -41,7 +41,7 @@ function weekendBoxOfficeMovie() { | ... | @@ -41,7 +41,7 @@ function weekendBoxOfficeMovie() { |
41 | } | 41 | } |
42 | //Returns the title, year of release, names of directors and actors. | 42 | //Returns the title, year of release, names of directors and actors. |
43 | //The return format is array and index is as follows: | 43 | //The return format is array and index is as follows: |
44 | -//[title, year of release, director, actor1, actor2] | 44 | +//[title, year of release, director, actor1, actor2, moviecode] |
45 | async function movieinfo(message){ | 45 | async function movieinfo(message){ |
46 | moviecdlist = await weekendBoxOfficeMovie(); | 46 | moviecdlist = await weekendBoxOfficeMovie(); |
47 | 47 | ||
... | @@ -77,9 +77,10 @@ async function movieinfo(message){ | ... | @@ -77,9 +77,10 @@ async function movieinfo(message){ |
77 | var actor_1 = body.movieInfoResult.movieInfo.actors[0].peopleNm | 77 | var actor_1 = body.movieInfoResult.movieInfo.actors[0].peopleNm |
78 | var actor_2 = body.movieInfoResult.movieInfo.actors[1].peopleNm | 78 | var actor_2 = body.movieInfoResult.movieInfo.actors[1].peopleNm |
79 | } | 79 | } |
80 | - movieresult.push([title, openyear, director, actor_1, actor_2]) | 80 | + var moviecode_rc = body.movieInfoResult.movieInfo.movieCd |
81 | + movieresult.push([title, openyear, director, actor_1, actor_2, moviecode_rc]) | ||
81 | 82 | ||
82 | - } //제목, 개봉년도, 감독, 배우1, 배우2 | 83 | + } //제목, 개봉년도, 감독, 배우1, 배우2, 영화코드 |
83 | } | 84 | } |
84 | resolve(movieresult); | 85 | resolve(movieresult); |
85 | } | 86 | } |
... | @@ -89,7 +90,7 @@ async function movieinfo(message){ | ... | @@ -89,7 +90,7 @@ async function movieinfo(message){ |
89 | } | 90 | } |
90 | 91 | ||
91 | //Enter a movie genre in the message variable. | 92 | //Enter a movie genre in the message variable. |
92 | -//It will then return movie title, year of release, director and actor information to Line Messenger. | 93 | +//It will then return movie title, year of release, director, actor and moviecode information to Line Messenger. |
93 | exports.movieRecommend = async function(replyToken, message){ | 94 | exports.movieRecommend = async function(replyToken, message){ |
94 | var movieresult = []; | 95 | var movieresult = []; |
95 | while(1){ | 96 | while(1){ |
... | @@ -103,7 +104,7 @@ exports.movieRecommend = async function(replyToken, message){ | ... | @@ -103,7 +104,7 @@ exports.movieRecommend = async function(replyToken, message){ |
103 | } | 104 | } |
104 | var movierecommend_output = ''; | 105 | var movierecommend_output = ''; |
105 | for(let i = 0; i < movieresult.length; i++){ | 106 | for(let i = 0; i < movieresult.length; i++){ |
106 | - movierecommend_output += `제목: ${movieresult[i][0]}(${movieresult[i][1]})\n감독: ${movieresult[i][2]}\n배우: ${movieresult[i][3]}, ${movieresult[i][4]}\n` | 107 | + movierecommend_output += `제목: ${movieresult[i][0]}(${movieresult[i][1]})\n감독: ${movieresult[i][2]}\n배우: ${movieresult[i][3]}, ${movieresult[i][4]}\n영화코드: ${movieresult[i][5]}` |
107 | } | 108 | } |
108 | request.post( | 109 | request.post( |
109 | { | 110 | { | ... | ... |
-
Please register or login to post a comment