Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이종상
/
OSS-2021-Project2015
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
이종상
2021-06-10 16:17:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d97e2cea38120d3fa7e78a4b4def0d24f36fb270
d97e2cea
1 parent
5c90c28f
temp modified
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
Project/app.js
Project/app.js
View file @
d97e2ce
...
...
@@ -16,6 +16,7 @@ const bodyParser = require('body-parser');
var
app
=
express
();
var
stack
=
0
;
var
meal
,
country
,
cold
,
spicy
;
var
teststring
;
app
.
use
(
bodyParser
.
json
());
app
.
post
(
'/hook'
,
function
(
req
,
res
)
{
...
...
@@ -179,6 +180,14 @@ https://developers.naver.com/docs/search/local/
else
if
(
stack
==
4
&&
(
eventObj
.
message
.
text
.
indexOf
(
"결과"
)
!==
-
1
))
{
{
const
option
=
{
query
:
'순대'
,
start
:
1
,
display
:
3
,
sort
:
'sim'
,
filter
:
'small'
}
ImageSearch
(
option
);
request
.
post
(
{
...
...
@@ -191,8 +200,9 @@ https://developers.naver.com/docs/search/local/
"messages"
:[
{
"type"
:
"text"
,
"text"
:
"잠시만 기다려주세요!"
// 결과 도출
"text"
:
teststring
// 결과 도출
}
]
}
},(
error
,
response
,
body
)
=>
{
...
...
@@ -203,14 +213,7 @@ https://developers.naver.com/docs/search/local/
console
.
log
(
'[request message]'
,
country
);
console
.
log
(
'[request message]'
,
cold
);
console
.
log
(
'[request message]'
,
spicy
);
const
option
=
{
query
:
'순대'
,
start
:
1
,
display
:
3
,
sort
:
'sim'
,
filter
:
'small'
}
ImageSearch
(
option
);
}
...
...
@@ -287,8 +290,10 @@ function ImageSearch(option) {
}
},
function
(
err
,
res
,
body
){
let
json
=
JSON
.
parse
(
body
)
console
.
log
(
json
)
const
json
=
JSON
.
parse
(
body
);
console
.
log
(
json
.
items
[
0
].
link
);
teststring
=
json
.
items
[
0
].
link
;
})
}
...
...
Please
register
or
login
to post a comment