diff --git a/endpoints.txt b/endpoints.txt new file mode 100644 index 0000000..448bae8 --- /dev/null +++ b/endpoints.txt @@ -0,0 +1,100 @@ +GET /api/v1/tournir/list/{id} - Получить список турниров, на которые зарегистрирован участник по id участника + + +id: String +title: String? +description: String? +sport: String? +typeTournament: String? +typeGroup: String? +matchesNumbers: Int? +startTime: String? +createdAt: String? +entryCost: Double? +maxParticipants: Int? +registrationDeadline: String? +place: String? +organizedId: String? +tournirInstantState: String + + +POST /api/v1/tournir/{id} - Отправить информацию о турнире по его id при изменении состояния турнира + + +id: String +title: String? +description: String? +sport: String? +typeTournament: String? +typeGroup: String? +matchesNumbers: Int? +startTime: String? +createdAt: String? +entryCost: Double? +maxParticipants: Int? +registrationDeadline: String? +place: String? +organizedId: String? +tournirInstantState: String + + +GET /api/v1/MatchStats/{id} - Получить статистику матчей по id турнира + + +tournamentID: String +sport: String? +timePlayed: [String: Double]? (String - UserID, Double - значение) +goals: [String: Int]? +assists: [String: Int]? +fouls: [String: Int]? +points: [String: Int]? +knockdowns: [String: Int]? +setsWon: [String: Int]? +yellowCards: [String: Int]? +wins: [String: Int]? +loses: [String: Int]? +winnerID: String? + + +POST /api/v1/MatchStats/{id} - Отправить статистику матчей по id турнира + + +tournamentID: String +sport: String? +timePlayed: [String: Double]? (String - UserID, Double - значение) +goals: [String: Int]? +assists: [String: Int]? +fouls: [String: Int]? +points: [String: Int]? +knockdowns: [String: Int]? +setsWon: [String: Int]? +yellowCards: [String: Int]? +wins: [String: Int]? +loses: [String: Int]? +winnerID: String? + + +GET /api/v1/user/stat/{id} - Получить общую статистику пользователя по его id +sport: String? +wins: Int? +loses: Int? +matches: Int? +bigWins: Int? +winrate: Int? (число 0-100) + +GET /api/v1/tournir/set/{id(tournir)} – получение списка пар людей, которые будут соревноваться +id: String +title: String? +description: String? +sport: String? +typeTournament: String? +typeGroup: String? +matchesNumbers: Int? +startTime: String? +createdAt: String? +entryCost: Double? +maxParticipants: Int? +registrationDeadline: String? +place: String? +organizedId: String? +tournirInstantState: String diff --git a/endpoints_edited.txt b/endpoints_edited.txt new file mode 100644 index 0000000..c277bfe --- /dev/null +++ b/endpoints_edited.txt @@ -0,0 +1,110 @@ +{ + "GET /api/v1/tournir/list/{id}": { + "description": "Получить список турниров, на которые зарегистрирован участник по id участника", + "params": { + "id": "String" + }, + "response": [ + { + "id": "String", + "title": "String?", + "description": "String?", + "sport": "String?", + "typeTournament": "String?", + "typeGroup": "String?", + "matchesNumbers": "Int?", + "startTime": "String?", + "createdAt": "String?", + "entryCost": "Double?", + "maxParticipants": "Int?", + "registrationDeadline": "String?", + "place": "String?", + "organizedId": "String?", + "tournirInstantState": "String" + } + ] + }, + + "POST /api/v1/tournir/{id}": { + "description": "Отправить информацию о турнире по его id при изменении состояния турнира", + "params": { + "id": "String" + }, + "body": { + "id": "String", + "title": "String?", + "description": "String?", + "sport": "String?", + "typeTournament": "String?", + "typeGroup": "String?", + "matchesNumbers": "Int?", + "startTime": "String?", + "createdAt": "String?", + "entryCost": "Double?", + "maxParticipants": "Int?", + "registrationDeadline": "String?", + "place": "String?", + "organizedId": "String?", + "tournirInstantState": "String" + } + }, + + "GET /api/v1/MatchStats/{id}": { + "description": "Получить список матчей с их статистикой по id турнира", + "params": { + "id": "String" + }, + "response": { + "tournamentID": "String", + "matchID": "String" + "first": "User" // User - (id, nme, surname, patronymic, phoneNumber, email, hashedPassword, dateOfBirth, age, sex, weight, height, creatdAt, bio, avatarUrl, admin) + "second": "User" + "sport": "String?", + "timePlayed": "Int?", + "goals": "(Int, Int)?", // список из двух интов + "assists": "(Int, Int)?", + "fouls": "(Int, Int)?", + "points": "(Int, Int)?", + "knockdowns": "(Int, Int)?", + "setsWon": "(Int, Int)?", + "yellowCards": "(Int, Int)?", + "isFirstWinner": "Bool?" // nil - не сыграли, true - победил первый, false - победил второй + } + }, + + "POST /api/v1/MatchStats/{id}": { + "description": "Отправить список со статистикой матчей по id турнира", + "params": { + "id": "String" + }, + "body": { + "tournamentID": "String", + "matchID": "String" + "first": "User" // User - (id, nme, surname, patronymic, phoneNumber, email, hashedPassword, dateOfBirth, age, sex, weight, height, creatdAt, bio, avatarUrl, admin) + "second": "User" + "sport": "String?", + "timePlayed": "Int?", + "goals": "(Int, Int)?", //список из двух интов + "assists": "(Int, Int)?", + "fouls": "(Int, Int)?", + "points": "(Int, Int)?", + "knockdowns": "(Int, Int)?", + "setsWon": "(Int, Int)?", + "yellowCards": "(Int, Int)?", + "isFirstWinner": "Bool?" // nil - не сыграли, true - победил первый, false - победил второй + } + }, + + "GET /api/v1/user/stat/{id}": { + "description": "Получить общую статистику пользователя по его id", + "params": { + "id": "String" + }, + "response": { + "sport": "String?", + "totalWins": "Int?", + "totalLoses": "Int?", + "winrate": "Int?" // число 0-100 + } + } +}