Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이혜인
/
Multiplex_Ticketing_Platform
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
ShinSeungMin
2022-05-16 22:23:49 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2723ca46c1249d1834eaf7aabdfbbb617a439d97
2723ca46
1 parent
e7c67670
Add get rank feature
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
BoxOffice/app.js
BoxOffice/app.js
View file @
2723ca4
...
...
@@ -18,23 +18,29 @@ let date = year + month + day-1;
//console.log(date);
let
key
=
"b70513efc156d7b826bb8dc98ff2f1cf"
;
let
url
=
"http://kobis.or.kr/kobisopenapi/webservice/rest/boxoffice/searchDailyBoxOfficeList.json?key="
+
key
+
"&targetDt="
;
let
rank
=
5
//
apiurl = url + date + "&itemPerPage=" +rank-> "출력할 박스오피스 순위(5: 5위 까지, 10 : 10위 까지.../기본, 최대 10)"
let
url
=
"http://kobis.or.kr/kobisopenapi/webservice/rest/boxoffice/searchDailyBoxOfficeList.json?key="
+
key
+
"&targetDt="
+
date
+
"&itemPerPage="
;
//
let rank = 5
//apiurl = url + date + "&itemPerPage=" +rank-> "출력할 박스오피스 순위(5: 5위 까지, 10 : 10위 까지.../기본, 최대 10)"
//console.log(url);
let
options
=
{
'method'
:
'GET'
,
'url'
:
url
+
date
+
"&itemPerPage="
+
rank
'url'
:
url
//
+ rank
};
request
(
options
,
function
(
error
,
response
,
body
){
if
(
error
){
throw
new
Error
(
error
);
}
let
info
=
JSON
.
parse
(
body
);
console
.
log
(
info
);
});
app
.
get
(
'/BoxOffice'
,(
req
,
res
)
=>
{
options
.
url
=
url
+
req
.
body
.
rank
;
//console.log(req.body.rank);
request
(
options
,
function
(
error
,
response
,
body
){
if
(
error
){
throw
new
Error
(
error
);
}
let
info
=
JSON
.
parse
(
body
);
res
.
send
(
info
);
});
})
// 박스오피스 순위 출력
...
...
Please
register
or
login
to post a comment