Skip to content

Name class

duck7000 edited this page Dec 16, 2024 · 37 revisions

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

name()

  • This method gets person name.
  • Returns string

photo()

  • This method gets person image:
  • @parameter $thumb boolean true: thumbnail (Default: 140x207), false: large (max 1000 pixels)
  • @note thumbnail width and height are in config, keep ratio in mind when changing
  • Returns string URL or false

birthname()

  • This method gets person birth name
  • Returns string

nickname()

  • This method gets person nickname
  • Returns string

akaName()

born()

  • This method gets person birth date and birth location
  • Returns array(
  • day: int,
  • month: string (month name),
  • mon: int (month number),
  • year: int
  • place: string (birth location)

died()

  • This method gets person death date, death location, death cause and death status
  • Returns array(
  • day: int,
  • month: string (month name),
  • mon: int (month number),
  • year: int
  • place: string (birth location),
  • cause: string,
  • status: string (ALIVE,DEAD or PRESUMED_DEAD)

age()

  • This method gets person age
  • Returns int (or null)

profession()

  • This method gets person professions
  • Returns array() of professions

rank()

  • This method gets the current popularity rank, changedirection and difference with the previous rank of a person.
  • Returns: array(currentRank: int, changeDirection: string, difference: int (null if no data))

height()

  • This method gets person height in metric and imperial
  • Returns array()
  • [imperial] => Array()
    
  •     [feet] =>   (int|float) e.g. 6
    
  •     [inches] => (int|float) e.g. 2.50004023
    
  • [metric] => (int|float) (in centimeters) e.g. 189.23
    

spouse()

  • This method gets all spouses from person bio page
  • Returns array of array(
  • imdb: string,
  • name: string,
  • from: array(day: int , month: string month name , mon: int , year: int),
  • to: array(day: int , month: string month name , mon: int , year: int),
  • dateText: string, (this is fromeDate and toDate as plaintext as displayed at imdb)
  • comment: array(),
  • children: int,
  • current: (boolean) (this indicates if a spouse is the current one or not)

children()

  • This method gets all children from person bio page
  • Returns array of array (imdb: string , name: string, relType: string)

parents()

  • This method gets all parents from person bio page
  • Returns array of array (imdb: string , name: string, relType: string)

relatives()

  • This method gets all other relatives from person bio page
  • Returns array of array (imdb: string , name: string, relType: string)

bio()

  • This method gets all biography stories from person bio page
  • Returns array of array (desc: string , author: string)

trivia()

  • This method gets all trivia from person bio page
  • Returns array of strings trivia

quotes()

  • This method gets all quotes from person bio page
  • Returns array of strings quotes

trademark()

  • This method gets all trademarks from person bio page
  • Returns array of strings trademarks

salary()

  • This method gets all salaries from person bio page
  • Returns array of array(
  • imdb: string,
  • name: string,
  • year: int,
  • amount: int,
  • currency: string,
  • comment: array() each index is a string comment
  • )

pubprints()

  • This method gets all printed publications of this person as listed on publicity page
  • Returns array of array(
  • title: string,
  • author: string,
  • publisher: string,
  • isbn: int
  • )

pubmovies()

  • This method gets all film biography of this person as listed on publicity page
  • Returns array of array(
  • title: string,
  • id: string,
  • year: int,
  • seriesTitle: string,
  • seriesSeason: string,
  • seriesEpisodes: string
  • )

pubportrayal()

  • This method gets all portrayal publications of this person as listed on publicity page
  • Returns array of array(
  • title: string,
  • id: string,
  • year: int
  • )

pubarticle()

  • This method gets the Publicity Articles of this name as listed on publicity page
  • Returns array of array
  [publication] =>    (string)<br>
  [regionId] =>       (string)<br>
  [title] =>          (string)<br>
  [date] => Array('day', 'month', 'year') (int)<br>
  [reference] =>      (string)<br>
  [authors] => Array[] (string)<br>

pubinterview()

  • This method gets the Publicity Interviews of this name as listed on publicity page
  • Returns array of array
  [publication] =>    (string)<br>
  [regionId] =>       (string)<br>
  [title] =>          (string)<br>
  [date] => Array('day', 'month', 'year') (int)<br>
  [reference] =>      (string)<br>
  [authors] => Array[] (string)<br>

pubmagazine()

  • This method gets the Publicity Magazines of this name as listed on publicity page
  • Returns array of array
  [publication] =>    (string)<br>
  [regionId] =>       (string)<br>
  [title] =>          (string)<br>
  [date] => Array('day', 'month', 'year') (int)<br>
  [reference] =>      (string)<br>
  [authors] => Array[] (string)<br>

pubpictorial()

  • This method gets the Publicity Pictorials of this name as listed on publicity page
  • Returns array of array
  [publication] =>    (string)<br>
  [regionId] =>       (string)<br>
  [title] =>          (string)<br>
  [date] => Array('day', 'month', 'year') (int)<br>
  [reference] =>      (string)<br>
  [authors] => Array[] (string)<br>

otherWorks()

  • This method gets all other works of this person as listed on the otherworks page
  • Returns array of array(
  • category: string,
  • fromDate: array(day: int, month: int, year:int),
  • toDate: array(day: int, month: int, year:int),
  • text: string
  • )

extSites()

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

mainphoto()

  • This method gets (default 6) photo’s from photo page of this name
  • @note thumbnail height is set in config (default: 100px)
  • @parameter $amount controls how many photos are returned (max 9999)
  • @param $thumb boolean
  •  true: height is always the same (set in config), width is variable!
    
  •  false: untouched max width 1000 pixels
    
  • Returns array of strings image urls

award()

  • This method gets all awards for a person
  • 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
  • awardTitles array:
    • titleId Id of the credited title
    • titleName Name of the credited title
    • titleNote Any comments added
    • [titleFullImageUrl] => max width 1000 pixels
    • [titleThumbImageUrl] => size 140x207
  • awardNotes: Any notes like Based on the novel
  • awardOutcome: Like Nominee or Winner
  • total array
    • win Total wins (int)
    • nom Total Nominated (int)

creditKnownFor()

  • This method gets all prestigious title credits for this person
  • Returns array of array(
  • title: string,
  • titleId: string,
  • titleYear: int|null,
  • titleEndYear: int|null,
  • titleCharacters: array(string)
  • )
  • [titleFullImageUrl] => untouched max width 1000 pixels (Fixed)
  • [titleThumbImageUrl] => 140x207 (Fixed)

credit()

  • This method gets all credits for this person
  • Returns array[categoryId] of array(
  • titleId: string,
  • titleName: string,
  • titleType: string,
  • year: int|null,
  • endYear: int|null,
  • characters: array(string),
  • jobs: array(string)
  • )
  • [titleFullImageUrl] => untouched max width 1000 pixels (Fixed)
  • [titleThumbImageUrl] => 140x207 (Fixed)

video()

  • This method gets all videos from videos page of this title
  • Thumbnail is fixed, 500x281 pixels
  • Returns categorized array of videos
  • [Trailer] => Array
    
  •      [0] => Array()
    
  •          [id] =>          (string) (videoId) 4030506521
    
  •          [name] =>        (string) (Name of the video) A Clockwork Orange
    
  •          [runtime] =>     (int) (in seconds!) 130
    
  •          [description] => (string) description text
    
  •          [titleName] =>   (string) (name of the title) A Clockwork Orange
    
  •          [titleYear] =>   (int) 1971
    
  •          [playbackUrl] => (string) https://www.imdb.com/video/vi4030506521/
    
  •          [imageUrl] =>    (string) https://m.media-amazon.com/images/M/MVTg@._V1_QL75_UX500_CR0,47,500,281_.jpg
    
  •  [Clip] => Array()
    
  •      [0] => Array()
    
  •          [id] =>          (string) (videoId)815316505
    
  •          [name] =>        (string) (name of the video) 'The Platform' & Future Films From the IMDb Top 250
    
  •          [runtime] =>     (int) (in seconds!) 244
    
  •          [description] => (string) description text
    
  •          [titleName] =>   (string) (name of the title) 'The Platform' & Future Films From the IMDb Top 250
    
  •          [titleYear] =>   (int) 2020
    
  •          [playbackUrl] => (string) https://www.imdb.com/video/vi815316505/
    
  •          [imageUrl] =>    (string) https://m.media-amazon.com/images/M/MV5BMW8@._V1_QL75_UX500_CR0,0,500,281_.jpg
    

news()

  • Get news items about this name, max 100 items!
  • Thumbnail, fixed 500x281 pixels
  • @return array() of array()
  •  [id] =>                 (string)
    
  •  [title] =>              (string) e.g. The best movies on Netflix right now
    
  •  [author] =>             (string) e.g. The A.V. Club
    
  •  [date] =>               (string) e.g. 2024-12-01T02:00:00Z
    
  •  [extUrl] =>             (string) e.g. https://www.avclub.com/1842540580
    
  •  [extHomepageUrl] =>     (string) e.g. http://www.avclub.com/content/home
    
  •  [extHomepageLabel] =>   (string) e.g. avclub.com
    
  •  [textHtml] =>           (string) (including html)
    
  •  [textText] =>           (string)
    
  •  [thumbnailUrl] =>       (string)
    

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 $nameImdbId the returned imdbid from Graphql call (in some cases this can be different)
  • @return $nameImdbId (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.