Toggle navigation
Toggle navigation
This project
Loading...
Sign in
박찬수
/
enjoy_soccer
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
EC2 Default User
2022-06-01 18:14:02 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
61cd4477e971546351d039b90683f59dae0bd9c9
61cd4477
1 parent
8dfd4b7d
soccer script commit
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
reply.js
soccer.js
reply.js
View file @
61cd447
...
...
@@ -24,6 +24,7 @@ app.post('/hook', function (req, res) {
console
.
log
(
'[request]'
,
req
.
body
);
console
.
log
(
'[request source] '
,
eventObj
.
source
);
console
.
log
(
'[request message]'
,
eventObj
.
message
);
console
.
log
(
"Receive Message : "
,
eventObj
.
message
.
text
);
request
.
post
(
{
...
...
@@ -45,7 +46,7 @@ app.post('/hook', function (req, res) {
]
}
},(
error
,
response
,
body
)
=>
{
console
.
log
(
body
)
console
.
log
(
body
)
;
});
...
...
@@ -57,7 +58,7 @@ try {
ca
:
fs
.
readFileSync
(
'/etc/letsencrypt/live/'
+
domain
+
'/fullchain.pem'
),
key
:
fs
.
readFileSync
(
path
.
resolve
(
process
.
cwd
(),
'/etc/letsencrypt/live/'
+
domain
+
'/privkey.pem'
),
'utf8'
).
toString
(),
cert
:
fs
.
readFileSync
(
path
.
resolve
(
process
.
cwd
(),
'/etc/letsencrypt/live/'
+
domain
+
'/cert.pem'
),
'utf8'
).
toString
(),
key
:
fs
.
readFileSync
(
'./rootca.key'
),
//
key : fs.readFileSync('./rootca.key'),
// cert : fs.readFileSync('./rootca.crt')
};
...
...
soccer.js
0 → 100644
View file @
61cd447
var
request
=
require
(
'request'
);
var
options
=
{
method
:
'GET'
,
url
:
'https://v3.football.api-sports.io/players'
,
qs
:
{
id
:
'276'
,
season
:
'2019'
},
headers
:
{
'x-rapidapi-host'
:
'v3.football.api-sports.io'
,
'x-rapidapi-key'
:
'e8a0e218c8msh6742d80e6af318ep11271fjsn9b0927b5f4de'
}
};
request
(
options
,
function
(
error
,
response
)
{
if
(
error
)
throw
new
Error
(
error
);
console
.
log
(
response
.
body
);
});
\ No newline at end of file
Please
register
or
login
to post a comment