Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Command and Conquer Ladder API built in Node, Restify and MongoDB

License

NotificationsYou must be signed in to change notification settings

sean3z/cncnet-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coverage StatusPayPal donateMIT License

This is an open source WOL leaderboard emulator for legacyWestwood Studios games; specifically, those hosted byCnCNet. Ideally though, this application should work with any client sending WOLv1 or WOLv2 Game Resolution packets. This application serves several REST API endpoints (documented below) to consume and post leaderboard data.

Games Supported

Usage

  1. npm install --production
  2. npm start

REST API Endpoints

There's a few params listed below.

  • :game can be any of the following^(td|d2k?|ra2?|ts|dta|fs|yr|am)$
  • :gameId can only be numeric(\d+)
  • :player and:clan can be alpha-numeric with some special characters(\w\d\[\])
General Endpoints
  • GET/ping to ensure that the server is online
Leaderboard Endpoints
  • POST/ladder/:game accepts gameres packet (via POST body) for the supplied:game
  • GET/ladder/:game will return the top 150 leaderboard players for the supplied:game
  • GET/ladder/:game/game/:gameId will return all data for a given:gameId
  • GET/ladder/:game/player/:player will return most data for given:player
Clan Endpoints

URL/ladder/:game/clan/:clan is used for the following methods. Most of these endpoints require authorization similar to Player Authentication.

  • GET will return most data for the given:clan (does not require auth)
  • PUT create the given:clan
  • POST willjoin,part ormodify (supplied toaction query) the given:clan
  • DELETE permanently delete the given:clan
Player Authentication
  • GET/auth/:player HTTP authentication using Account credentials

Successful authentication of this endpoint will return anJSON Web Token which can be used to call subsequent endpoints which require auth. This endpoint usesbasic HTTP authentication.

example player auth request

curl -isu Tahj:MyPassword http://localhost:4007/auth/tahj3z
Account Creation
  • PUT/auth/:player using HTTP authentication

Accounts can be created using this endpoint. After an account has been created, users can then proceed to login using thePlayer Authentication endpoint above. Future iterations will allow consumers to additionally update Account information using this endpoint.

Contributing

The below subjects outline how to extend the functionality of this project. Any help is warmly accepted and greatly appreciated! :)

Debugging

Windows

set DEBUG=wol:leaderboard,-not-thisgrunt serve

Mac

DEBUG=wol:leaderboard grunt serve

MongoDB

Leaderboard stats are stored viaMongoDB. You'll need this installed for local development. You can start Mongo using the following command.

mongod --dbpath data/db

About

Command and Conquer Ladder API built in Node, Restify and MongoDB

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp