Showing
10 changed files
with
94 additions
and
0 deletions
.vscode/launch.json
0 → 100644
1 | +{ | ||
2 | + // Use IntelliSense to learn about possible attributes. | ||
3 | + // Hover to view descriptions of existing attributes. | ||
4 | + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
5 | + "version": "0.2.0", | ||
6 | + "configurations": [ | ||
7 | + { | ||
8 | + "type": "pwa-node", | ||
9 | + "request": "launch", | ||
10 | + "name": "Launch Program", | ||
11 | + "skipFiles": [ | ||
12 | + "<node_internals>/**" | ||
13 | + ], | ||
14 | + "program": "${workspaceFolder}/Weather.js" | ||
15 | + } | ||
16 | + ] | ||
17 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
Weather.js
0 → 100644
1 | +var request = require('request'); | ||
2 | + | ||
3 | +var url = 'http://apis.data.go.kr/1360000/VilageFcstInfoService_2.0/getUltraSrtNcst'; | ||
4 | +var queryParams = '?' + encodeURIComponent('serviceKey') + '=서비스키'; /* Service Key*/ | ||
5 | +queryParams += '&' + encodeURIComponent('pageNo') + '=' + encodeURIComponent('1'); /* */ | ||
6 | +queryParams += '&' + encodeURIComponent('numOfRows') + '=' + encodeURIComponent('1000'); /* */ | ||
7 | +queryParams += '&' + encodeURIComponent('dataType') + '=' + encodeURIComponent('XML'); /* */ | ||
8 | +queryParams += '&' + encodeURIComponent('base_date') + '=' + encodeURIComponent('20210628'); /* */ | ||
9 | +queryParams += '&' + encodeURIComponent('base_time') + '=' + encodeURIComponent('0600'); /* */ | ||
10 | +queryParams += '&' + encodeURIComponent('nx') + '=' + encodeURIComponent('55'); /* */ | ||
11 | +queryParams += '&' + encodeURIComponent('ny') + '=' + encodeURIComponent('127'); /* */ | ||
12 | + | ||
13 | +request({ | ||
14 | + url: url + queryParams, | ||
15 | + method: 'GET' | ||
16 | +}, function (error, response, body) { | ||
17 | + //console.log('Status', response.statusCode); | ||
18 | + //console.log('Headers', JSON.stringify(response.headers)); | ||
19 | + //console.log('Reponse received', body); | ||
20 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
node_modules/.package-lock.json
0 → 100644
1 | +{ | ||
2 | + "name": "take_an_umbrella", | ||
3 | + "lockfileVersion": 2, | ||
4 | + "requires": true, | ||
5 | + "packages": { | ||
6 | + "node_modules/http": { | ||
7 | + "version": "0.0.1-security", | ||
8 | + "resolved": "https://registry.npmjs.org/http/-/http-0.0.1-security.tgz", | ||
9 | + "integrity": "sha512-RnDvP10Ty9FxqOtPZuxtebw1j4L/WiqNMDtuc1YMH1XQm5TgDRaR1G9u8upL6KD1bXHSp9eSXo/ED+8Q7FAr+g==" | ||
10 | + } | ||
11 | + } | ||
12 | +} |
node_modules/http/README.md
0 → 100644
1 | +# Security holding package | ||
2 | + | ||
3 | +This package name is not currently in use, but was formerly occupied | ||
4 | +by another package. To avoid malicious use, npm is hanging on to the | ||
5 | +package name, but loosely, and we'll probably give it to you if you | ||
6 | +want it. | ||
7 | + | ||
8 | +You may adopt this package by contacting support@npmjs.com and | ||
9 | +requesting the name. |
node_modules/http/package.json
0 → 100644
package-lock.json
0 → 100644
1 | +{ | ||
2 | + "name": "take_an_umbrella", | ||
3 | + "lockfileVersion": 2, | ||
4 | + "requires": true, | ||
5 | + "packages": { | ||
6 | + "": { | ||
7 | + "dependencies": { | ||
8 | + "http": "^0.0.1-security" | ||
9 | + } | ||
10 | + }, | ||
11 | + "node_modules/http": { | ||
12 | + "version": "0.0.1-security", | ||
13 | + "resolved": "https://registry.npmjs.org/http/-/http-0.0.1-security.tgz", | ||
14 | + "integrity": "sha512-RnDvP10Ty9FxqOtPZuxtebw1j4L/WiqNMDtuc1YMH1XQm5TgDRaR1G9u8upL6KD1bXHSp9eSXo/ED+8Q7FAr+g==" | ||
15 | + } | ||
16 | + }, | ||
17 | + "dependencies": { | ||
18 | + "http": { | ||
19 | + "version": "0.0.1-security", | ||
20 | + "resolved": "https://registry.npmjs.org/http/-/http-0.0.1-security.tgz", | ||
21 | + "integrity": "sha512-RnDvP10Ty9FxqOtPZuxtebw1j4L/WiqNMDtuc1YMH1XQm5TgDRaR1G9u8upL6KD1bXHSp9eSXo/ED+8Q7FAr+g==" | ||
22 | + } | ||
23 | + } | ||
24 | +} |
1 | +https://www.data.go.kr/tcs/dss/selectApiDataDetailView.do?publicDataPk=15084084 기상청 | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
No preview for this file type
No preview for this file type
-
Please register or login to post a comment