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 boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    java.util.List<java.util.UUID> getCommunityIds()
    Deprecated.
    java.lang.String getGameId()
    ID of the game being played on the stream.
    java.lang.String getGameName()
    Name of the game being played.
    @NonNull java.lang.String getId()
    Stream ID.
    @NonNull java.lang.String getLanguage()
    Stream language.
    java.util.Calendar getStartedAt()
    Deprecated.
    in favor of getStartedAtInstant()
    @NonNull java.time.Instant getStartedAtInstant()
    UTC timestamp on when the stream started
    java.util.List<java.util.UUID> getTagIds()
    Ids of active tags on the stream
    @NonNull java.lang.String getThumbnailUrl()
    Thumbnail URL of the stream.
    java.lang.String getThumbnailUrl​(java.lang.Integer width, java.lang.Integer height)
    Gets the thumbnail url for specific dimensions
    @NonNull java.lang.String getTitle()
    Stream title.
    @NonNull java.lang.String getType()
    Stream type: "live" or "" (in case of error).
    java.time.Duration getUptime()
    Gets the stream uptime based on the start date.
    @NonNull java.lang.String getUserId()
    ID of the user who is streaming.
    @NonNull java.lang.String getUserLogin()
    Login of the user who is streaming.
    @NonNull java.lang.String getUserName()
    Display name of the user who is streaming
    @NonNull java.lang.Integer getViewerCount()
    Number of viewers watching the stream at the time of the query.
    int hashCode()  
    java.lang.Boolean isMature()
    Indicates if the broadcaster has specified their channel contains mature content that may be inappropriate for younger audiences.
    java.lang.String toString()  

    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 width
      height - 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:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object