Package dev.qixils.crowdcontrol.socket
Class Request.Target
- java.lang.Object
-
- dev.qixils.crowdcontrol.socket.Request.Target
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Request.Target.Builder
Mutable builder for the immutableRequest.Target
class.
-
Constructor Summary
Constructors Constructor Description Target(@Nullable String id, @Nullable String name, @Nullable String avatar)
Deprecated.Usethe builder
instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(@Nullable Object o)
@Nullable String
getAvatar()
Gets the URL of the recipient's avatar.@Nullable String
getId()
The recipient's ID.@Nullable String
getLogin()
The recipient's username.@Nullable String
getName()
The recipient's display name.int
hashCode()
@NotNull Request.Target.Builder
toBuilder()
Creates a mutableRequest.Target.Builder
with a copy of the data in thisRequest.Target
.String
toString()
-
-
-
Constructor Detail
-
Target
@AvailableSince("3.3.0") @Deprecated @ScheduledForRemoval(inVersion="3.6.0") public Target(@Nullable @Nullable String id, @Nullable @Nullable String name, @Nullable @Nullable String avatar)
Deprecated.Usethe builder
instead.Instantiates aRequest.Target
with the given streamer information.- Parameters:
id
- streamer IDname
- streamer nameavatar
- streamer avatar- Since:
- 3.3.0
-
-
Method Detail
-
getId
@AvailableSince("3.0.0") @Nullable @CheckReturnValue public @Nullable String getId()
The recipient's ID.Prior to 3.4.0, this method returned an integer representing a Twitch streamer ID. Now, it may return a string representing the ID of a streamer on Twitch or on a different platform. It may also return null if the ID is unknown.
- Returns:
- streamer ID
- Since:
- 3.0.0
-
getName
@AvailableSince("3.0.0") @Nullable @CheckReturnValue public @Nullable String getName()
The recipient's display name. May be null if the name is unknown.- Returns:
- display name
- Since:
- 3.0.0
-
getLogin
@AvailableSince("3.5.2") @Nullable @CheckReturnValue public @Nullable String getLogin()
The recipient's username. May be null if the username is unknown.- Returns:
- username
- Since:
- 3.5.2
-
getAvatar
@AvailableSince("3.0.0") @Nullable @CheckReturnValue public @Nullable String getAvatar()
Gets the URL of the recipient's avatar. May be null if the avatar is unknown.- Returns:
- avatar URL
- Since:
- 3.0.0
-
equals
@CheckReturnValue public boolean equals(@Nullable @Nullable Object o)
-
hashCode
@CheckReturnValue public int hashCode()
-
toBuilder
@AvailableSince("3.5.2") @NotNull @CheckReturnValue public @NotNull Request.Target.Builder toBuilder()
Creates a mutableRequest.Target.Builder
with a copy of the data in thisRequest.Target
.- Returns:
- a new
Request.Target.Builder
- Since:
- 3.5.2
-
-