Class Stream

java.lang.Object
com.github.twitch4j.helix.domain.Stream

public class Stream extends Object
Stream (LiveStream)
  • Constructor Details

    • Stream

      public Stream()
  • Method Details

    • getUptime

      public Duration getUptime()
      Gets the stream uptime based on the start date.
      Returns:
      The stream uptime.
    • getThumbnailUrl

      public String getThumbnailUrl(Integer width, Integer height)
      Gets the thumbnail url for specific dimensions
      Parameters:
      width - thumbnail width
      height - thumbnail height
      Returns:
      String
    • getStartedAt

      @Deprecated public Calendar getStartedAt()
      Deprecated.
      in favor of getStartedAtInstant()
      Returns:
      the timestamp on when the stream started, in the system default zone
    • getId

      @NonNull public @NonNull String getId()
      Stream ID.
    • getUserId

      @NonNull public @NonNull String getUserId()
      ID of the user who is streaming.
    • getUserLogin

      @NonNull public @NonNull String getUserLogin()
      Login of the user who is streaming.
    • getUserName

      @NonNull public @NonNull String getUserName()
      Display name of the user who is streaming
    • getGameId

      public String getGameId()
      ID of the game being played on the stream.
    • getGameName

      public String getGameName()
      Name of the game being played.
    • getCommunityIds

      @Deprecated @Nullable public @Nullable List<UUID> getCommunityIds()
      Deprecated.
      Array of community IDs.
    • getType

      @NonNull public @NonNull String getType()
      Stream type: "live" or "" (in case of error).
    • getTitle

      @NonNull public @NonNull String getTitle()
      Stream title.
    • getTags

      public List<String> getTags()
      The tags applied to the stream.
    • getViewerCount

      @NonNull public @NonNull Integer getViewerCount()
      Number of viewers watching the stream at the time of the query.
    • getStartedAtInstant

      @NonNull public @NonNull Instant getStartedAtInstant()
      UTC timestamp on when the stream started
    • getTagIds

      @Deprecated @Nullable public @Nullable List<UUID> getTagIds()
      Deprecated.
      Twitch is deprecating this field and will stop providing IDs in 2023 (Twitch will communicate the specific date in early 2023) in favor of getTags()
      Ids of active tags on the stream
    • isMature

      public Boolean isMature()
      Indicates if the broadcaster has specified their channel contains mature content that may be inappropriate for younger audiences.
    • getLanguage

      @NonNull public @NonNull String getLanguage()
      Stream language.
    • getThumbnailUrl

      @NonNull public @NonNull 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(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object