Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

elevator-participant project

The goal of this project is to provide a test server with some implementations.

How to use it

Compile

At root of code-elevator project : compile everything.

$ mvn compile

Launch ParticipantsServer

$ java -classpath elevator-core/target/classes:elevator-participant/target/classes elevator.participant.ParticipantsServer

Register users

Assume that an elevator server is launched at http://localhost:8080 :

  • email : a unique email optionaly linked to a gravatar account

  • pseudo : a unique pseudo to identify user

  • elevator_engine : empty or an / ending elevator engine name. Available names can be found on file elevator-core/src/main/resources/META-INF/services/elevator.engine.ElevatorEngine

    $ curl --request POST http://localhost:8080/resources/player/register\?email\=&pseudo=&serverURL=http://localhost:8081/<elevator_engine/>

Password of current session is in requestBody of this response.

More actions

$ curl --basic --user "<email>:<password>" --request post --url http://localhost:8080/resources/player/pause
$ curl --basic --user "<email>:<password>" --request post --url http://localhost:8080/resources/player/resume
$ curl --basic --user "<email>:<password>" --request post --url http://localhost:8080/resources/player/reset
$ curl --basic --user "<email>:<password>" --request post --url http://localhost:8080/resources/player/unregister