이종규
Committed by EC2 Default User

Final_Update

1 +const express = require('express');
2 +const fs = require('fs');
3 +const path = require('path');
4 +const HTTPS = require('https');
5 +const domain = "2020105107.osschatbot.cf"
6 +const sslport = 23023;
7 +const app = express();
8 +
9 +app.use(express.urlencoded({ extended: false }));
10 +app.use(express.json());
11 +
12 +var club = require('./club');
13 +var haksik = require('./haksik');
14 +var haksa = require('./haksa');
15 +
16 +app.post('/message', (req, res) => {
17 + const question = req.body.userRequest.utterance;
18 + const goMain = '처음으로';
19 + var data;
20 +
21 + // 학사정보 간편보기
22 + if(question == "간편하게 보는 학사정보"){
23 + data = haksa.Haksa_Information(data);
24 + }
25 +
26 + //동아리 정보 보기 - 서울캠 공연
27 + if(question== "바운스" || question == "bounce"){
28 + data = club.Bounce(data);
29 + }else if(question == "GLEE" || question == "glee"){
30 + data = club.GLEE(data);
31 + }else if(question == "MDOP" || question == "mdop"){
32 + data = club.MDOP(data);
33 + }else if(question == "NAKED" || question == "네이키드"){
34 + data = club.NAKED(data);
35 + }else if(question == "경희극장"){
36 + data = club.Khutheatre(data);
37 + }else if(question == "노래여울"){
38 + data = club.Noraeyeoul(data);
39 + }else if(question == "발광"){
40 + data = club.Balgwang(data);
41 + }else if(question == "발라드림"){
42 + data = club.Balladream(data);
43 + }else if(question == "칸타빌레"){
44 + data = club.Cantabile(data);
45 + }
46 +
47 + //동아리 정보 보기 - 서울캠 학술
48 + if(question == "ABS" || question == "abs"){
49 + data = club.ABS(data);
50 + }else if(question == "ACE" || question == "ace"){
51 + data = club.ACE(data);
52 + }else if(question == "IDS" || question == "ids"){
53 + data = club.IDS(data);
54 + }else if(question == "SEN경희" || question == "sen경희"){
55 + data = club.SENkh(data);
56 + }else if(question == "UNSA" || question == "unsa"){
57 + data = club.UNSA(data);
58 + }else if(question == "이감"){
59 + data = club.Egam(data);
60 + }
61 +
62 + //동아리 정보 보기 - 서울캠 봉사
63 + if(question == "miraKHle" || question == "mirakhle"){
64 + data = club.miraKHle(data);
65 + }else if(question == "PTPI" || question == "ptpi"){
66 + data = club.PTPI(data);
67 + }else if(question == "바인"){
68 + data = club.VINE(data);
69 + }
70 +
71 + //동아리 정보 보기 - 서울캠 체육
72 + if(question == "BRAVES" || question == "braves"){
73 + data = club.BRAVES(data);
74 + }else if(question == "ESpers" || question == "espers"){
75 + data = club.ESpers(data);
76 + }else if(question == "FAKIE" || question == "fakie"){
77 + data = club.FAKIE(data);
78 + }else if(question == "KUTA" || question == "kuta"){
79 + data = club.KUTA(data);
80 + }else if(question == "WBA" || question == "wba"){
81 + data = club.WBA(data);
82 + }else if(question == "검도부"){
83 + data = club.KENDO(data);
84 + }else if(question == "경희랑달리기"){
85 + data = club.Running_with_kyunghee(data);
86 + }else if(question == "산악부"){
87 + data = club.Alpine(data);
88 + }else if(question == "스키부"){
89 + data = club.SKI(data);
90 + }else if(question == "유혼"){
91 + data = club.JUDO(data);
92 + }else if(question == "태권도부"){
93 + data = club.TKD(data);
94 + }
95 +
96 + //동아리 정보 보기 - 서울캠 종교
97 + if(question == "CCC" || question == "ccc"){
98 + data = club.CCC(data);
99 + }else if(question == "IVF" || question == "ivf"){
100 + data = club.IVF(data);
101 + }else if(question == "JOY" || question == "joy"){
102 + data = club.JOY(data);
103 + }else if(question == "SFC" || question == "sfc"){
104 + data = club.SFC(data);
105 + }else if(question == "경불회"){
106 + data = club.Buddha(data);
107 + }else if(question == "네비게이토"){
108 + data = club.Navigators(data);
109 + }else if(question == "경희기독교연합동아리"){
110 + data = club.CCC_agape(data);
111 + }
112 +
113 + //동아리 정보 보기 - 서울캠 취미, 교양
114 + if(question == "PLANET-X" || question == "planet-x"){
115 + data = club.PLANET_X(data);
116 + }else if(question == "SENET" || question == "senet"){
117 + data = club.SENET(data);
118 + }else if(question == "유스호스텔"){
119 + data = club.YH(data);
120 + }
121 +
122 + //동아리 정보 보기 -서울캠 전시, 창작
123 + if(question == "KHPC" || question == "khpc"){
124 + data = club.KHPC(data);
125 + }else if(question == "경희서도회"){
126 + data = club.Groups_kh(data);
127 + }else if(question == "그림자 놀이" || question == "그림자놀이"){
128 + data = club.ShadowPlay(data);
129 + }else if(question == "문맥"){
130 + data = club.Munmaek(data);
131 + }else if(question == "카피울림"){
132 + data = club.CopyWoolim(data);
133 + }
134 +
135 + //학식
136 + if (question == "서울캠퍼스") {
137 + data = haksik.Seoul(data);
138 + }else if (question == "국제캠퍼스") {
139 + data = haksik.Global(data);
140 + }
141 +
142 +
143 + res.json(data);
144 +});
145 +
146 +try {
147 + const option = {
148 + ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
149 + key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
150 + cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
151 + };
152 +
153 + HTTPS.createServer(option, app).listen(sslport, () => {
154 + console.log(`[HTTPS] Server is started on port ${sslport}`);
155 + });
156 +} catch (error) {
157 + console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
158 + console.log(error);
159 +}
1 +const express = require('express');
2 +const app = express();
3 +
4 +app.use(express.urlencoded({ extended: false }));
5 +app.use(express.json());
6 +var club_data;
7 +
8 +//동아리 정보 보기
9 +
10 +//BOUNCE
11 +module.exports.Bounce = function(club_data){
12 + club_data = {
13 + "version": "2.0",
14 + "template": {
15 + "outputs": [
16 + {
17 + "listCard": {
18 + "header": {
19 + "title": "BOUNCE"
20 + },
21 + "items": [
22 + {
23 + "title": "Instagram",
24 + "description": "인스타그램으로 이동",
25 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
26 + "link": {
27 + "web": "https://www.instagram.com/official_bnc/"
28 + }
29 + },
30 + {
31 + "title": "Facebook",
32 + "description": "페이스북으로 이동",
33 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
34 + "link": {
35 + "web": "https://m.facebook.com/khubounce"
36 + }
37 + },
38 + {
39 + "title": "Youtube",
40 + "description": "유튜브로 이동",
41 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
42 + "link": {
43 + "web": "https://m.youtube.com/channel/UCdqjjUiX3nTsr0neeC1ovvw"
44 + }
45 + }
46 + ]
47 + }
48 + }
49 + ]
50 + }
51 + }
52 + return club_data;
53 +}
54 +
55 +//GLEE
56 +module.exports.GLEE = function(club_data){
57 + club_data = {
58 + "version": "2.0",
59 + "template": {
60 + "outputs": [
61 + {
62 + "listCard": {
63 + "header": {
64 + "title": "GLEE"
65 + },
66 + "items": [
67 + {
68 + "title": "Instagram",
69 + "description": "인스타그램으로 이동",
70 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
71 + "link": {
72 + "web": "https://www.instagram.com/khu_glee_choir"
73 + }
74 + },
75 + {
76 + "title": "Facebook",
77 + "description": "페이스북으로 이동",
78 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
79 + "link": {
80 + "web": "https://www.facebook.com/gleekhu"
81 + }
82 + },
83 + {
84 + "title": "Youtube",
85 + "description": "유튜브로 이동",
86 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
87 + "link": {
88 + "web": "https://www.youtube.com/channel/UCCr7JucZypMTEFWlfRZaPpQ"
89 + }
90 + }
91 + ]
92 + }
93 + }
94 + ]
95 + }
96 + }
97 + return club_data;
98 +}
99 +
100 +
101 +//MDOP
102 +module.exports.MDOP = function(club_data){
103 + club_data = {
104 + "version": "2.0",
105 + "template": {
106 + "outputs": [
107 + {
108 + "listCard": {
109 + "header": {
110 + "title": "MDOP"
111 + },
112 + "items": [
113 + {
114 + "title": "Instagram",
115 + "description": "인스타그램으로 이동",
116 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
117 + "link": {
118 + "web": "http://www.instagram.com/khu_mdop"
119 + }
120 + },
121 + {
122 + "title": "Facebook",
123 + "description": "페이스북으로 이동",
124 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
125 + "link": {
126 + "web": "http://www.facebook.com/khumdop"
127 + }
128 + },
129 + {
130 + "title": "Youtube",
131 + "description": "유튜브로 이동",
132 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
133 + "link": {
134 + "web": "https://www.youtube.com/channel/UCDF_aWEw_geoDWi6KDhsYjQ/featured"
135 + }
136 + }
137 + ]
138 + }
139 + }
140 + ]
141 + }
142 + }
143 + return club_data;
144 +}
145 +
146 +
147 +//NAKED
148 +module.exports.NAKED = function(club_data){
149 + club_data = {
150 + "version": "2.0",
151 + "template": {
152 + "outputs": [
153 + {
154 + "listCard": {
155 + "header": {
156 + "title": "NAKED"
157 + },
158 + "items": [
159 + {
160 + "title": "Instagram",
161 + "description": "인스타그램으로 이동",
162 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
163 + "link": {
164 + "web": "https://instagram.com/khunaked707?igshid=xotf371lj448"
165 + }
166 + },
167 + {
168 + "title": "Facebook",
169 + "description": "페이스북으로 이동",
170 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
171 + "link": {
172 + "web": "https://m.facebook.com/khunaked707/"
173 + }
174 + },
175 + {
176 + "title": "Youtube",
177 + "description": "유튜브로 이동",
178 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
179 + "link": {
180 + "web": "https://m.youtube.com/channel/UCMwOGeMFAB3HZQ1i8FwWvUg"
181 + }
182 + }
183 + ]
184 + }
185 + }
186 + ]
187 + }
188 + }
189 + return club_data;
190 +}
191 +
192 +
193 +//경희극장
194 +module.exports.Khutheatre = function(club_data){
195 + club_data = {
196 + "version": "2.0",
197 + "template": {
198 + "outputs": [
199 + {
200 + "listCard": {
201 + "header": {
202 + "title": "경희극장"
203 + },
204 + "items": [
205 + {
206 + "title": "Instagram",
207 + "description": "인스타그램으로 이동",
208 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
209 + "link": {
210 + "web": "http://www.instagram.com/khutheatre"
211 + }
212 + },
213 + {
214 + "title": "Facebook",
215 + "description": "페이스북으로 이동",
216 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
217 + "link": {
218 + "web": "http://www.facebook.com/khutheatre"
219 + }
220 + },
221 + {
222 + "title": "Youtube",
223 + "description": "유튜브로 이동",
224 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
225 + "link": {
226 + "web": "https://www.youtube.com/channel/UCbv8P2HP47MdpqIZfCz6SHA"
227 + }
228 + }
229 + ]
230 + }
231 + }
232 + ]
233 + }
234 + }
235 + return club_data;
236 +}
237 +
238 +
239 +
240 +//노래여울
241 +module.exports.Noraeyeoul = function(club_data){
242 + club_data = {
243 + "version": "2.0",
244 + "template": {
245 + "outputs": [
246 + {
247 + "listCard": {
248 + "header": {
249 + "title": "노래여울"
250 + },
251 + "items": [
252 + {
253 + "title": "Instagram",
254 + "description": "인스타그램으로 이동",
255 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
256 + "link": {
257 + "web": "https://www.instagram.com/khu_noraeyeoul"
258 + }
259 + },
260 + {
261 + "title": "Facebook",
262 + "description": "페이스북으로 이동",
263 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
264 + "link": {
265 + "web": "https://www.facebook.com/groups/khunoraeyeoul"
266 + }
267 + }
268 + ]
269 + }
270 + }
271 + ]
272 + }
273 + }
274 + return club_data;
275 +}
276 +
277 +
278 +//발광
279 +module.exports.Balgwang = function(club_data){
280 + club_data = {
281 + "version": "2.0",
282 + "template": {
283 + "outputs": [
284 + {
285 + "listCard": {
286 + "header": {
287 + "title": "발광"
288 + },
289 + "items": [
290 + {
291 + "title": "Instagram",
292 + "description": "인스타그램으로 이동",
293 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
294 + "link": {
295 + "web": "https://instagram.com/balgwang_official?igshid=19lktk6i8edt9"
296 + }
297 + },
298 + {
299 + "title": "Facebook",
300 + "description": "페이스북으로 이동",
301 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
302 + "link": {
303 + "web": "https://www.facebook.com/groups/356266174420488/?ref=share"
304 + }
305 + },
306 + {
307 + "title": "Youtube",
308 + "description": "유튜브로 이동",
309 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
310 + "link": {
311 + "web": "https://www.youtube.com/c/BalGwangKH/featured"
312 + }
313 + }
314 + ]
315 + }
316 + }
317 + ]
318 + }
319 + }
320 + return club_data;
321 +}
322 +
323 +
324 +//발라드림
325 +module.exports.Balladream = function(club_data){
326 + club_data = {
327 + "version": "2.0",
328 + "template": {
329 + "outputs": [
330 + {
331 + "listCard": {
332 + "header": {
333 + "title": "발라드림"
334 + },
335 + "items": [
336 + {
337 + "title": "Instagram",
338 + "description": "인스타그램으로 이동",
339 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
340 + "link": {
341 + "web": "https://www.instagram.com/balladream_khu/"
342 + }
343 + },
344 + {
345 + "title": "Facebook",
346 + "description": "페이스북으로 이동",
347 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
348 + "link": {
349 + "web": "https://www.facebook.com/balladreamkhu/"
350 + }
351 + },
352 + {
353 + "title": "Youtube",
354 + "description": "유튜브로 이동",
355 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
356 + "link": {
357 + "web": "https://youtube.com/channel/UCclYm0zH7QGsSKAX1hArJXA"
358 + }
359 + }
360 + ]
361 + }
362 + }
363 + ]
364 + }
365 + }
366 + return club_data;
367 +}
368 +
369 +
370 +//칸타빌레
371 +module.exports.Cantabile = function(club_data){
372 + club_data = {
373 + "version": "2.0",
374 + "template": {
375 + "outputs": [
376 + {
377 + "listCard": {
378 + "header": {
379 + "title": "칸타빌레"
380 + },
381 + "items": [
382 + {
383 + "title": "Instagram",
384 + "description": "인스타그램으로 이동",
385 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
386 + "link": {
387 + "web": "https://instagram.com/cantabile_khu"
388 + }
389 + },
390 + {
391 + "title": "Facebook",
392 + "description": "페이스북으로 이동",
393 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
394 + "link": {
395 + "web": "https://facebook.com/khucantabile"
396 + }
397 + }
398 + ]
399 + }
400 + }
401 + ]
402 + }
403 + }
404 + return club_data;
405 +}
406 +
407 +
408 +//ABS
409 +module.exports.ABS = function(club_data){
410 + club_data = {
411 + "version": "2.0",
412 + "template": {
413 + "outputs": [
414 + {
415 + "listCard": {
416 + "header": {
417 + "title": "ABS"
418 + },
419 + "items": [
420 + {
421 + "title": "Instagram",
422 + "description": "인스타그램으로 이동",
423 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
424 + "link": {
425 + "web": "https://instagram.com/khu.abs"
426 + }
427 + },
428 + {
429 + "title": "Facebook",
430 + "description": "페이스북으로 이동",
431 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
432 + "link": {
433 + "web": "https://m.facebook.com/KHUABS"
434 + }
435 + }
436 + ]
437 + }
438 + }
439 + ]
440 + }
441 + }
442 + return club_data;
443 +}
444 +
445 +
446 +//ACE
447 +module.exports.ACE = function(club_data){
448 + club_data = {
449 + "version": "2.0",
450 + "template": {
451 + "outputs": [
452 + {
453 + "listCard": {
454 + "header": {
455 + "title": "ACE"
456 + },
457 + "items": [
458 + {
459 + "title": "Facebook",
460 + "description": "페이스북으로 이동",
461 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
462 + "link": {
463 + "web": "http://www.facebook.com/groups/137902359636682"
464 + }
465 + }
466 + ]
467 + }
468 + }
469 + ]
470 + }
471 + }
472 + return club_data;
473 +}
474 +
475 +
476 +//IDS
477 +module.exports.IDS = function(club_data){
478 + club_data = {
479 + "version": "2.0",
480 + "template": {
481 + "outputs": [
482 + {
483 + "listCard": {
484 + "header": {
485 + "title": "IDS"
486 + },
487 + "items": [
488 + {
489 + "title": "Instagram",
490 + "description": "인스타그램으로 이동",
491 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
492 + "link": {
493 + "web": "https://instagram.com/ids_khu?igshid=p5j2ehidjx5"
494 + }
495 + },
496 + {
497 + "title": "Facebook",
498 + "description": "페이스북으로 이동",
499 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
500 + "link": {
501 + "web": "https://www.facebook.com/khuids"
502 + }
503 + }
504 + ]
505 + }
506 + }
507 + ]
508 + }
509 + }
510 + return club_data;
511 +}
512 +
513 +
514 +//SEN경희
515 +module.exports.SENkh = function(club_data){
516 + club_data = {
517 + "version": "2.0",
518 + "template": {
519 + "outputs": [
520 + {
521 + "listCard": {
522 + "header": {
523 + "title": "SEN경희"
524 + },
525 + "items": [
526 + {
527 + "title": "Instagram",
528 + "description": "인스타그램으로 이동",
529 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
530 + "link": {
531 + "web": "https://www.instagram.com/senkyunghee/"
532 + }
533 + },
534 + {
535 + "title": "Facebook",
536 + "description": "페이스북으로 이동",
537 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
538 + "link": {
539 + "web": "http://www.facebook.com/SenKh"
540 + }
541 + }
542 + ]
543 + }
544 + }
545 + ]
546 + }
547 + }
548 + return club_data;
549 +}
550 +
551 +
552 +//UNSA
553 +module.exports.UNSA = function(club_data){
554 + club_data = {
555 + "version": "2.0",
556 + "template": {
557 + "outputs": [
558 + {
559 + "listCard": {
560 + "header": {
561 + "title": "UNSA"
562 + },
563 + "items": [
564 + {
565 + "title": "Facebook",
566 + "description": "페이스북으로 이동",
567 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
568 + "link": {
569 + "web": "https://www.facebook.com/khunsarok"
570 + }
571 + }
572 + ]
573 + }
574 + }
575 + ]
576 + }
577 + }
578 + return club_data;
579 +}
580 +
581 +
582 +//이감
583 +module.exports.Egam = function(club_data){
584 + club_data = {
585 + "version": "2.0",
586 + "template": {
587 + "outputs": [
588 + {
589 + "listCard": {
590 + "header": {
591 + "title": "이감"
592 + },
593 + "items": [
594 + {
595 + "title": "Instagram",
596 + "description": "인스타그램으로 이동",
597 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
598 + "link": {
599 + "web": "http://www.instagram.com/khu_egam"
600 + }
601 + },
602 + {
603 + "title": "Facebook",
604 + "description": "페이스북으로 이동",
605 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
606 + "link": {
607 + "web": "http://www.facebook.com/khuegam"
608 + }
609 + },
610 + {
611 + "title": "Youtube",
612 + "description": "유튜브로 이동",
613 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
614 + "link": {
615 + "web": "https://www.youtube.com/channel/UCNabfFaCLjk96Gu_QhsIdEw/featured"
616 + }
617 + }
618 + ]
619 + }
620 + }
621 + ]
622 + }
623 + }
624 + return club_data;
625 +}
626 +
627 +
628 +//miraKHle
629 +module.exports.miraKHle = function(club_data){
630 + club_data = {
631 + "version": "2.0",
632 + "template": {
633 + "outputs": [
634 + {
635 + "listCard": {
636 + "header": {
637 + "title": "miraKHle"
638 + },
639 + "items": [
640 + {
641 + "title": "Instagram",
642 + "description": "인스타그램으로 이동",
643 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
644 + "link": {
645 + "web": "https://www.instagram.com/mirakhle_khu/"
646 + }
647 + },
648 + {
649 + "title": "Facebook",
650 + "description": "페이스북으로 이동",
651 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
652 + "link": {
653 + "web": "https://www.facebook.com/miraKHle"
654 + }
655 + }
656 + ]
657 + }
658 + }
659 + ]
660 + }
661 + }
662 + return club_data;
663 +}
664 +
665 +//PTPI
666 +module.exports.PTPI = function(club_data){
667 + club_data = {
668 + "version": "2.0",
669 + "template": {
670 + "outputs": [
671 + {
672 + "listCard": {
673 + "header": {
674 + "title": "PTPI"
675 + },
676 + "items": [
677 + {
678 + "title": "Facebook",
679 + "description": "페이스북으로 이동",
680 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
681 + "link": {
682 + "web": "https://www.facebook.com/khuptpi/"
683 + }
684 + }
685 + ]
686 + }
687 + }
688 + ]
689 + }
690 + }
691 + return club_data;
692 +}
693 +
694 +
695 +//바인
696 +module.exports.VINE = function(club_data){
697 + club_data = {
698 + "version": "2.0",
699 + "template": {
700 + "outputs": [
701 + {
702 + "listCard": {
703 + "header": {
704 + "title": "바인"
705 + },
706 + "items": [
707 + {
708 + "title": "Instagram",
709 + "description": "인스타그램으로 이동",
710 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
711 + "link": {
712 + "web": "https://www.instagram.com/vine_khu/"
713 + }
714 + }
715 + ]
716 + }
717 + }
718 + ]
719 + }
720 + }
721 + return club_data;
722 +}
723 +
724 +
725 +//BRAVES
726 +module.exports.BRAVES = function(club_data){
727 + club_data = {
728 + "version": "2.0",
729 + "template": {
730 + "outputs": [
731 + {
732 + "listCard": {
733 + "header": {
734 + "title": "BRAVES"
735 + },
736 + "items": [
737 + {
738 + "title": "Instagram",
739 + "description": "인스타그램으로 이동",
740 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
741 + "link": {
742 + "web": "https://www.instagram.com/khu_braves/"
743 + }
744 + }
745 + ]
746 + }
747 + }
748 + ]
749 + }
750 + }
751 + return club_data;
752 +}
753 +
754 +
755 +//ESpers
756 +module.exports.ESpers = function(club_data){
757 + club_data = {
758 + "version": "2.0",
759 + "template": {
760 + "outputs": [
761 + {
762 + "listCard": {
763 + "header": {
764 + "title": "ESpers"
765 + },
766 + "items": [
767 + {
768 + "title": "Instagram",
769 + "description": "인스타그램으로 이동",
770 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
771 + "link": {
772 + "web": "https://www.instagram.com/khu_espers"
773 + }
774 + },
775 + {
776 + "title": "Facebook",
777 + "description": "페이스북으로 이동",
778 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
779 + "link": {
780 + "web": "https://www.facebook.com/KHUESPers"
781 + }
782 + },
783 + {
784 + "title": "Youtube",
785 + "description": "유튜브로 이동",
786 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
787 + "link": {
788 + "web": "https://www.youtube.com/channel/UCTO0oNF-0Ih_ECiDykhVnJA"
789 + }
790 + }
791 + ]
792 + }
793 + }
794 + ]
795 + }
796 + }
797 + return club_data;
798 +}
799 +
800 +
801 +//FAKIE
802 +module.exports.FAKIE = function(club_data){
803 + club_data = {
804 + "version": "2.0",
805 + "template": {
806 + "outputs": [
807 + {
808 + "listCard": {
809 + "header": {
810 + "title": "FAKIE"
811 + },
812 + "items": [
813 + {
814 + "title": "Instagram",
815 + "description": "인스타그램으로 이동",
816 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
817 + "link": {
818 + "web": "https://instagram.com/fakie_khu?igshid=1efy6hh5zh4f"
819 + }
820 + }
821 + ]
822 + }
823 + }
824 + ]
825 + }
826 + }
827 + return club_data;
828 +}
829 +
830 +
831 +//KUTA
832 +module.exports.KUTA = function(club_data){
833 + club_data = {
834 + "version": "2.0",
835 + "template": {
836 + "outputs": [
837 + {
838 + "listCard": {
839 + "header": {
840 + "title": "KUTA"
841 + },
842 + "items": [
843 + {
844 + "title": "Instagram",
845 + "description": "인스타그램으로 이동",
846 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
847 + "link": {
848 + "web": "https://instagram.com/kuta_tennis?igshid=1nvufgi0d4rvb"
849 + }
850 + }
851 + ]
852 + }
853 + }
854 + ]
855 + }
856 + }
857 + return club_data;
858 +}
859 +
860 +
861 +//WBA
862 +module.exports.WBA = function(club_data){
863 + club_data = {
864 + "version": "2.0",
865 + "template": {
866 + "outputs": [
867 + {
868 + "listCard": {
869 + "header": {
870 + "title": "WBA"
871 + },
872 + "items": [
873 + {
874 + "title": "Instagram",
875 + "description": "인스타그램으로 이동",
876 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
877 + "link": {
878 + "web": "https://instagram.com/khu_wba"
879 + }
880 + }
881 + ]
882 + }
883 + }
884 + ]
885 + }
886 + }
887 + return club_data;
888 +}
889 +
890 +
891 +//검도부
892 +module.exports.KENDO = function(club_data){
893 + club_data = {
894 + "version": "2.0",
895 + "template": {
896 + "outputs": [
897 + {
898 + "listCard": {
899 + "header": {
900 + "title": "WBA"
901 + },
902 + "items": [
903 + {
904 + "title": "Instagram",
905 + "description": "인스타그램으로 이동",
906 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
907 + "link": {
908 + "web": "http://www.instagram.com/khu_kendo"
909 + }
910 + }
911 + ]
912 + }
913 + }
914 + ]
915 + }
916 + }
917 + return club_data;
918 +}
919 +
920 +
921 +//경희랑달리기
922 +module.exports.Running_with_kyunghee = function(club_data){
923 + club_data = {
924 + "version": "2.0",
925 + "template": {
926 + "outputs": [
927 + {
928 + "listCard": {
929 + "header": {
930 + "title": "경희랑달리기"
931 + },
932 + "items": [
933 + {
934 + "title": "Instagram",
935 + "description": "인스타그램으로 이동",
936 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
937 + "link": {
938 + "web": "http://www.instagram.com/running_with_kyunghee"
939 + }
940 + }
941 + ]
942 + }
943 + }
944 + ]
945 + }
946 + }
947 + return club_data;
948 +}
949 +
950 +
951 +//산악부
952 +module.exports.Alpine = function(club_data){
953 + club_data = {
954 + "version": "2.0",
955 + "template": {
956 + "outputs": [
957 + {
958 + "listCard": {
959 + "header": {
960 + "title": "산악부"
961 + },
962 + "items": [
963 + {
964 + "title": "Instagram",
965 + "description": "인스타그램으로 이동",
966 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
967 + "link": {
968 + "web": "https://www.instagram.com/kyunghee_alpine1949/"
969 + }
970 + }
971 + ]
972 + }
973 + }
974 + ]
975 + }
976 + }
977 + return club_data;
978 +}
979 +
980 +
981 +//스키부
982 +module.exports.SKI = function(club_data){
983 + club_data = {
984 + "version": "2.0",
985 + "template": {
986 + "outputs": [
987 + {
988 + "listCard": {
989 + "header": {
990 + "title": "스키부"
991 + },
992 + "items": [
993 + {
994 + "title": "Instagram",
995 + "description": "인스타그램으로 이동",
996 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
997 + "link": {
998 + "web": "https://www.instagram.com/khu_ski_/"
999 + }
1000 + }
1001 + ]
1002 + }
1003 + }
1004 + ]
1005 + }
1006 + }
1007 + return club_data;
1008 +}
1009 +
1010 +//유혼
1011 +module.exports.JUDO = function(club_data){
1012 + club_data = {
1013 + "version": "2.0",
1014 + "template": {
1015 + "outputs": [
1016 + {
1017 + "listCard": {
1018 + "header": {
1019 + "title": "유혼"
1020 + },
1021 + "items": [
1022 + {
1023 + "title": "Instagram",
1024 + "description": "인스타그램으로 이동",
1025 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1026 + "link": {
1027 + "web": "https://www.instagram.com/khu_judo/"
1028 + }
1029 + }
1030 + ]
1031 + }
1032 + }
1033 + ]
1034 + }
1035 + }
1036 + return club_data;
1037 +}
1038 +
1039 +//태권도부
1040 +module.exports.TKD = function(club_data){
1041 + club_data = {
1042 + "version": "2.0",
1043 + "template": {
1044 + "outputs": [
1045 + {
1046 + "listCard": {
1047 + "header": {
1048 + "title": "태권도부"
1049 + },
1050 + "items": [
1051 + {
1052 + "title": "Instagram",
1053 + "description": "인스타그램으로 이동",
1054 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1055 + "link": {
1056 + "web": "https://instagram.com/khutkd.lv?igshid=hgefdtv3oz0o"
1057 + }
1058 + }
1059 + ]
1060 + }
1061 + }
1062 + ]
1063 + }
1064 + }
1065 + return club_data;
1066 +}
1067 +
1068 +
1069 +//CCC
1070 +module.exports.CCC = function(club_data){
1071 + club_data = {
1072 + "version": "2.0",
1073 + "template": {
1074 + "outputs": [
1075 + {
1076 + "listCard": {
1077 + "header": {
1078 + "title": "CCC"
1079 + },
1080 + "items": [
1081 + {
1082 + "title": "Instagram",
1083 + "description": "인스타그램으로 이동",
1084 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1085 + "link": {
1086 + "web": "https://www.instagram.com/khu_ccc/"
1087 + }
1088 + },
1089 + {
1090 + "title": "Facebook",
1091 + "description": "페이스북으로 이동",
1092 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
1093 + "link": {
1094 + "web": "https://www.facebook.com/KHUTips/"
1095 + }
1096 + },
1097 + {
1098 + "title": "Youtube",
1099 + "description": "유튜브로 이동",
1100 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
1101 + "link": {
1102 + "web": "https://youtube.com/channel/UClHgGjKz8_kIvfiHEHoMZMw"
1103 + }
1104 + }
1105 + ]
1106 + }
1107 + }
1108 + ]
1109 + }
1110 + }
1111 + return club_data;
1112 +}
1113 +
1114 +
1115 +//IVF
1116 +module.exports.IVF = function(club_data){
1117 + club_data = {
1118 + "version": "2.0",
1119 + "template": {
1120 + "outputs": [
1121 + {
1122 + "listCard": {
1123 + "header": {
1124 + "title": "IVF"
1125 + },
1126 + "items": [
1127 + {
1128 + "title": "Instagram",
1129 + "description": "인스타그램으로 이동",
1130 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1131 + "link": {
1132 + "web": "http://www.instagram.com/khu_ivf"
1133 + }
1134 + }
1135 + ]
1136 + }
1137 + }
1138 + ]
1139 + }
1140 + }
1141 + return club_data;
1142 +}
1143 +
1144 +
1145 +//JOY
1146 +module.exports.JOY = function(club_data){
1147 + club_data = {
1148 + "version": "2.0",
1149 + "template": {
1150 + "outputs": [
1151 + {
1152 + "listCard": {
1153 + "header": {
1154 + "title": "JOY"
1155 + },
1156 + "items": [
1157 + {
1158 + "title": "Instagram",
1159 + "description": "인스타그램으로 이동",
1160 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1161 + "link": {
1162 + "web": "https://instagram.com/withjoy2021?igshid=lu1ogs1tbw47"
1163 + }
1164 + }
1165 + ]
1166 + }
1167 + }
1168 + ]
1169 + }
1170 + }
1171 + return club_data;
1172 +}
1173 +
1174 +
1175 +//SFC
1176 +module.exports.SFC = function(club_data){
1177 + club_data = {
1178 + "version": "2.0",
1179 + "template": {
1180 + "outputs": [
1181 + {
1182 + "listCard": {
1183 + "header": {
1184 + "title": "SFC"
1185 + },
1186 + "items": [
1187 + {
1188 + "title": "Instagram",
1189 + "description": "인스타그램으로 이동",
1190 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1191 + "link": {
1192 + "web": "https://instagram.com/seoul_u_sfc?igshid=1fq90pq0mzvyh"
1193 + }
1194 + }
1195 + ]
1196 + }
1197 + }
1198 + ]
1199 + }
1200 + }
1201 + return club_data;
1202 +}
1203 +
1204 +
1205 +//경불회
1206 +module.exports.Buddha = function(club_data){
1207 + club_data = {
1208 + "version": "2.0",
1209 + "template": {
1210 + "outputs": [
1211 + {
1212 + "listCard": {
1213 + "header": {
1214 + "title": "경불회"
1215 + },
1216 + "items": [
1217 + {
1218 + "title": "Instagram",
1219 + "description": "인스타그램으로 이동",
1220 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1221 + "link": {
1222 + "web": "http://www.instagram.com/buddha_khu"
1223 + }
1224 + }
1225 + ]
1226 + }
1227 + }
1228 + ]
1229 + }
1230 + }
1231 + return club_data;
1232 +}
1233 +
1234 +
1235 +//네비게이토
1236 +module.exports.Navigators = function(club_data){
1237 + club_data = {
1238 + "version": "2.0",
1239 + "template": {
1240 + "outputs": [
1241 + {
1242 + "listCard": {
1243 + "header": {
1244 + "title": "네비게이토"
1245 + },
1246 + "items": [
1247 + {
1248 + "title": "Facebook",
1249 + "description": "페이스북으로 이동",
1250 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
1251 + "link": {
1252 + "web": "https://facebook.com/khunavigators/"
1253 + }
1254 + }
1255 + ]
1256 + }
1257 + }
1258 + ]
1259 + }
1260 + }
1261 + return club_data;
1262 +}
1263 +
1264 +
1265 +//경희기독교연합동아리
1266 +module.exports.CCC_agape = function(club_data){
1267 + club_data = {
1268 + "version": "2.0",
1269 + "template": {
1270 + "outputs": [
1271 + {
1272 + "listCard": {
1273 + "header": {
1274 + "title": "네비게이토"
1275 + },
1276 + "items": [
1277 + {
1278 + "title": "Facebook",
1279 + "description": "페이스북으로 이동",
1280 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
1281 + "link": {
1282 + "web": "https://www.instagram.com/khu_ccc_agape/"
1283 + }
1284 + }
1285 + ]
1286 + }
1287 + }
1288 + ]
1289 + }
1290 + }
1291 + return club_data;
1292 +}
1293 +
1294 +
1295 +//PLANET-X
1296 +module.exports.PLANET_X = function(club_data){
1297 + club_data = {
1298 + "version": "2.0",
1299 + "template": {
1300 + "outputs": [
1301 + {
1302 + "listCard": {
1303 + "header": {
1304 + "title": "PLANET-X"
1305 + },
1306 + "items": [
1307 + {
1308 + "title": "Instagram",
1309 + "description": "인스타그램으로 이동",
1310 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1311 + "link": {
1312 + "web": "http://www.instagram.com/khu_planet_x"
1313 + }
1314 + }
1315 + ]
1316 + }
1317 + }
1318 + ]
1319 + }
1320 + }
1321 + return club_data;
1322 +}
1323 +
1324 +
1325 +//SENET
1326 +module.exports.SENET = function(club_data){
1327 + club_data = {
1328 + "version": "2.0",
1329 + "template": {
1330 + "outputs": [
1331 + {
1332 + "listCard": {
1333 + "header": {
1334 + "title": "SENET"
1335 + },
1336 + "items": [
1337 + {
1338 + "title": "Instagram",
1339 + "description": "인스타그램으로 이동",
1340 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1341 + "link": {
1342 + "web": "https://www.instagram.com/senet_khu/"
1343 + }
1344 + }
1345 + ]
1346 + }
1347 + }
1348 + ]
1349 + }
1350 + }
1351 + return club_data;
1352 +}
1353 +
1354 +
1355 +//유스호스텔
1356 +module.exports.YH = function(club_data){
1357 + club_data = {
1358 + "version": "2.0",
1359 + "template": {
1360 + "outputs": [
1361 + {
1362 + "listCard": {
1363 + "header": {
1364 + "title": "유스호스텔"
1365 + },
1366 + "items": [
1367 + {
1368 + "title": "Instagram",
1369 + "description": "인스타그램으로 이동",
1370 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1371 + "link": {
1372 + "web": "https://instagram.com/khu_youthhostel?igshid=2rx4dyodd3lv"
1373 + }
1374 + },
1375 + {
1376 + "title": "Facebook",
1377 + "description": "페이스북으로 이동",
1378 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
1379 + "link": {
1380 + "web": "https://www.facebook.com/%EA%B2%BD%ED%9D%AC-%EC%9C%A0%EC%8A%A4%ED%98%B8%EC%8A%A4%ED%85%94-100627254629228/?ref=page_internal"
1381 + }
1382 + }
1383 + ]
1384 + }
1385 + }
1386 + ]
1387 + }
1388 + }
1389 + return club_data;
1390 +}
1391 +
1392 +
1393 +//KHPC
1394 +module.exports.KHPC = function(club_data){
1395 + club_data = {
1396 + "version": "2.0",
1397 + "template": {
1398 + "outputs": [
1399 + {
1400 + "listCard": {
1401 + "header": {
1402 + "title": "KHPC"
1403 + },
1404 + "items": [
1405 + {
1406 + "title": "Instagram",
1407 + "description": "인스타그램으로 이동",
1408 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1409 + "link": {
1410 + "web": "https://instagram.com/khpc2021?igshid=tht4hur641xn"
1411 + }
1412 + },
1413 + {
1414 + "title": "Facebook",
1415 + "description": "페이스북으로 이동",
1416 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
1417 + "link": {
1418 + "web": "http://www.facebook.com/khpc1970"
1419 + }
1420 + }
1421 + ]
1422 + }
1423 + }
1424 + ]
1425 + }
1426 + }
1427 + return club_data;
1428 +}
1429 +
1430 +
1431 +//경희서도회
1432 +module.exports.Groups_kh = function(club_data){
1433 + club_data = {
1434 + "version": "2.0",
1435 + "template": {
1436 + "outputs": [
1437 + {
1438 + "listCard": {
1439 + "header": {
1440 + "title": "경희서도회"
1441 + },
1442 + "items": [
1443 + {
1444 + "title": "Facebook",
1445 + "description": "페이스북으로 이동",
1446 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
1447 + "link": {
1448 + "web": "https://www.facebook.com/groups/288267494577090"
1449 + }
1450 + }
1451 + ]
1452 + }
1453 + }
1454 + ]
1455 + }
1456 + }
1457 + return club_data;
1458 +}
1459 +
1460 +
1461 +//그림자 놀이
1462 +module.exports.ShadowPlay = function(club_data){
1463 + club_data = {
1464 + "version": "2.0",
1465 + "template": {
1466 + "outputs": [
1467 + {
1468 + "listCard": {
1469 + "header": {
1470 + "title": "그림자 놀이"
1471 + },
1472 + "items": [
1473 + {
1474 + "title": "Facebook",
1475 + "description": "페이스북으로 이동",
1476 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
1477 + "link": {
1478 + "web": "https://www.facebook.com/KHUSHADOWPLAY/"
1479 + }
1480 + },
1481 + {
1482 + "title": "Youtube",
1483 + "description": "유튜브로 이동",
1484 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/187/187209.png",
1485 + "link": {
1486 + "web": "https://youtube.com/user/Shadowplay60khu"
1487 + }
1488 + }
1489 + ]
1490 + }
1491 + }
1492 + ]
1493 + }
1494 + }
1495 + return club_data;
1496 +}
1497 +
1498 +
1499 +//문맥
1500 +module.exports.Munmaek = function(club_data){
1501 + club_data = {
1502 + "version": "2.0",
1503 + "template": {
1504 + "outputs": [
1505 + {
1506 + "listCard": {
1507 + "header": {
1508 + "title": "문맥"
1509 + },
1510 + "items": [
1511 + {
1512 + "title": "Facebook",
1513 + "description": "페이스북으로 이동",
1514 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/145/145802.png",
1515 + "link": {
1516 + "web": "http://www.facebook.com/munmaek"
1517 + }
1518 + }
1519 + ]
1520 + }
1521 + }
1522 + ]
1523 + }
1524 + }
1525 + return club_data;
1526 +}
1527 +
1528 +
1529 +//카피울림
1530 +module.exports.CopyWoolim = function(club_data){
1531 + club_data = {
1532 + "version": "2.0",
1533 + "template": {
1534 + "outputs": [
1535 + {
1536 + "listCard": {
1537 + "header": {
1538 + "title": "카피울림"
1539 + },
1540 + "items": [
1541 + {
1542 + "title": "Instagram",
1543 + "description": "인스타그램으로 이동",
1544 + "imageUrl": "https://cdn-icons-png.flaticon.com/128/733/733558.png",
1545 + "link": {
1546 + "web": "https://www.instagram.com/copywoolim/?hl=ko"
1547 + }
1548 + }
1549 + ]
1550 + }
1551 + }
1552 + ]
1553 + }
1554 + }
1555 + return club_data;
1556 +}
...\ No newline at end of file ...\ No newline at end of file
1 +const express = require('express');
2 +const app = express();
3 +
4 +app.use(express.urlencoded({ extended: false }));
5 +app.use(express.json());
6 +var haksa_data;
7 +
8 +//학사정보 간편보기
9 +module.exports.Haksa_Information = function(haksa_data){
10 + haksa_data = {
11 + "version": "2.0",
12 + "template": {
13 + "outputs": [
14 + {
15 + "listCard": {
16 + "header": {
17 + "title": "KHU 학사정보 알리미"
18 + },
19 + "items": [
20 + {
21 + "title": "장학금 공지사항",
22 + "description": "챗봇으로 손쉽게 알아보는 학사정보",
23 + "imageUrl": "https://mblogthumb-phinf.pstatic.net/20140716_293/envicontest_1405437648963lV4y4_GIF/University_Seal.gif?type=w2",
24 + "link": {
25 + "web": "https://www.khu.ac.kr/kor/notice/list.do?category=SCHOLARSHIP&page=1"
26 + }
27 + },
28 + {
29 + "title": "공용 소프트웨어가 필요할 땐?",
30 + "description": "경희대학교 정보처를 이용해보세요.",
31 + "imageUrl": "https://cdn-icons.flaticon.com/png/128/2888/premium/2888407.png?token=exp=1638455259~hmac=d58c655e0ac8a16809b48323ea83a75f",
32 + "link": {
33 + "web": "https://ois.khu.ac.kr/index.do?sso=ok"
34 + }
35 + },
36 + {
37 + "title": "학사 공지사항",
38 + "description": "학사 일정 공지사항 알아보기",
39 + "imageUrl": "https://cdn-icons.flaticon.com/png/128/3277/premium/3277431.png?token=exp=1638455425~hmac=4fe1afa937ad2ca62e17e25a34aa342e",
40 + "link": {
41 + "web": "https://www.khu.ac.kr/kor/notice/list.do?category=UNDERGRADUATE&page=1"
42 + }
43 + }
44 + ],
45 + "buttons": [
46 + {
47 + "label": "홈페이지 구경가기",
48 + "action": "webLink",
49 + "webLinkUrl": "https://www.khu.ac.kr/kor/main/index.do"
50 + }
51 + ]
52 + }
53 + }
54 + ]
55 + }
56 + }
57 + return haksa_data;
58 +}
...\ No newline at end of file ...\ No newline at end of file
1 +const express = require('express');
2 +const app = express();
3 +
4 +app.use(express.urlencoded({ extended: false }));
5 +app.use(express.json());
6 +var haksik_data;
7 +
8 +module.exports.Seoul = function(haksik_data){
9 + const goMain = '처음으로';
10 +
11 + haksik_data = {
12 + 'version': '2.0',
13 + 'template': {
14 + 'outputs': [{
15 + 'simpleImage': {
16 + 'imageUrl': "https://coop.khu.ac.kr/wp-content/uploads/2021/11/20211129-1301x2048.png",
17 + 'altText' : "서울캠퍼스 식단입니다."
18 + }
19 + }],
20 + 'quickReplies': [{
21 + 'label': goMain,
22 + 'action': 'message',
23 + 'messageText': goMain
24 + }]
25 + }
26 + }
27 + return haksik_data;
28 +}
29 +
30 +module.exports.Global = function(haksik_data){
31 + const goMain = '처음으로';
32 +
33 + haksik_data = {
34 + "version": "2.0",
35 + "template": {
36 + "outputs": [
37 + {
38 + "basicCard": {
39 + "title": "국제캠퍼스 학식",
40 + "description": "오늘의 학식은 무엇일까?!",
41 + "thumbnail": {
42 + "imageUrl": "https://ww.namu.la/s/e38da99cb3bbad5d4a7f19a015fc2a888e01a7c996bb18465f8ba242a21ac5b3d1f2f977094552b00c706aab9c5c7e48dedae0103ed84d8039376458bebeaf0c43c7642b2544a52a016d0633eeab043924071315d41e15ef8df134009508ec03"
43 + },
44 + "profile": {
45 + "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT4BJ9LU4Ikr_EvZLmijfcjzQKMRCJ2bO3A8SVKNuQ78zu2KOqM",
46 + "nickname": "학식"
47 + },
48 + "social": {
49 + "like": 1238,
50 + "comment": 8,
51 + "share": 780
52 + },
53 + "buttons": [
54 + {
55 + "action": "webLink",
56 + "label": "학식보기",
57 + "webLinkUrl": "https://www.khu.ac.kr/kor/forum/list.do?type=RESTAURANT&category=INTL&page=1"
58 + }
59 + ]
60 + }
61 + }
62 + ]
63 + }
64 + }
65 + return haksik_data;
66 +}
67 +
68 +
69 +
This diff could not be displayed because it is too large.
1 +{
2 + "name": "project",
3 + "version": "1.0.0",
4 + "description": "",
5 + "main": "app.js",
6 + "scripts": {
7 + "test": "echo \"Error: no test specified\" && exit 1"
8 + },
9 + "keywords": [],
10 + "author": "이종규",
11 + "license": "ISC",
12 + "dependencies": {
13 + "axios": "^0.24.0",
14 + "cheerio": "^1.0.0-rc.10",
15 + "express": "^4.17.1",
16 + "pm2": "^5.1.2"
17 + }
18 +}