-
Notifications
You must be signed in to change notification settings - Fork 5
Chart
duck7000 edited this page Aug 14, 2025
·
14 revisions
This describes the working of Chart class with description of the used method and what data it returns
Chart class get top250 or Most Popular lists of movie and tv shows releases like IMDb displays on their chart page: https://www.imdb.com/chart/
It returns a array of titles
Thumbnail width and height are now set in config, one setting for all methods!
$imdb = new \Imdb\Chart();
$results = $imdb->top250Title();
- @parameter $listType
This defines which type of list is return like movie or tv shows
Default is set to movies
Possible values for $listType:
* BOTTOM_100 (Overall IMDb Bottom 100 Feature List) * TOP_250 (Overall IMDb Top 250 Feature List) (Default) * TOP_250_TV (Overall IMDb Top 250 TV List)
@ return Array[] of array
[title] => (string) Breaking Bad [imdbid] => (string) 0903747 [year] => (int) 2008 [rank] => (int) 1 [rating] => (float) 9.5 [votes] => (int) 2178109 [runtimeSeconds] => (int) 2700 [runtimeText] => (string) 45m [imgUrl] => (string) (default 140x207, set in config)
- This will get top250 Names list, it is similar as Most popular Names (IMDb calls this celebs)
- IMDb does not have this list on their website
@ return Array[] of array
-
[0] => Array -
[name] => (string) jenifer lopez -
[imdbid] => (string) 0903747 -
[rank] => (int)1 -
[credits] => (array) -
[0] => Actress -
[1] => Producer -
[2] => Director -
[3] => Writer -
[4] => Self -
[5] => Thanks -
[knownFor] => (array) -
[id] => 2258337 -
[title] => Eega -
[year] => 2012 -
[imgUrl] => (string) (140x207 set in config)
- This will get most popular names list, as seen on https://www.imdb.com/chart/starmeter/
@ return Array[] of array
-
[0] => Array -
[name] => (string) jenifer lopez -
[imdbid] => (string) 0903747 -
[rank] => (int)1 -
[credits] => (array) -
[0] => Actress -
[1] => Producer -
[2] => Director -
[3] => Writer -
[4] => Self -
[5] => Thanks -
[knownFor] => (array) -
[id] => 2258337 -
[title] => Eega -
[year] => 2012 -
[imgUrl] => (string) (140x207 set in config)
- This will get most popular Titles
- Adult content is included
- @parameter $genreId (optional, omit for all genres) This filters the results on a genreId like "Horror"
GenreIDs: Action, Adult, Adventure, Animation, Biography, Comedy, Crime, Documentary, Drama, Family, Fantasy, Film-Noir, Game-Show, History, Horror, Music, Musical, Mystery, News, Reality-TV, Romance, Sci-Fi, Short, Sport, Talk-Show, Thriller, War, Western Those genreIds can also be used to create interests like this page: https://www.imdb.com/interest/in0000001/
- @parameter $listType
This defines which type of list is return like movie or tv shows
Default is set to "MOST_POPULAR_MOVIES"
Possible values for $listType:
LOWEST_RATED_MOVIES (Lowest Rated IMDb Bottom List) MOST_POPULAR_MOVIES (Most Popular IMDb Movies List) MOST_POPULAR_TV_SHOWS (Most Popular IMDb TV List) TOP_RATED_MOVIES (Top Rated IMDb Movies List) TOP_RATED_ENGLISH_MOVIES (Top Rated English IMDb Movies List) TOP_RATED_TV_SHOWS (Top Rated IMDb TV List)
@ return Array[] of array
[title] => (string) The Substance [imdbid] => (string) 17526714 [year] => (int) 2024 [runtimeSeconds] => (int) 8460 [runtimeText] => (string) 2h 21m [rank] => (int) 1 [genre] => (array) every index an genre [rating] => (float) 7.5 [votes] => (int) 124556 [imgUrl] => (string) (140x207 set in config)
- Get topBoxWeekend list as seen on https://www.imdb.com/chart/boxoffice/
- max 10 results! more is not possible
- Thumbnail is set in config for the whole class, default 140x207
@ return Array[] of array
-
[weekendStartDate] => 2024-11-29 -
[weekendEndDate] => 2024-12-01 -
[titles] => Array -
[0] => Array() -
[title] => (string) -
[id] => (string) 13622970 -
[rating] => (float) 7.1 -
[votes] => (int) 17669 -
[LifetimeGrossAmount] => (int) 221000000 -
[LifetimeGrossCurrency] => (string) USD -
[weekendGrossAmount] => (int) 135500000 -
[weekendGrossCurrency] => (string) USD -
[weeksReleased] => (int) -
[imgUrl] => (string)