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 21:56:17 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
a21537f0624f879d5087f973f8117be0be8ed9e3
a21537f0
1 parent
fe6d782e
commit
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
reply.js
soccer.js
reply.js
View file @
a21537f
...
...
@@ -28,7 +28,7 @@ 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));
console
.
log
(
soccer
.
GetPlayerInfo
(
276
,
2019
));
request
.
post
(
{
...
...
soccer.js
View file @
a21537f
...
...
@@ -15,10 +15,9 @@ request(options, function (error, response) {
console
.
log
(
response
.
body
);
});
module
.
exports
=
function
()
{
this
.
GetPlayerInfo
=
function
(
playerID
,
season
){
module
.
exports
=
{
GetPlayerInfo
:
function
(
playerID
,
season
){
var
request
=
require
(
'request'
);
var
options
=
{
method
:
'GET'
,
url
:
'https://v3.football.api-sports.io/players'
,
...
...
@@ -28,12 +27,9 @@ module.exports = function(){
'x-rapidapi-key'
:
'526fc70a2e8b315e9a960ac4b4764191'
}
};
request
(
options
,
function
(
error
,
response
)
{
if
(
error
)
throw
new
Error
(
error
);
console
.
log
(
response
.
body
);
return
response
.
body
;
});
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment