임승현

Merge branch 'feature/SearchingTheaters' into 'master'

Feature/searching theaters



See merge request !34
const express = require("express");
const app = express();
const bodyParser = require('body-parser');
const request = require("request");
const router = express.Router();
let kakaoOptions = {
url : "https://dapi.kakao.com/v2/local/search/keyword",
method : "GET",
headers : {
'Authorization': 'KakaoAK 56e51abe725086bc9db03da986e47fed'
},
qs: {
'query': 'CGV 광명',
//'category_group_code' : 'CT1',
'size' : 5
},
encoding : 'UTF-8'
};
request(kakaoOptions, function (err, res, body) {
info_list = JSON.parse(body).documents;
let selectable_theaters = [];
if(!err && res.statusCode == 200){
info_list.forEach(info => {
if(info.category_name.endsWith("CGV")){
const theater_info = {
"theater_name" : info.place_name,
"theater_url" : info.place_url
};
selectable_theaters.push(theater_info);
//console.log(theater_info);
}
});
}
});
module.exports = router;
\ No newline at end of file
{
"name": "test01",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"body-parser": "^1.17.1",
"express": "^4.15.2",
"express-session": "^1.15.2",
"java": "^16.0.1",
"request" : "^2.88.2"
}
}
\ No newline at end of file
module.exports= {
html: function(title,style,list,body,control){
return `
<!doctype html>
<html>
<head>
<title>WEB - ${title}</title>
<meta charset="utf-8">
</head>
<body>
<h1><a href="/">WEB</a></h1>
<div id="map" style=${style}></div>
${list}
${control}
${body}
<p></p>
</body>
</html>
`;
}
}
\ No newline at end of file
This diff is collapsed. Click to expand it.
<component name="libraryTable">
<library name="jsoup-1.15.1">
<CLASSES>
<root url="jar://$PROJECT_DIR$/jsoup-1.15.1.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file