Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix inaccuracies about name lookups in get_players() #103

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions rlapi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,18 @@ async def _iter_get_profiles(
you'll probably be limited to using it on those two platforms.
names: str
Names of the players to find.

This can be used on all platforms and does some kind of equality check
on display names, ignoring case-sensitivity and other undocumented things
such as some kind of accent-sensitivity. This means that you simply can't
lookup some players on non-Steam platforms because the query could sometimes
be fulfilled by multiple players.
such as some kind of accent-sensitivity.

The above means that, for some platforms, you simply can't lookup some
players by name because the query could sometimes be fulfilled by
multiple players.
This is mainly a problem for Epic Games, and Nintendo Switch
platforms. It is also not recommended to use this lookup method for Steam
since the SteamID is easily available on this platform and display names
are not unique.
limit_reached: bool
When search query imposed by the API is reached unexpectedly, the function
calls itself again accounting for the newly learnt search query limit.
Expand All @@ -329,7 +336,7 @@ async def _iter_get_profiles(

Yields
------
Player
`Player`
The requested player profile.
The order the player profiles are yielded in should not be depended on.

Expand Down Expand Up @@ -515,15 +522,22 @@ def get_players(
you'll probably be limited to using it on those two platforms.
names: str
Names of the players to find.

This can be used on all platforms and does some kind of equality check
on display names, ignoring case-sensitivity and other undocumented things
such as some kind of accent-sensitivity. This means that you simply can't
lookup some players on non-Steam platforms because the query could sometimes
be fulfilled by multiple players.
such as some kind of accent-sensitivity.

The above means that, for some platforms, you simply can't lookup some
players by name because the query could sometimes be fulfilled by
multiple players.
This is mainly a problem for Epic Games, and Nintendo Switch
platforms. It is also not recommended to use this lookup method for Steam
since the SteamID is easily available on this platform and display names
are not unique.

Yields
------
Player
`Player`
The requested player profile.
The order the player profiles are yielded in should not be depended on.

Expand Down
Loading