-
Notifications
You must be signed in to change notification settings - Fork 1
Teams
Ilya Krukowski edited this page Nov 18, 2022
·
2 revisions
Teams endpoint, supports pagination.
Providing pagination data and search params is optional:
teams = client.teams itemsPerPage: 2, name: 'Н', page: 3
teams[0].id # => 11
Provide team ID:
team = client.team 2
team.name # => 'Афина'
seasons = client.team_seasons 2, idseason: 9
seasons.first.idseason # => 9
Alternatively:
team = client.team 2
seasons = team.seasons
seasons.first.idseason # => 9
tournaments = client.team_tournaments 2, pagination: true
tournaments[2].idtournament # => 8
Alternatively:
team = client.team 2
tournaments = team.tournaments pagination: true
tournaments[2].idtournament # => 8
team = client.create_team name: 'Команда А'
team.name # => 'Команда А'
client.update_team 1, name: 'Команда 1'
Alternatively:
team = client.team 2
team.update name: 'Команда 1'
client.delete_team 1
Alternatively:
team = client.team 2
team.destroy