sean3z / cncnet-api Goto Github PK
View Code? Open in Web Editor NEWCommand and Conquer Ladder API built in Node, Restify and MongoDB
Home Page: http://ladder.cncnet.org
License: MIT License
Command and Conquer Ladder API built in Node, Restify and MongoDB
Home Page: http://ladder.cncnet.org
License: MIT License
Need to know who is allied in any given game
Allow user to supply email address (and any other relevant fields) when being created
Also, need way to update password/modify user
Support for original game clients (in additional to CnCNet)
https://github.com/mafintosh/udp-request
Currently a new entry is created in auth
collection per player - duplicating username/password. Ideally, one entry per username/password combo with an array of nicks.
{
"id": "ObjectId",
"username": "String",
"password": "String",
"email": "String",
"nicks": [
"ObjectId"
]
}
Also need to logic to determine that the player passed in Packet or various endpoints, matches the auth username that was passed
http://ladder.cncnet.org/api/ladder/ts?limit=5
this doesn't seem to be working anymore despite tests?
tests/functional/ladder.spec.js#L496-L503
The client will request a list of authenticated users.
It will then match the response to it's internal list of ChannelUsers and mark the users that are authenticated.
Need to support more than 1v1
The API should allow consumers to POST
to /ladder/:game/game
to reserve a gameId in which stats can be posted to at a later time. Ideally, this should be called only once by the "Host" when they start any game.
The "Host" client can then communicate the "gameId" (from response) to all players within the game.
POST /ladder/yr/game HTTP 1.1
Authorization: Basic <hash>
{
"players": [{
"nam": "Wingle"
}],
"settings": {
"sped": 0,
"scen": "Some Map",
"unit": 1,
"aipl": 0,
"crat": 1,
"base": 1,
"supr": 0,
"shrt": 0,
"cred": 10000,
"trny": 1
}
}
Request Method: POST
Status Code: 201 Created
{
"gameId": 1,
"url": "/ladder/yr/game/1"
}
Need to determine if a packet field exists for clan matches
Save user passwords as hashed passwords.
As it stands, clients must maintain user credentials for auth required endpoints.
Should instead issue a JWT at auth-time and rely on Authorization: Bearer <jwt>
scheme
go lose some weight fatty
Create hof
(array) property in player object, so it can be easily displayed in the UI
player {
name: "(string)",
hof: [
'(string)', // November 2016
'(string)' // December 2016
]
}
trny
flagIn reference to 26af006, need to update all members of a given clan upon destroy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.