- Clone the repostory into a folder
- Open cmd, powershell or git bash in current folder
- Enter the "dotnet build" and wait for around 5 min
- Edit AppSettings for connection string of MySQL(like user, password, server, and port)
- Run command "dotnet ef database update"
- Then enter "dotnet run" and open "https://localhost:{port}/"
In Header add:
{
Key: Authorization
value: Bearer + "Token from Login"
}
Register: "https://localhost:{port}/api/Auth/register"
{
"username" : "testuser",
"password" : "Password@1",
"gender" : "Male"/ "female",
"dateOfBirth" : "12/04/2000",
"knownAs" : "user",
"city" : "Delhi",
"country" : "India"
}
Login : "https://localhost:{port}/api/Auth/login"
{
"username": "testuser",
"Password": "Password@1"
}
Single User: "https://localhost:{port}/api/users/{id}"
All Users : "https://localhost:{port}/api/users"
Update User: "https://localhost:{port}/api/users/{id}"
[{
"op": "replace"/"copy",
"path": "username",
"value": "newvalue"
},
{
"op": "replace"/"copy",
"path": "password",
"value": "newvalue"
},
{
"op": "replace"/"copy",
"path": "knownAs",
"value": "newvalue"
},
{
"op": "replace"/"copy",
"path": "city",
"value": "newvalue"
},
{
"op": "replace"/"copy",
"path": "country",
"value": "newvalue"
}]
Single Message: "https://localhost:{port}/api/users/{userId}/messages/{id}"
Messages : "https://localhost:{port}/api/users/{userId}/messages"
Create Message : "https://localhost:{port}/api/users/{userId}/messages"
{
"senderId" : 1,
"receiverId" : 2,
"content" : "Hello"
}
MarkAsRead Message: "https://localhost:{port}/api/users/{userId}/messages/{id}/read"
DeleteMessage : "https://localhost:{port}/api/users/{userId}/messages/{id}"
Single Photo : "https://localhost:{port}/api/users/{userId}/photos/{id}"
Post Photo : "https://localhost:{port}/api/users/{userId}/photos/"
{
"File" : uploaded_file.png,
"description": "File added"
}