Class UsersRequest
- java.lang.Object
-
- com.treescrub.spedran.ResourceCollectionRequest<User>
-
- com.treescrub.spedran.requests.builders.user.UsersRequest
-
public class UsersRequest extends ResourceCollectionRequest<User>
A request builder to get allUsers matching the set filters.
-
-
Constructor Summary
Constructors Constructor Description UsersRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UsersRequesthitbox(String hitbox)Searches for a singleUserwith the given Hitbox username.UsersRequestlookup(String name)Searches for a singleUserwith the given name.UsersRequestname(String name)Searches forUsers with a name that contains the given string.UsersRequestsortByInternationalName()Sorts the results alphanumerically by the international name of the users.UsersRequestsortByJapaneseName()Sorts the results alphanumerically by the Japanese name of the users.UsersRequestsortByRole()Sorts the results by the user's role on SRC.UsersRequestsortBySignupDate()Sorts the results by the user's signup time.UsersRequestsortDirection(SortDirection direction)Sets the direction (ascending or descending) of the sorting.UsersRequestspeedrunsLive(String speedrunsLive)Searches for a singleUserwith the given SpeedRunsLive username.UsersRequesttwitch(String twitch)Searches for a singleUserwith the given Twitch username.UsersRequesttwitter(String twitter)Searches for a singleUserwith the given Twitter handle.-
Methods inherited from class com.treescrub.spedran.ResourceCollectionRequest
complete
-
-
-
-
Method Detail
-
lookup
public UsersRequest lookup(String name)
Searches for a singleUserwith the given name.
Search is case-insensitive and must match exactly with an existing user.- Parameters:
name- the name to search for- Returns:
- this
UsersRequestbuilder
-
name
public UsersRequest name(String name)
Searches forUsers with a name that contains the given string.
Search is case-insensitive.- Parameters:
name- the substring to search for, must be at least 3 characters long- Returns:
- this
UsersRequestbuilder
-
twitch
public UsersRequest twitch(String twitch)
Searches for a singleUserwith the given Twitch username.
Search is case-insensitive and must match exactly with a linked Twitch account name.- Parameters:
twitch- the Twitch username- Returns:
- this
UsersRequestbuilder
-
hitbox
public UsersRequest hitbox(String hitbox)
Searches for a singleUserwith the given Hitbox username.
Search is case-insensitive and must match exactly with a linked Hitbox account name.- Parameters:
hitbox- the Hitbox username- Returns:
- this
UsersRequestbuilder
-
twitter
public UsersRequest twitter(String twitter)
Searches for a singleUserwith the given Twitter handle.
Search is case-insensitive and must match exactly with a linked Twitch account name.- Parameters:
twitter- the Twitter handle- Returns:
- this
UsersRequestbuilder
-
speedrunsLive
public UsersRequest speedrunsLive(String speedrunsLive)
Searches for a singleUserwith the given SpeedRunsLive username.
Search is case-insensitive and must match exactly with a linked SpeedRunsLive account name.- Parameters:
speedrunsLive- the SpeedRunsLive username- Returns:
- this
UsersRequestbuilder
-
sortByInternationalName
public UsersRequest sortByInternationalName()
Sorts the results alphanumerically by the international name of the users.- Returns:
- this
UsersRequestbuilder
-
sortByJapaneseName
public UsersRequest sortByJapaneseName()
Sorts the results alphanumerically by the Japanese name of the users.- Returns:
- this
UsersRequestbuilder
-
sortBySignupDate
public UsersRequest sortBySignupDate()
Sorts the results by the user's signup time.- Returns:
- this
UsersRequestbuilder
-
sortByRole
public UsersRequest sortByRole()
Sorts the results by the user's role on SRC.
The order is determined by privilege/access level, not alphanumerically.- Returns:
- this
UsersRequestbuilder
-
sortDirection
public UsersRequest sortDirection(SortDirection direction)
Sets the direction (ascending or descending) of the sorting.- Parameters:
direction- the sort direction- Returns:
- this
UsersRequestbuilder
-
-