URL: /api/user/create/clan
Method: POST
Body:
{ "name": "string", "id": "string" }
Responses:
{ "status": "success", "data": { "id": "string", "name": "string", "createdById": "string" }, "message": "Clan created successfully" }
{ "message": "Clan with this name already exists" }
{ "error": "Error message" }
URL: /api/user/join/clan
Method: POST
Body:
{ "name": "string", "wallet_id": "string" }
Responses:
{ "status": "success", "data": { "id": "string", "name": "string", "createdById": "string" }, "message": "Player joined clan successfully" }
{ "message": "Player already joined this clan" }
{ "error": "Error message" }
URL: /api/user/clans
Method: GET
Responses:
{ "status": "success", "data": [ { "id": "string", "name": "string", "createdById": "string", "createdAt": "date", "updatedAt": "date", "players": "number" }, ... ] }
{ "error": "Error message" }
URL: /api/player/clan/:clan
Method: GET
Responses:
{ "status": "success", "data": { "id": "string", "name": "string", "createdById": "string", "players": [ { "id": "string", "name": "string", "wallet_id": "string" }, ... ] } }
{ "error": "Error message" }
URL: /api/player/clan/player/:wallet_id
Method: GET
Responses:
{ "status": "success", "data": { "id": "string", "wallet_id": "string", "clans": [ { "id": "string", "name": "string", "createdById": "string" }, ... ] } }
{ "error": "Error message" }
URL: /api/clan/points/:clan_name
Method: GET
Responses:
{ "status": "success", "data": { "total_points": "number" } }
{ "error": "Error message" }
URL: /api/clan/top-points
Method: GET
Responses:
{ "status": "success", "data": { "topFiveClans": { name: string, total_points: number }[] } }
{ "error": "Error message" }
URL: /api/clan/battle/points
Method: GET
Responses:
{ "status": "success", "data": { "clansBattlePoints": { name: string, points: number }[] } }
{ "error": "Error message" }
URL: /api/clan/event/battle/points
Method: GET
Responses:
{ "status": "success", "data": { "clansBattlePoints": { name: string, points: number }[] } }
{ "error": "Error message" }