An application for broadcasting data in rooms for your contacts.
After downloading repository you need to do some configurations to start the project.
For this run the following SQL:
create database rooms_broadcast;
create user 'username'@'%' identified by 'password';
use rooms_broadcast;
grant all on rooms_broadcast.* to 'username'@'%';
If you change 'username' and 'password' in the above code, make sure to update src/main/resources/application.properties with the same data
Run the following lines in commmand prompt with directory set to this project.
mvnw clean package
java -jar target/broadcast-0.0.1-SNAPSHOT.jar
POST http://localhost:8080/register
Content-type: application/json
RequestBody
{
"username": "user1",
"password": "user1"
}
{
"id": 1,
"username": "user1"
}
POST http://localhost:8080/authenticate
Content-type: application/json
RequestBody
{
"username": "user1",
"password": "user1",
"platform": "ios",
"uuid": "asdjflqkwer"
}
{
"jwtToken": "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ1c2VyMSIsInVzZXJfaWQiOjEsImV4cCI6MTU5Mjg0Mjg1NSwidXVpZCI6ImFzZGpmbHFrd2VyIiwiaWF0IjoxNTkyODI0ODU1LCJwbGF0Zm9ybSI6ImlvcyJ9.tnuQzNbpNJc_cQ97aEN9pKFPWfdMb9MD1rt_jIfV381F3rF27QVAcq-ptrbWqWaf3CXm65JT_6Dpn0lkOT-l8g"
}
POST http://localhost:8080/users/1/contacts
Content-type: application/json
RequestBody
{
"contactId":2
}
{
"id": 2,
"username": "user2"
}
POST http://localhost:8080/users/1/rooms
Content-type: application/json
{
"id": "FVb1bfz",
"ownerId": 1
}
GET http://localhost:8080/users/1
Content-type: application/json
{
"id": 1,
"username": "user1"
}
GET http://localhost:8080/users/1/rooms
Content-type: application/json
[
{
"id": "FVb1bfz",
"ownerId": 1
}
]
GET http://localhost:8080/users/1/contacts
Content-type: application/json
[
{
"id": 2,
"username": "user2"
},
{
"id": 3,
"username": "user3"
}
]