Skip to content

Title class

duck7000 edited this page Jul 29, 2024 · 55 revisions

List of all methods, with descriptions and what data they return

movietype()

  • This method gets movietype as displayed on title page. If not present Movie is returned so this is allways set.
  • Possible return values: TV Series, Movie, TV Episode, TV Special, TV Movie, TV Mini Series, Video Game, TV Short, Video

title()

  • This method gets title as displayed on title page.
  • Returns string main_title

originalTitle()

  • This method gets original title as displayed on title page.
  • Returns string main_original_title

year()

  • This method gets release year as displayed on title page.
  • Returns int year or empty string

endyear()

  • This method gets release end year as displayed on title page. Usually this is only the case for tv series.
  • Returns int | null

runtime()

  • This method gets all runtimes as displayed on title/technical page.
  • Returns array of array (time: int, country: string|null, annotations: array())

rating()

  • This method gets imdb rating as displayed on title page
  • Returns int/float or 0

votes()

  • This method gets imdb rating votes as displayed on title page
  • Returns int or 0

metacritic()

  • This method gets metacritic rank as displayed on title page
  • Returns int or 0

rank()

  • This method gets the current popularity rank, changedirection and difference with the previous rank of a title.
  • Returns: array(currentRank: int, changeDirection: enum (string?), difference: int)

faq()

  • This method gets all frequently asked questions of a title. It includes questions without a answer
  • @param $spoiler boolean include spoilers or not, isSpoiler indicates if the question is spoiler or not.
  • Returns: array of array(question: string, answer: string, isSpoiler: boolean)

recommendation()

  • This method gets 12 recommended titles related to the current title.
  • Image thumbnail is cropped from center, 140x207 pixels
  • Returns: array of array(title: string, imdbid: numeric string, rating: int| null, img: string|'', year: int|null)

language()

  • This method gets all languages spoken in this title
  • Returns array (array[0..n] of strings) for each language

genre()

  • This method gets all main and sub genres this title is registered for
  • Returns array genres (array[0..n] of mainGenre| string, subGenre| array())

plotoutline()

  • This method gets the main Plot outline for this movie as displayed on top of title page.
  • Returns string

photo()

  • This method gets the main photo image url for thumbnail or full size
  • thumbnail is cropped from center, 190x281 pixels, full is max 1000 pixels
  • Returns string url or false

country()

  • This method gets all countries from this title
  • Returns array[0..n] of strings for each country

alsoknow()

  • This method gets title alternative names based on different countries as shown on release info page. First item in output array will be original title
  • @return array<array{title: string, country: string|Unknown, countryId: string, language: string, languageId: string, comment: array()}>
  • Ordered Ascending by Country

releaseDate()

  • This method gets all release dates of this title
  • Returns array of array(country: string , day: int , month: int, year: int, attributes: array())

mpaa()

  • This method Gets the MPAA rating / Parental Guidance / Age rating for this title by country
  • Returns array of array(country: string , rating: string ,comment: array())

top250()

  • This method gets the position of a movie or tv show in the top 250 ranked movies or tv shows
  • Returns int or 0

plot()

  • This method gets all title plots without Synopsis
  • Returns array of array(plot: string , author: string)

tagline()

  • This method gets all taglines from this title
  • Returns array[0..n] of strings for each tagline

principalCredits()

  • This method gets prinicipal credits as displayed on top title page. It can contain director, writer, creator and stars. Not all categories are always available, TV series has Creator instead of Writer
  • Returns array[category] of array(name: string , imdbid: string)

cast()

  • This method gets all cast members, their played characters, Image url and comments
  • thumbnail is cropped from center, 32x44 pixels
  • Returns array cast (array[0..n] of array(
  • imdb: string
  • name: string
  • name_alias: string
  • credited: true|false (true if credited, false if stated uncredited)
  • array character (all characters this person plays in this title)
  • array comments (all comments like archive or voice)
  • thumb: string url))

director()

  • This method gets all directors of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)

cinematographer()

  • This method gets all cinematographers of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)

writer()

  • This method gets all writers of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)
  • Note: episode info is not accurate for each writer, it reflects the whole series for this writer (this is a bug in graphql query but i can't seem to fix that) So best not using this.

producer()

  • This method gets all producers of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)

composer()

  • This method gets all composers of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)

stunts()

  • This method gets all stunts credits of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)

thanks()

  • This method gets all thanks credits of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)

visualEffects()

  • This method gets all Visual Effects credits of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)

specialEffects()

  • This method gets all Special Effects credits of this title
  • Returns array of array(imdb: string , name: string , jobs: array[], attributes: array[], episode: array(total, year, endYear), titleFullImageUrl, titleThumbImageUrl)

crazyCredit()

  • This method gets all crazy credits of this title
  • Returns array() with each index a crazy credit

episode()

  • This method gets all seasons/years and all episodes of this title. The outer array index reflects the real season or year! Episodes can start at 0 (pilot episode) Season/year can be -1 (unknown)
  • @param $thumb boolean true: thumbnail is cropped from center, 190x281 pixels, false: full is max 1000 pixels
  • @param $yearbased This gives user control if returned episodes are yearbased or season based, default: season based
  • Returns array episodes (array[0..n] of array(
  • imdb: string
  • title: string
  • airdate: string
  • airdateParts: array(day|int, month|int, year|int)
  • plot: string
  • season: int can be seasonnumber, year or -1 (unknown)
  • episode: int can be episodenumber can be 0( pilot episode) or -1 (unknown)
  • imgUrl: string image url))

isOngoing()

  • This method gets info about if a tv series is ongoing or ended.
  • Returns true (still running), false (ended) or null (not a tv series)

goof()

  • This method gets all goofs from goofs page of this title
  • @param $spoil false: exclude spoilers, true: include spoilers
  • @return array goofs (array[categoryId] of array[content, isSpoiler]

quote()

  • This method gets all quotes from quotes page of this title.
  • Returns array , every index is a quote.

trivia()

  • This method gets all trivia from trivia page of this title. Default spoilers are excluded.
  • @param $spoil false: exclude spoilers, true: include spoilers
  • @return array (array[categoryId] of array[content, names: array(name, id), trademark, isSpoiler]

soundtrack()

  • This method gets all soundtracks listed at the soundtrack page of this title.
  • Returns array of array(soundtrack: string|Unknown , credits: array of strings, creditSplit array(creditType: string, name: string, id: string) array comments())
  • result array looks like this
  Array(
   [0] => Array
    (
        [soundtrack] => We've Only Just Begun
        [credits] => Array
            (
                [0] => Written by Roger Nichols (as Roger S. Nichols) and Paul Williams (as Paul H. Williams)
                [1] => Performed by The Carpenters
                [2] => Courtesy of A&M Records
                [3] => Under license from Universal Music Enterprises
            )
        [creditSplit] => Array
            (
                [0] => Array
                    (
                        [creditType] => Writer
                        [name] => Roger Nichols
                        [nameId] => 0629720
                    )
                [1] => Array
                    (
                        [creditType] => Writer
                        [name] => Paul Williams
                        [nameId] => 0931437
                    )
                [2] => Array
                    (
                        [creditType] => Performer
                        [name] => The Carpenters
                        [nameId] => 1135559
                    )
 
            )
        [comment] => Array
            (
                [0] => Courtesy of A&M Records
                [1] => Under license from Universal Music Enterprises
            )
    )
  )

location()

  • This method gets all filming locations listed at the locations page of this title.
  • Returns array of array(real: string , movie: array of strings)
  • real: the actual real location.
  • movie: the scene in the movie

prodcompany()

  • This method gets all production companies that worked on this title
  • Returns array of array(name: string , id: string , country: string , attribute: string , year: int)

distcompany()

  • This method gets all distribution companies that worked on this title
  • Returns array of array(name: string , id: string , country: string , attribute: string , year: int)

specialcompany()

  • This method gets all special effects companies that worked on this title
  • Returns array of array(name: string , id: string , country: string , attribute: string , year: int)

othercompany()

  • This method gets all miscellaneous companies that worked on this title
  • Returns array of array(name: string , id: string , country: string , attribute: string , year: int)

connection()

  • This method gets all connections from this title related to other titles.
  • Returns: array of array(titleId: string, titleName: string, titleType: string, year: int, endYear: int, seriesName: string, description: string)

extSites()

  • This method gets external websites with info of this title, excluding external reviews.
  • Returns: array of array('label': string, 'url': string, 'language': array[]))

budget()

  • This method gets production budget
  • Returns array(amount, currency)

gross()

  • This method gets Info about Grosses, ranked by amount
  • Returns array (area type, amount, currency)
  • area type: part of the world for this gross (world wide, domestic etc)

keyword()

  • This method gets all keywords listed at keywords page of this title
  • Returns array keywords

alternateversion()

  • This method gets all alternative versions of this title
  • Returns array strings

mainphoto()

  • This method gets (default 6) photo’s from photo page of this title
  • thumbnail is cropped from center, 100x100
  • @parameter $amount controls how many photos are returned (max 9999)
  • @parameter $thumb boolean, true: thumbnail cropped from center 100x100 pixels false: untouched max 1000 pixels
  • Returns array of strings image urls

trailer()

  • This method gets trailer urls and image urls from trailer page of this title
  • Thumbnail is cropped, 200x150 pixels
  • @param $amount (int) controls how many trailers are returned, default: 1
  • Returns array(videoUrl: string , imageUrl: string)
  • videoUrl: url is tested to work in iframe (won’t work in html5 video tag)
  • imageUrl: image for this videoUrl including all text in the image like trailer, provider, length, title, HDicon and play button fused in the image.

mainaward()

  • This method gets prestigious Award Summary. Those are the listed on the title page, it includes only prestigious ones.
  • Returns array ([award]: string , [nomination]: int , [wins]: int)

award()

  • This method gets all awards from a title
  • Sort is fixed by: PRESTIGIOUS, order: DESC (prestigious first, highest first, just like the imdb awards page)
  • This method uses 2 parameters, $winsOnly and $event:
  @parm $winsOnly Default: false Set to true will only get won awards
  @param $event Default: "" with this you can limit the results to specific events like oscar
      Possible values for $event:
      "ev0000003" (Academy Awards USA) (Oscar)
      "ev0000223" (Primetime Emmy Awards) (Emmy Award)
      "ev0000292" (Golden Globes USA) (Golden Globe)
      "ev0000471" (National Society of Film Critics Awards, USA)
      "ev0000004" (Academy of Science Fiction, Fantasy & Horror Films, USA)
      "ev0000123" (BAFTA Awards)
      "ev0000296" (Satellite Awards)
      "ev0000453" (MTV Movie + TV Awards)
      "ev0000511" (Online Film Critics Society Awards)
      "ev0000786" (Empire Awards, UK)
      "ev0001644" (DVD Exclusive Awards)
      "ev0002704" (Online Film & Television Association)
      "ev0002990" (Awards Circuit Community Awards)
      "ev0003023" (Golden Schmoes Awards)
      "ev0000133" (Critics Choice Awards)
      "ev0000403" (London Critics Circle Film Awards)
      "ev0000530" (People's Choice Awards, USA)
      There are even more..
  • Returns array[festivalName][0..n] of of array(
  • awardYear: The year of the event
  • awardWinner: Bool true or false True if won
  • awardCategory: The category from the award like best actor
  • awardName: Name of the award like Oscar
  • awardPerons array:
    • creditId Id of the credited person
    • creditName Name of the credited person
    • creditNote Any comments added
  • awardNotes: Any notes like Based on the novel
  • awardOutcome: Like Nominee or Winner
  • total array
    • win Total wins (int)
    • nom Total Nominated (int)

sound()

  • This method gets all sound formats of this title
  • Returns array of array(type: string, attributes: array())

color()

  • This method gets all color formats of this title
  • Returns array of array(type: string, attributes: array())

aspectRatio()

  • This method gets all aspect ratio formats of this title
  • Returns array of array(type: string, attributes: array())

camera()

  • This method gets all camera types used in this title
  • Returns array of array(type: string, attributes: array())

featuredReview()

  • This method gets 5 featured reviews of a title. (only 5 available)
  • Returns: array of array(authorNickName|string, authorRating|int, summaryText|string, reviewText|string, submissionDate|iso date string)

isAdult()

  • This method gets adult status of this title
  • Returns boolean

checkRedirect()

  • This method is a helper that Checks if imdbid is redirected to another id or not.
  • It sometimes happens that imdb redirects an existing id to a new id.
  • If user uses search class this check isn't necessary as the returned results already contain a possible new imdbid
  • @var $this->imdbID The imdbid used to call this class
  • @var $titleImdbId the returned imdbid from Graphql call (in some cases this can be different)
  • @return $titleImdbId (the new redirected imdbId) or false (no redirect)
    Extra info about this:

IMDb data is constantly being updated, both with the addition of new data and enhancement of the quality of existing data. While there is only ever one unique IMDb identifier, there are, on occasion, instances where there might be duplicate entries for the same entity. This could happen, for instance, if multiple users have contributed data for the same entity (e.g. the same person) under different identifiers (e.g. different name ids). In this case IMDb maintains both identifiers in the data set, effectively duplicating the data. This allows you to continue using any matching you have between IMDb identifiers and other identifiers. To identify when this is the case a remappedTo field is included in the bulk data sets and the title.meta.canonicalId and name.meta.canonicalId field is included in the API. From these fields, you get the new preferred identifier for that entity.

The Big Bang Theory pilot episode has multiple Title ID entries referring to the same episode: tt1044014 (the Title ID that has been remapped) and tt0775431 (the preferred Title ID). When you retrieve either the remappedTo value from the Bulk Data or the title.meta.canonicalId for Title ID tt1044014, you will receive the preferred Title ID tt0775431.