Class ShowsApi

java.lang.Object
com.amilesend.tvmaze.client.api.ApiBase
com.amilesend.tvmaze.client.api.ShowsApi

public class ShowsApi extends ApiBase
TVMaze API to retrieve show information.
For more information, please refer to https://www.tvmaze.com/api#shows
  • Constructor Details

    • ShowsApi

      public ShowsApi(com.amilesend.client.connection.Connection connection)
      Creates a new ShowsApi object.
      Parameters:
      connection - the connection
  • Method Details

    • getShow

      public Show getShow(int showId, Show.EmbeddedType... includeEmbeddedTypes)
      Gets the show for the given showId.
      Parameters:
      showId - the show identifier
      includeEmbeddedTypes - the optional embedded types to include in the show
      Returns:
      the show
      See Also:
    • getEpisodes

      public List<Episode> getEpisodes(int showId, boolean isSpecialsIncluded)
      Gets the list of episodes for the given showId.
      Parameters:
      showId - the show identifier
      isSpecialsIncluded - if true, include specials in the list; else false
      Returns:
      the list of episodes
    • getAlternateLists

      public List<AlternateList> getAlternateLists(int showId)
      Gets the list of alternate episode lists for the given showId (e.g., DVD ordering).
      Parameters:
      showId - the show identifier
      Returns:
      the list of alternate episodes lists
      See Also:
    • getAlternateList

      public AlternateList getAlternateList(int alternateListId, boolean isAlternateEpisodesIncluded)
      Gets the alternate episode list for the given alternateListId.
      Parameters:
      alternateListId - the alternate episode list
      isAlternateEpisodesIncluded - if true, includes the list of embedded alternate episodes; else, false
      Returns:
      the alternate episode list
      See Also:
    • getAlternateEpisodes

      public List<AlternateEpisode> getAlternateEpisodes(int alternateListId, boolean isEpisodesIncluded)
      Gets the list of alternate episodes for the given alternateListId.
      Parameters:
      alternateListId - the alternate list identifier
      isEpisodesIncluded - if true, includes the associated Episode; else, false
      Returns:
      the list of alternate episodes
      See Also:
    • getEpisode

      public Episode getEpisode(int showId, int seasonNum, int episodeNum)
      Gets an Episode for the given show, season, and episode number.
      Parameters:
      showId - the show identifier
      seasonNum - the season number
      episodeNum - the associated episode number for the season
      Returns:
      the episode
      See Also:
    • getEpisodes

      public List<Episode> getEpisodes(int showId, LocalDate date)
      Gets the list of episodes for a show that aired on the given date.
      Parameters:
      showId - the show identifier
      date - the date of airing
      Returns:
      the list of episodes
      See Also:
    • getSeasons

      public List<Season> getSeasons(int showId)
      Gets the list of seasons for a show.
      Parameters:
      showId - the show identifier
      Returns:
      the list of seasons
      See Also:
    • getSeasonEpisodes

      public List<Episode> getSeasonEpisodes(int seasonId, boolean isGuestCastIncluded)
      Gets the list of episodes for a given seasonId.
      Parameters:
      seasonId - the season identifier
      isGuestCastIncluded - if true, returns the list of guest cast members; else false
      Returns:
      the list of episodes
      See Also:
    • getCast

      public List<CastMember> getCast(int showId)
      Gets the list of cast members for a show.
      Parameters:
      showId - the show identifier
      Returns:
      the list of cast members
      See Also:
    • getCrew

      public List<CrewMember> getCrew(int showId)
      Gets the list of crew members for a show.
      Parameters:
      showId - the show identifier
      Returns:
      the list of crew members
      See Also:
    • getAliases

      public List<Alias> getAliases(int showId)
      Gets the list of alternative show names, or aliases.
      Parameters:
      showId - the show identifier
      Returns:
      the list of aliases
      See Also:
    • getImages

      public List<Image> getImages(int showId)
      Gets the list of images for a show.
      Parameters:
      showId - the show identifier
      Returns:
      the list of images
      See Also:
    • getIndex

      public List<Show> getIndex(int pageNum)
      Gets the list of all shows in the TVMaze database. Note: This is paginated and requires manual specification of the page number with a maximum of 250 shows per response. This operation will throw a RequestException when no more pages exist.
      Parameters:
      pageNum - the page number
      Returns:
      the list of shows
      Throws:
      com.amilesend.client.connection.RequestException - if there are no more shows to return