Package com.github.twitch4j.helix.domain
Class Stream
java.lang.Object
com.github.twitch4j.helix.domain.Stream
public class Stream
extends java.lang.Object
Stream (LiveStream)
-
Constructor Summary
Constructors Constructor Description Stream() -
Method Summary
Modifier and Type Method Description protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.util.List<java.util.UUID>getCommunityIds()Deprecated.java.lang.StringgetGameId()ID of the game being played on the stream.java.lang.StringgetGameName()Name of the game being played.@NonNull java.lang.StringgetId()Stream ID.@NonNull java.lang.StringgetLanguage()Stream language.java.util.CalendargetStartedAt()Deprecated.in favor of getStartedAtInstant()@NonNull java.time.InstantgetStartedAtInstant()UTC timestamp on when the stream startedjava.util.List<java.util.UUID>getTagIds()Ids of active tags on the stream@NonNull java.lang.StringgetThumbnailUrl()Thumbnail URL of the stream.java.lang.StringgetThumbnailUrl(java.lang.Integer width, java.lang.Integer height)Gets the thumbnail url for specific dimensions@NonNull java.lang.StringgetTitle()Stream title.@NonNull java.lang.StringgetType()Stream type: "live" or "" (in case of error).java.time.DurationgetUptime()Gets the stream uptime based on the start date.@NonNull java.lang.StringgetUserId()ID of the user who is streaming.@NonNull java.lang.StringgetUserLogin()Login of the user who is streaming.@NonNull java.lang.StringgetUserName()Display name of the user who is streaming@NonNull java.lang.IntegergetViewerCount()Number of viewers watching the stream at the time of the query.inthashCode()java.lang.BooleanisMature()Indicates if the broadcaster has specified their channel contains mature content that may be inappropriate for younger audiences.java.lang.StringtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Stream
public Stream()
-
-
Method Details
-
getUptime
public java.time.Duration getUptime()Gets the stream uptime based on the start date.- Returns:
- The stream uptime.
-
getThumbnailUrl
public java.lang.String getThumbnailUrl(java.lang.Integer width, java.lang.Integer height)Gets the thumbnail url for specific dimensions- Parameters:
width- thumbnail widthheight- thumbnail height- Returns:
- String
-
getStartedAt
@Deprecated public java.util.Calendar getStartedAt()Deprecated.in favor of getStartedAtInstant()- Returns:
- the timestamp on when the stream started, in the system default zone
-
getId
@NonNull public @NonNull java.lang.String getId()Stream ID. -
getUserId
@NonNull public @NonNull java.lang.String getUserId()ID of the user who is streaming. -
getUserLogin
@NonNull public @NonNull java.lang.String getUserLogin()Login of the user who is streaming. -
getUserName
@NonNull public @NonNull java.lang.String getUserName()Display name of the user who is streaming -
getGameId
public java.lang.String getGameId()ID of the game being played on the stream. -
getGameName
public java.lang.String getGameName()Name of the game being played. -
getCommunityIds
@Deprecated public java.util.List<java.util.UUID> getCommunityIds()Deprecated.Array of community IDs. -
getType
@NonNull public @NonNull java.lang.String getType()Stream type: "live" or "" (in case of error). -
getTitle
@NonNull public @NonNull java.lang.String getTitle()Stream title. -
getViewerCount
@NonNull public @NonNull java.lang.Integer getViewerCount()Number of viewers watching the stream at the time of the query. -
getStartedAtInstant
@NonNull public @NonNull java.time.Instant getStartedAtInstant()UTC timestamp on when the stream started -
getTagIds
public java.util.List<java.util.UUID> getTagIds()Ids of active tags on the stream -
isMature
public java.lang.Boolean isMature()Indicates if the broadcaster has specified their channel contains mature content that may be inappropriate for younger audiences. -
getLanguage
@NonNull public @NonNull java.lang.String getLanguage()Stream language. -
getThumbnailUrl
@NonNull public @NonNull java.lang.String getThumbnailUrl()Thumbnail URL of the stream. All image URLs have variable width and height. You can replace {width} and {height} with any values to get that size image -
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other) -
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-