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
박찬수
2022-06-04 22:52:57 +0900
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
f433b3f0786a7d1ff20a332b13f3f040aeb97b57
f433b3f0
2 parents
75648cc6
73ede12a
soccer commit
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
16 deletions
.DS_Store
reply.js
soccer.js
.DS_Store
deleted
100644 → 0
View file @
75648cc
No preview for this file type
reply.js
View file @
f433b3f
...
...
@@ -9,6 +9,8 @@ const HTTPS = require('https');
const
domain
=
"2018102191.osschatbot2022.tk"
const
sslport
=
23023
;
var
soccer
=
require
(
'./soccer.js'
);
const
bodyParser
=
require
(
'body-parser'
);
var
app
=
express
();
app
.
use
(
bodyParser
.
json
());
...
...
@@ -26,6 +28,8 @@ app.post('/hook', function (req, res) {
console
.
log
(
'[request message]'
,
eventObj
.
message
);
console
.
log
(
"Receive Message : "
,
eventObj
.
message
.
text
);
console
.
log
(
soccer
.
GetPlayerInfo
(
276
,
2019
));
request
.
post
(
{
url
:
TARGET_URL
,
...
...
soccer.js
View file @
f433b3f
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'
:
'526fc70a2e8b315e9a960ac4b4764191'
}
};
request
(
options
,
function
(
error
,
response
)
{
if
(
error
)
throw
new
Error
(
error
);
console
.
log
(
response
.
body
);
});
\ No newline at end of file
module
.
exports
=
{
GetPlayerInfo
:
function
(
playerID
,
season
){
var
request
=
require
(
'request'
);
var
options
=
{
method
:
'GET'
,
url
:
'https://v3.football.api-sports.io/players'
,
qs
:
{
id
:
playerID
,
season
:
season
},
headers
:
{
'x-rapidapi-host'
:
'v3.football.api-sports.io'
,
'x-rapidapi-key'
:
'526fc70a2e8b315e9a960ac4b4764191'
}
};
request
(
options
,
function
(
error
,
response
)
{
if
(
error
)
throw
new
Error
(
error
);
console
.
log
(
response
.
body
);
});
}
}
...
...
Please
register
or
login
to post a comment