Skip to content

Latest commit

 

History

History
115 lines (82 loc) · 2.1 KB

File metadata and controls

115 lines (82 loc) · 2.1 KB

Developper Documentation

View the book with " Book Mode".

Summary

Installations

Dependencies installation guide to develop the project correctly.

Install dependencies

Install SASS

brew install sass/sass/sass

Install TypeScript

sudo npm install -g typescript

Install TypeScript Watcher

sudo npm install ts-watch

Run SASS

sass --watch src/main/resources/static/css

Run TypeScript

npx ts-watch src/main/resources/static/js/*.script.ts --outDir src/main/resources/static/js/

Run Project

Find out how to start correctly the project.

Which file to start?

Start, open the project folder with IntelliJ IDEA. Right click on PorareApplication.java in src/main/java/com/codingfactory/porare and select Run PorareApplication.

API

The API documentation

User

Informations :

Get all users list

URL : http://localhost:8080/api/users

Method : GET

Multipart Form : false

Login/Register

Register

Informations :

Register a new user

URL : http://localhost:8080/api/register

Method : POST

Multipart Form : true

Required Multipart Form

  • username : String
  • email : String
  • password : String
  • confirmPassword : String

Returned Text

Return a token if the user is registered correctly. Otherwise, return false (String).

Get User Information

Informations :

Register a new user

URL : http://localhost:8080/api/getUserInformations

Method : POST

Multipart Form : true

Required Multipart Form

  • token : String

Returned JSON

Return user information if token is valid. Otherwise, return null.

  • userId : String
  • username : String
  • email : String

Get User Coins

Informations :

Get user coins

URL : http://localhost:8080/api/getUserCoins

Method : POST

Multipart Form : true

Required Multipart Form

  • token : String

Returned Text

Return user coins if token is valid. Otherwise, return 0.