Skip to content

Commit

Permalink
rename get_popular_teams -> get_popular and search_team -> `sea…
Browse files Browse the repository at this point in the history
…rch`

As team is already in the name of the clients
  • Loading branch information
kraktus committed Aug 14, 2023
1 parent 9391fcf commit d2c495a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ Most of the API is available:
client.teams.accept_join_request
client.teams.get_team
client.teams.teams_of_player
client.teams.get_popular_teams
client.teams.search_teams
client.teams.get_popular
client.teams.search
client.tournaments.get
client.tournaments.get_tournament
Expand Down
4 changes: 2 additions & 2 deletions berserk/clients/teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def teams_of_player(self, username: str) -> List[Team]:
path = f"/api/team/of/{username}"
return cast(List[Team], self._r.get(path))

def get_popular_teams(self, page: int = 1) -> PaginatedTeams:
def get_popular(self, page: int = 1) -> PaginatedTeams:
"""Get the most popular teams
:param page: the page number that needs to be returned (Optional)
Expand All @@ -118,7 +118,7 @@ def get_popular_teams(self, page: int = 1) -> PaginatedTeams:
params = {"page": page}
return cast(PaginatedTeams, self._r.get(path, params=params))

def search_teams(self, text: str, page: int = 1) -> PaginatedTeams:
def search(self, text: str, page: int = 1) -> PaginatedTeams:
"""Search for teams
:param text: the query text to search for
Expand Down

0 comments on commit d2c495a

Please sign in to comment.