A Rest API for finding the best player to player match in a multiplayer game's dataset with kNN.
- The Rest API was developed with .NET Core 5.
- MongoDB was used as database.
The service has two model and two controller classes.
- Account : This class keeps user's authentication properties (id, e-mail, username, password).
- Player : In addition to the Account class, It keeps user's in-game properties and stats (status, level).
- Auth : This controller does authentication transactions (sign-in, sign-up, logout, delete).
- GameScene : This controller is for in-game actions (find-opponent and level-up). For to use "logout", "delete", "find-opponent", "level-up" methods client have to send a specific token.
First of all, create a MongoDB database and receive a connection string. After that, put this password to the API's Constants class' connectionInfo field.
- /api/v1/Auth/signup (username, password, email) [POST]
- /api/v1/Auth/signin (username, password, email) [POST]
- /api/v1/Auth/logout (username, token) [POST]
- /api/v1/Auth/delete (username, token) [POST]
- /api/v1/Auth/matchmaking (username, token) [GET]
- /api/v1/Auth/levelup (username, token) [PATCH]
A native iOS application was used to test the API. You can reach the repo from here.