Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍용민
/
BusTime
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-04 06:32:11 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b50b816396bf1a6b0ac15d4a76a8a7086ac33849
b50b8163
1 parent
083daede
basic-control
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
busterm_control.js
busterm_control.js
0 → 100644
View file @
b50b816
var
request
=
require
(
"sync-request"
);
var
station_servicekey
=
"8X6B2qUgjGCX4APyGjxTH13yYqgEFZ2jaGus469okviEDTS3TmlEFg6uyfW9I45HjBZQuzfXXHTDpr1bPfp3rA%3D%3D"
;
var
keyword_bus_number
=
"1112"
;
var
obj
=
[
"1112"
,
"7000"
,
"9"
,
"5100"
,
"1560"
];
var
route_station_url
=
"http://openapi.gbis.go.kr/ws/rest/busrouteservice"
;
var
busarrival_station_url
=
"http://openapi.gbis.go.kr/ws/rest/busarrivalservice"
;
var
serviceKey_string
=
"?serviceKey="
+
station_servicekey
+
"&"
;
for
(
var
i
=
0
;
i
<
obj
.
length
;
i
++
)
{
var
keyword_parameter
=
"keyword="
+
obj
[
i
];
console
.
log
(
keyword_parameter
);
var
uris
=
route_station_url
+
serviceKey_string
+
keyword_parameter
;
var
res
=
request
(
'GET'
,
uris
);
var
gotData
=
res
.
getBody
().
toString
();
console
.
log
(
gotData
);
}
\ No newline at end of file
Please
register
or
login
to post a comment