Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-arena-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro-arena-api
Commits
04531254
Commit
04531254
authored
Dec 31, 2017
by
ganjingcun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ads
parent
2ac5d7ef
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
411 additions
and
58 deletions
+411
-58
routes/api.js
routes/api.js
+367
-14
test.js
test.js
+44
-44
No files found.
routes/api.js
View file @
04531254
This diff is collapsed.
Click to expand it.
test.js
View file @
04531254
...
@@ -6,27 +6,27 @@ var moment = require('moment')
...
@@ -6,27 +6,27 @@ var moment = require('moment')
// var url = 'https://mycard.moe/ygopro/api/score'
// var url = 'https://mycard.moe/ygopro/api/score'
//
var url = 'http://localhost:3000/api/score'
var
url
=
'
http://localhost:3000/api/score
'
//
console.log( moment().format())
console
.
log
(
moment
().
format
())
//
superagent
superagent
//
.post(url)
.
post
(
url
)
//
.send({
.
send
({
//
accesskey: "XnvGjNG8jttfjYWhtqtgRfWBtyEwjMaF",
accesskey
:
"
XnvGjNG8jttfjYWhtqtgRfWBtyEwjMaF
"
,
//
usernameA: "Joe1991",
usernameA
:
"
Joe1991
"
,
//
usernameB: "zh99998",
usernameB
:
"
zh99998
"
,
//
userscoreA: 1,
userscoreA
:
1
,
// userscoreB: 1
,
userscoreB
:
2
,
//
start: moment().format(),
start
:
moment
().
format
(),
//
end: moment().add(6,'m').format(),
end
:
moment
().
add
(
6
,
'
m
'
).
format
(),
//
arena: 'athletic' // 'athletic' 竞技 or 'entertain' 娱乐
arena
:
'
athletic
'
// 'athletic' 竞技 or 'entertain' 娱乐
//
})
})
//
.end(function (err, res) {
.
end
(
function
(
err
,
res
)
{
//
if (err) {
if
(
err
)
{
//
console.log(err)
console
.
log
(
err
)
//
return
return
//
}
}
//
console.log(res.text)
console
.
log
(
res
.
text
)
//
})
})
// var Utils = require('./utils/utils')
// var Utils = require('./utils/utils')
...
@@ -42,26 +42,26 @@ var moment = require('moment')
...
@@ -42,26 +42,26 @@ var moment = require('moment')
var
url
=
'
http://gate-d-wzs.592you.comgate-d-wzs.592you.com/users/login
'
// var url = 'http://gate-d-wzs.592you.comgate-d-wzs.592you.com/users/login'
console
.
log
(
moment
().
format
())
// console.log(moment().format())
superagent
// superagent
.
post
(
url
)
// .post(url)
.
send
({
// .send({
"
\
/api
\
/users
\
/login
"
:
""
,
// "\/api\/users\/login": "",
"
channel
"
:
"
H5_weixin
"
,
// "channel": "H5_weixin",
"
server_ext_for_login
"
:
"
{
\"
version
\"
:
\"
03586d01_977
\"
}
"
,
// "server_ext_for_login":"{\"version\": \"03586d01_977\"}",
"
code
"
:
"
06110Di20G5jcG1Dl2i209hZi2010DiB
"
,
// "code": "06110Di20G5jcG1Dl2i209hZi2010DiB",
"
is_debug_mode
"
:
"
false
"
,
// "is_debug_mode": "false",
"
plugin_id
"
:
"
347
"
,
// "plugin_id": "347",
"
private_key
"
:
"
BA26F2670407E0B8664DDA544026FA54
"
,
// "private_key": "BA26F2670407E0B8664DDA544026FA54",
"
state
"
:
"
public
"
,
// "state": "public",
"
uapi_key
"
:
"
FA90DD7F-F026-10BD-5B17-CAE9DAB0AAD3
"
,
// "uapi_key": "FA90DD7F-F026-10BD-5B17-CAE9DAB0AAD3",
"
uapi_secret
"
:
"
890702b0854094bdd285bf583eff98d3
"
// "uapi_secret": "890702b0854094bdd285bf583eff98d3"
})
// })
.
end
(
function
(
err
,
res
)
{
// .end(function (err, res) {
if
(
err
)
{
// if (err) {
console
.
log
(
err
)
// console.log(err)
return
// return
}
// }
console
.
log
(
res
.
text
)
// console.log(res.text)
})
// })
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment