Toggle navigation
Toggle navigation
This project
Loading...
Sign in
백승욱
/
movie-reco-chatbot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
문성준
2022-06-03 20:06:51 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f9c6bbd604401dd0b75748507ed186b0c364730c
f9c6bbd6
1 parent
91c8849e
Modify url
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
MovieList.js
MovieList.js
View file @
f9c6bbd
...
...
@@ -3,7 +3,7 @@ const request = require('request');
var
config
=
require
(
'./config.json'
);
const
TARGET_URL
=
'https://api.line.me/v2/bot/message/reply'
const
TOKEN
=
config
.
TOKEN
;
const
KOFIC_URL
_MovieList
=
'http://www.kobis.or.kr/kobisopenapi/webservice/rest/movie/searchMovieList.json
'
const
KOFIC_URL
=
'http://www.kobis.or.kr/kobisopenapi/webservice/rest
'
const
bodyParser
=
require
(
'body-parser'
);
//Enter a movie title in the message variable.
...
...
@@ -12,7 +12,7 @@ exports.movielist = function (replyToken, message) {
var
encodedMessage
=
encodeURI
(
message
);
request
.
get
(
{
url
:
KOFIC_URL
_MovieList
+
`
?key=
${
config
.
KOFIC_KEY_MovieList
}
&movieNm=
${
encodedMessage
}
`
,
url
:
KOFIC_URL
+
`/movie/searchMovieList.json
?key=
${
config
.
KOFIC_KEY_MovieList
}
&movieNm=
${
encodedMessage
}
`
,
json
:
true
},(
error
,
response
,
body
)
=>
{
if
(
!
error
&&
response
.
statusCode
==
200
)
{
...
...
Please
register
or
login
to post a comment