### Instantiate Chart Class Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Chart Instantiate the Chart class to begin fetching IMDb data. No specific setup or imports are mentioned for this basic instantiation. ```php $imdb = new \Imdb\Chart(); ``` -------------------------------- ### Get Upcoming Releases from IMDb Calendar Source: https://github.com/duck7000/imdbgraphqlphp/blob/master/README.md Fetch a list of upcoming film and TV releases from the IMDb calendar. ```php $calendar = new \Imdb\Calendar(); $releases = $calendar->comingSoon(); ``` -------------------------------- ### Get IMDb Title Details Source: https://github.com/duck7000/imdbgraphqlphp/blob/master/README.md Retrieve specific details for a given IMDb title ID, such as its rating and plot outline. ```php $title = new \Imdb\Title("335266"); $rating = $title->rating(); $plotOutline = $title->plotoutline(); ``` -------------------------------- ### Get IMDb Name Details Source: https://github.com/duck7000/imdbgraphqlphp/blob/master/README.md Retrieve details for a specific IMDb person ID, including their name and any known nicknames. ```php $name = new \Imdb\Name("0000154"); $name = $name->name(); $nickname = $name->nickname(); ``` -------------------------------- ### News List with Specific Type Source: https://github.com/duck7000/imdbgraphqlphp/wiki/News Call the newsList method with a specific listType to get news of that category. Possible values include CELEBRITY, INDIE, MOVIE, TOP, and TV. The default is MOVIE. Up to 250 items are returned, covering approximately one year. ```php $imdb = new \Imdb\News(); $results = $imdb->newsList('TV'); ``` -------------------------------- ### Get Most Popular Titles with Genre Filter Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Chart Retrieve a list of most popular titles, optionally filtered by a specific genre ID. Adult content is included. The $listType parameter can specify the type of list. ```php $results = $imdb->mostPopularTitle('Horror'); ``` ```php $results = $imdb->mostPopularTitle(null, 'MOST_POPULAR_TV_SHOWS'); ``` -------------------------------- ### Instantiate and Search for Companies Source: https://github.com/duck7000/imdbgraphqlphp/wiki/CompanySearch Instantiate the CompanySearch class and perform a search for a company by name. The search term should be a string. ```php $imdb = new \Imdb\CompanySearch(); $results = $imdb->search("warner brothers"); ``` -------------------------------- ### Instantiate and Search Keywords Source: https://github.com/duck7000/imdbgraphqlphp/wiki/KeywordSearch Instantiate the KeywordSearch class and perform a keyword search. The results can be used as input for the TitleSearchAdvanced class. ```php $imdb = new \Imdb\KeywordSearch(); $results = $imdb->searchKeyword("nihilism"); ``` -------------------------------- ### Instantiate and Search with Imdb\TitleSearchAdvanced Source: https://github.com/duck7000/imdbgraphqlphp/wiki/TitleSearchAdvanced Demonstrates how to create an instance of the TitleSearchAdvanced class and perform a basic search. At least one search parameter is required for a meaningful result. ```php $imdb = new \Imdb\TitleSearchAdvanced(); $results = $imdb->advancedSearch(); ``` -------------------------------- ### trailer() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class ATTENTION: This method is removed, use video() instead. ```APIDOC ## trailer() ### Description ATTENTION: This method is removed!, use video() instead. ``` -------------------------------- ### Get Most Popular Names Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Chart Retrieve the most popular names list, similar to IMDb's starmeter. This method fetches celebrity data. ```php $results = $imdb->mostPopularName(); ``` -------------------------------- ### Get Top 250 Names Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Chart Retrieve a list of top 250 names (celebrities). This list is not directly available on the IMDb website. ```php $results = $imdb->top250Name(); ``` -------------------------------- ### Instantiate User Class with User ID Source: https://github.com/duck7000/imdbgraphqlphp/wiki/User-class Initialize the User class by providing the IMDb user ID. The user ID can typically be found by searching the username on Google. ```php $imdb = new \Imdb\User("$userId"); ``` -------------------------------- ### Instantiate and Call Trailers Class Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Trailers Instantiate the Trailers class and call the recentVideo method to fetch trailer data. This method returns a maximum of 100 items. ```php $imdb = new \Imdb\Trailers(); $results = $imdb->recentVideo(); ``` -------------------------------- ### Instantiate and Call News Class Source: https://github.com/duck7000/imdbgraphqlphp/wiki/News Instantiate the News class and call the newsList method to retrieve news. The newsList method can optionally accept a listType parameter to filter the news. ```php $imdb = new \Imdb\News(); $results = $imdb->newsList(); ``` -------------------------------- ### Get Company Information Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Company Retrieves all available company information for a given company ID. This method is useful for accessing IMDbPro data through a GraphQL interface. ```APIDOC ## Get Company Information ### Description Retrieves all available company information for a given company ID. This method is useful for accessing IMDbPro data through a GraphQL interface. ### Method ```php $imdb = new \Imdb\Company(); $results = $imdb->companyInfo("co0185428"); ``` ### Parameters #### Path Parameters - **companyId** (string) - Required - The company ID to look up, including the 'co' prefix (e.g., "co0185428"). ### Results Returns an array of Company details. The structure includes: - **id** (string): The company ID without the 'co' prefix. - **name** (string): The name of the company. - **country** (string): The country of origin for the company. - **meterRanking** (array): Information about the company's ranking. - **currentRank** (int): The current rank. - **changeDirection** (string): The direction of rank change (e.g., "DOWN"). - **difference** (int): The difference in rank. - **type** (array): An array of strings indicating the company's type (e.g., "Distributor", "Production"). - **keyStaff** (array): An array of key staff members. - **id** (string): The staff member's ID. - **name** (string): The staff member's name. - **employments** (array): Details of the staff member's employments. - **employmentTitle** (string): The title of the employment. - **occupation** (string): The occupation of the staff member. - **branch** (string): The branch of employment. - **knownFor** (array): An array of projects the company is known for. - **id** (string): The project ID. - **name** (string): The project name. - **jobs** (array): Jobs associated with the project. - **category** (string): The job category. - **job** (string): The specific job. - **countries** (array): An array of countries associated with the project. - **year** (int): The year the project was released or started. - **endYear** (int): The end year of the project (if applicable). - **affiliations** (array): An array of company affiliations. - **companyName** (string): The name of the affiliated company. - **description** (string): A description of the affiliation. ``` -------------------------------- ### Get Top 250 Titles Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Chart Retrieve the top 250 movie or TV show titles. The $listType parameter can be specified to change the list returned. Defaults to movies. ```php $results = $imdb->top250Title(); ``` -------------------------------- ### Instantiate and Call Company Info Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Company Instantiates the Company class and calls the companyInfo method with a company ID. This method retrieves detailed information about a specific company. ```php $imdb = new \Imdb\Company(); $results = $imdb->companyInfo("co0185428"); ``` -------------------------------- ### comingSoonStreaming() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Calendar-Class Retrieves upcoming releases from major streaming providers for the current month. ```APIDOC ## comingSoonStreaming() ### Description Fetches upcoming releases from big streaming providers for the current month. ### Parameters #### Path Parameters * **$listProviderId** (string) - Required - The streaming provider list ID (e.g., "549391228" for Netflix). Possible providerIds include: * 549391228 (Netflix) * 549615961 (HBO MAX) * 549641648 (Prime Video) * 549359815 (Disney+) * 549124072 (Hulu) * 549641648 (Amazon Prime) * 549617029 (Paramount+) * 544306775 (TV and Streaming Calendar for current month for all providers) ### Configuration Options * `$streamSortBy` * `$streamSortOrder` * `$calendarThumbnailWidth` * `$calendarThumbnailHeight` ### Return Value * **array** * `listId` (string) - The ID of the streaming provider list. * `listName` (string) - The name of the list (e.g., "What's New on Netflix in November 2024"). * `listCreateDate` (string) - The creation date of the list. * `listLastModifiedDate` (string) - The last modified date of the list. * `items` (array) - An array of items in the list. * `[index]` => Array * `id` (string) - The ID of the item (without 'tt'). * `title` (string) - The title of the item. * `type` (string) - The type of item (e.g., "TV Series"). * `year` (int) - The release year. * `description` (string) - A brief description of the item. * `runtime` (int) - The runtime in seconds. * `rating` (float) - The rating of the item. * `votes` (int) - The number of votes. * `metacritic` (int) - The Metascore. * `plot` (string) - The plot summary. * `thumbUrl` (string) - The URL for the thumbnail image. * `credits` (array) - An array of credits (Director, Stars) with nameId and name. ``` -------------------------------- ### Instantiate and Call Trailers Class for Trending Videos Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Trailers Instantiate the Trailers class and call the trendingVideo method to fetch trending trailer data. This method returns a maximum of 250 items, but may return fewer if titles lack video IDs. ```php $imdb = new \Imdb\Trailers(); $results = $imdb->trendingVideo(); ``` -------------------------------- ### sound() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all available sound formats for a title. ```APIDOC ## sound() ### Description Gets all sound formats of this title. ### Returns An array of arrays, where each inner array contains 'type' (string) and 'attributes' (array). ``` -------------------------------- ### Instantiating the User Class Source: https://github.com/duck7000/imdbgraphqlphp/wiki/User-class To use the User class, you need to instantiate it with a valid IMDb user ID. The user ID can often be found by searching for the username on Google and looking for it in the URL of the search results. ```APIDOC ## Instantiating the User Class ### Description Instantiate the User class by providing the IMDb user ID. ### Parameters #### Path Parameters - **userId** (string) - Required - The IMDb user ID (e.g., "ur105395432"). ### Request Example ```php $imdb = new \Imdb\User("$userId"); ``` ``` -------------------------------- ### parentsGuide() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Fetches parental guidance information, such as details on nudity, violence, and drugs, with options to include or exclude spoilers. ```APIDOC ## parentsGuide() ### Description Gets Info for parents like Violence, Drugs. Alcohol etc. ### Parameters * `$spoil` (boolean) - `true`: spoilers included, `false`: spoilers not included. ### Returns `array()` categorized array of array() ### Response Structure ``` [ "nudity" => Array [ "severity" => (string) None (like mild,severe,none etc), "severityVotedFor" => (int) 34 (how many people voted for this severity), "totalSeverityVotes" => (int) 64 (total amount of voters), "guideItems" => Array() [ [isSpoiler] => (boolean) (indicates if entry is a spoiler or not), [guideText] => (string) A couple in swimwear are seen lying in a sexualised pose together. ] ] ] ``` ``` -------------------------------- ### recommendation() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves 12 recommended titles related to the current title, including a thumbnail image for each. ```APIDOC ## recommendation() ### Description Gets 12 recommended titles related to the current title. Image thumbnail is cropped from center, 140x207 pixels. ### Note Thumbnail width and height are in config, keep ratio in mind when changing! ### Returns `array of array(title: string, imdbid: string, rating: int, img: string, year: int)` ``` -------------------------------- ### runtime() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Fetches all runtime information as displayed on the title's technical page. ```APIDOC ## runtime() ### Description Gets all runtimes as displayed on title/technical page. ### Returns `array of array (time: int, country: string|null, annotations: array())` ``` -------------------------------- ### alternateversion() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all alternative versions of a title. ```APIDOC ## alternateversion() ### Description Gets all alternative versions of this title. ### Response #### Success Response - Returns an array of strings, where each string is an alternative version of the title. ``` -------------------------------- ### Instantiate and Use NameSearch Class Source: https://github.com/duck7000/imdbgraphqlphp/wiki/NameSearch Instantiate the NameSearch class and use its search method to find names on the IMDB GraphQL API. The search term should be enclosed in double quotes. ```php $imdb = new \Imdb\NameSearch(); $results = $imdb->search("$searchTerm"); ``` -------------------------------- ### Configure Caching System in IMDb GraphQL PHP Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Home Enable and configure the caching system by setting $useCache to true. Specify the cache directory, expiration time, and compression options. Caching is enabled per method. ```php $cacheDir = './cache/'; $useCache = false; $storeCache = false; $cacheUseZip = false; $cacheConvertZip = false; $cacheExpire = 604800; ``` -------------------------------- ### budget() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves the production budget for a title. ```APIDOC ## budget() ### Description Gets production budget. ### Response #### Success Response - Returns an object with: - **amount** (int) - The budget amount. - **currency** (string) - The currency of the budget. ``` -------------------------------- ### recentVideo() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Trailers Retrieves a list of recent video trailers. It returns a maximum of 100 items. The `playbackUrl` is playable directly in a browser. ```APIDOC ## recentVideo() ### Description Retrieves a list of recent video trailers, returning a maximum of 100 items. The `playbackUrl` is playable directly in a browser. ### Method `recentVideo()` ### Parameters None ### Return Value Array[] of arrays, where each inner array contains trailer details: - `videoId` (string or NULL): Video ID without 'vi' - `titleId` (string or NULL): Title ID without 'tt' - `title` (string or NULL): The title of the movie/show the trailer belongs to - `trailerCreateDate` (string or NULL): ISO date string of trailer creation (e.g., 2024-11-17T13:16:18.708Z) - `trailerRuntime` (int or NULL): Trailer duration in seconds - `playbackUrl` (string or NULL): URL to play the trailer in a browser - `thumbnailUrl` (string or NULL): URL for the trailer thumbnail image (140x207) - `releaseDate` (string or NULL): Release date string (e.g., December 4, 2024) - `contentType` (string or NULL): Type of content (e.g., Trailer Season 1 [OV]) ``` -------------------------------- ### Calling Predefined Lists Methods Source: https://github.com/duck7000/imdbgraphqlphp/wiki/User-class The User class provides methods to retrieve predefined lists associated with the user. These include lists like 'watch', 'favoriteActors', 'notInterested', and 'seen'. All these methods are called directly on the instantiated User object and do not require additional parameters. ```APIDOC ## Calling Predefined Lists Methods ### Description Retrieve predefined lists associated with the user. ### Methods - `watch()` - `favoriteActors()` - `notInterested()` - `seen()` ### Request Example ```php $results = $imdb->watch(); $results = $imdb->favoriteActors(); $results = $imdb->notInterested(); $results = $imdb->seen(); ``` ### Results Returns an array containing list details and items. #### Response Fields - **id** (string) - IMDb list id - **name** (string) - List name - **createdDate** (string) - List creation date - **lastModifiedDate** (string) - List last modification date - **listTypeId** (string) - Type of list (e.g., PEOPLE, TITLES) - **authorId** (string) - Author's IMDb ID - **authorNickname** (string) - Author's nickname - **items** (array) - Array of items in the list - **id** (string) - Item ID (e.g., titleId: tt45007835) - **title** (string) - Item name (title name) - **createdDate** (string) - Item addition date - **lastModifiedDate** (string) - Item last modification date - **titleType** (string) - Type of the item (e.g., movie, tv) - **thumb** (string) - URL of the item's thumbnail image ``` -------------------------------- ### aspectRatio() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all aspect ratio formats for a title. ```APIDOC ## aspectRatio() ### Description Gets all aspect ratio formats of this title. ### Returns An array of arrays, where each inner array contains 'type' (string) and 'attributes' (array). ``` -------------------------------- ### Calling User-Made Lists Methods Source: https://github.com/duck7000/imdbgraphqlphp/wiki/User-class Users can also retrieve lists they have created themselves. The User class offers methods for fetching 'userTitles' and 'userPeople' lists. These methods are invoked directly on the User object. ```APIDOC ## Calling User-Made Lists Methods ### Description Retrieve user-created lists of titles or people. ### Methods - `userTitles()` - `userPeople()` ### Request Example ```php $results = $imdb->userTitles(); $results = $imdb->userPeople(); ``` ### Results Returns an array of user-created lists. #### Response Fields - **id** (string) - IMDb list id - **name** (string) - List name - **createdDate** (string) - List creation date - **lastModifiedDate** (string) - List last modification date - **listTypeId** (string) - Type of list (e.g., PEOPLE, TITLES) - **authorId** (string) - Author's IMDb ID - **authorNickname** (string) - Author's nickname - **items** (array) - Array of items in the list - **names** (array) - For people lists: names; for titles lists: title - **id** (string) - Item ID (e.g., nameId: nm1200566, titleId: tt45007835) - **name/title** (string) - Person's name or title name - **createdDate** (string) - Item addition date - **lastModifiedDate** (string) - Item last modification date - **titleType** (string) - Type of the item (OMITTED for names) - **thumb** (string) - URL of the item's thumbnail image ``` -------------------------------- ### pubinterview() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class This method retrieves the Publicity Interviews of this name as listed on the publicity page. ```APIDOC ## pubinterview() ### Description This method gets the Publicity Interviews of this name as listed on publicity page. ### Returns array of array( publication: string, regionId: string, title: string, date: array('day', 'month', 'year') (int), reference: string, authors: array[] (string) ) ``` -------------------------------- ### faq() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Fetches all frequently asked questions for a title, including those without answers. It also indicates if a question contains spoilers. ```APIDOC ## faq() ### Description Gets all frequently asked questions of a title. It includes questions without an answer. ### Parameters * `$spoiler` (boolean) - Include spoilers or not. `isSpoiler` indicates if the question is a spoiler or not. ### Returns `array of array(question: string, answer: string, isSpoiler: boolean)` ``` -------------------------------- ### Initialize and Call Advanced Name Search Source: https://github.com/duck7000/imdbgraphqlphp/wiki/NameSearchAdvanced Instantiate the NameSearchAdvanced class and call the advancedNameSearch method with various parameters to retrieve search results. At least one search parameter must be provided. ```php $imdb = new \Imdb\NameSearchAdvanced(); $results = $imdb->advancedNameSearch($searchTerms, $birthDay, $birthDateRangeStart, $birthDateRangeEnd, $deathDateRangeStart, deathDateRangeEnd, $birthPlace); ``` -------------------------------- ### comingSoon() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Calendar-Class Retrieves upcoming movie and TV releases for a specified region and type, with options for date overrides and filtering. ```APIDOC ## comingSoon() ### Description Fetches upcoming releases from IMDb's calendar, categorized by release date. ### Parameters #### Path Parameters * **$region** (string) - Optional - Defines the country/region for releases (e.g., DE, NL, US). Defaults to US. * **$type** (string) - Optional - Defines the type of release (MOVIE, TV, TV_EPISODE). Defaults to MOVIE. * **$startDateOverride** (string) - Optional - Overrides the start date. Accepts values like '+3' or '-5' relative to the current date. Defaults to 0. * **$endDateOverride** (string) - Optional - Overrides the end date. Accepts any number of days up to 365. Defaults to 0 (one year ahead). * **$filter** (boolean) - Optional - If set to true, disables the popularity filter, showing all releases. If set to false, only popular releases are returned. Defaults to true. ### Return Value * **array** - Categorized by release date in ascending order. * `[release_date]` => (array) * `[index]` => Array * `title` (string) - The title of the release. * `imdbid` (string) - The IMDb ID of the release. * `genres` (array) - An array of genres associated with the title. * `cast` (array) - An array of cast members. * `imgUrl` (string) - The URL for the thumbnail image. ``` -------------------------------- ### extSites() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class Retrieves external websites containing information about a name, excluding external reviews. Returns an array of site details. ```APIDOC ## extSites() ### Description Gets external websites with info of this name, excluding external reviews. ### Returns An array of arrays, where each inner array contains: - `label` (string): The label or name of the website. - `url` (string): The URL of the external website. - `language` (array): An array of language codes associated with the site. ``` -------------------------------- ### Fetch User-Created Lists Source: https://github.com/duck7000/imdbgraphqlphp/wiki/User-class Retrieve user-defined lists of titles or people by calling the appropriate methods on the User class instance. These methods also do not require parameters. ```php $results = $imdb->userTitles(); ``` ```php $results = $imdb->userPeople(); ``` -------------------------------- ### credit() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class Retrieves all credits for a person, categorized by role. Returns an array of credit details including title information, characters, and jobs. ```APIDOC ## credit() ### Description Gets all credits for this person. ### Returns An array structured by `categoryId`, where each inner array contains: - `titleId` (string): The ID of the title. - `titleName` (string): The name of the title. - `titleType` (string): The type of the title (e.g., movie, series). - `year` (int|null): The year the title was released. - `endYear` (int|null): The year the title ended (for series). - `characters` (array): An array of characters played in the title (string). - `jobs` (array): An array of jobs performed for the title (string). - `titleFullImageUrl` (string): URL for the full-size image (max width 1000 pixels). - `titleThumbImageUrl` (string): URL for the thumbnail image (140x207 pixels). ``` -------------------------------- ### Initialize and Search Titles with Imdb GraphQL PHP Source: https://github.com/duck7000/imdbgraphqlphp/wiki/TitleSearch Instantiate the TitleSearch class and perform a search. Supports filtering by title types, release dates, and exact matches. Results are sorted with exact matches appearing first. ```php $imdb = new \Imdb\TitleSearch(); $results = $imdb->search("$searchTerm", "MOVIE,TV", "1955-01-01", "2000-01-01", true); ``` -------------------------------- ### connection() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all connections from a title related to other titles. ```APIDOC ## connection() ### Description Gets all connections from this title related to other titles. ### Response #### Success Response - Returns an array of connection objects, each with: - **titleId** (string) - The ID of the related title. - **titleName** (string) - The name of the related title. - **titleType** (string) - The type of the related title. - **year** (int) - The year the related title was released. - **endYear** (int) - The end year for series related titles. - **seriesName** (string) - The name of the series if the related title is part of one. - **description** (string) - A description of the connection. ``` -------------------------------- ### releaseDate() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Fetches all release dates for a title, including the country, day, month, year, and any associated attributes. ```APIDOC ## releaseDate() ### Description Gets all release dates of this title. ### Returns `array of array(country: string , day: int , month: int, year: int, attributes: array())` ``` -------------------------------- ### mainphoto() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves photos from the photo page of a title. ```APIDOC ## mainphoto() ### Description Gets (default 6) photos from the photo page of this title. ### Parameters #### Query Parameters - **amount** (int) - Optional - Controls how many photos are returned (max 9999). - **thumb** (boolean) - Optional - If `true`, thumbnail height is fixed and width is variable. If `false`, max width is 1000 pixels. ### Response #### Success Response - Returns an array of strings, where each string is an image URL. ``` -------------------------------- ### video() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class Retrieves all videos associated with a title from the videos page. It returns a categorized array of videos, including trailers and clips, with details such as ID, name, runtime, description, title information, playback URL, and image URL. ```APIDOC ## video() ### Description This method gets all videos from the videos page of a given title. The thumbnail is fixed at 500x281 pixels. It returns a categorized array of videos. ### Returns - **Array** categorized by video type (e.g., Trailer, Clip). - Each video entry contains: - **id** (string): The video ID. - **name** (string): The name of the video. - **runtime** (int): The duration of the video in seconds. - **description** (string): A description of the video. - **titleName** (string): The name of the title the video belongs to. - **titleYear** (int): The year the title was released. - **playbackUrl** (string): The URL to play the video. - **imageUrl** (string): The URL for the video's thumbnail image. ``` -------------------------------- ### NameSearch Class Usage Source: https://github.com/duck7000/imdbgraphqlphp/wiki/NameSearch Instantiate the NameSearch class and use the search method to find names. The search results can be limited using the $nameSearchAmount configuration option. ```APIDOC ## Class: NameSearch ### Description Allows searching for names on the IMDb GraphQL API. ### Initialization ```php $imdb = new \Imdb\NameSearch(); ``` ### Method: search Searches for names based on a provided search term. #### Parameters * **$searchTerm** (string) - Required - The input search string, which should include double quotes. * **$nameSearchAmount** (integer) - Optional - Limits the number of search results. Defaults to 10. ### Returns An array of Names. Each name entry may contain an 'id', 'name', 'knownFor' (an array of titles and years), 'primaryProfession', and a 'nameSearchObject'. ### Example ```php $searchTerm = "'Peter Fonda'"; $results = $imdb->search($searchTerm); // Example of accessing results: foreach ($results as $name) { echo "ID: " . $name['id'] . ", Name: " . $name['name'] . "\n"; if (!empty($name['knownFor'])) { echo "Known For: " . $name['knownFor'][0]['title'] . " (" . $name['knownFor'][0]['titleYear'] . ")\n"; } echo "Profession: " . $name['primaryProfession'] . "\n"; } ``` ``` -------------------------------- ### color() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all color formats for a title. ```APIDOC ## color() ### Description Gets all color formats of this title. ### Returns An array of arrays, where each inner array contains 'type' (string) and 'attributes' (array). ``` -------------------------------- ### keyword() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all keywords listed on the keywords page of a title. ```APIDOC ## keyword() ### Description Gets all keywords listed at keywords page of this title. ### Response #### Success Response - Returns an array of keywords (strings). ``` -------------------------------- ### Fetch Predefined IMDb Lists Source: https://github.com/duck7000/imdbgraphqlphp/wiki/User-class Call methods on the User class instance to retrieve predefined lists such as watch history, favorite actors, not interested items, and seen titles. These methods do not require parameters. ```php $results = $imdb->watch(); ``` ```php $results = $imdb->favoriteActors(); ``` ```php $results = $imdb->notInterested(); ``` ```php $results = $imdb->seen(); ``` -------------------------------- ### featuredReview() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves up to 5 featured reviews for a title. ```APIDOC ## featuredReview() ### Description Gets up to 5 featured reviews of a title. ### Returns An array of arrays, where each inner array contains authorNickName (string), authorRating (int), summaryText (string), reviewText (string), and submissionDate (iso date string). ``` -------------------------------- ### alsoknow() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves alternative names for a title based on different countries, as shown on the release info page. The first item in the output array is the original title. Results are ordered ascending by country. ```APIDOC ## alsoknow() ### Description Gets title alternative names based on different countries as shown on release info page. First item in output array will be original title. ### Parameters * `@return` array - Ordered Ascending by Country ``` -------------------------------- ### camera() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all camera types used in the production of a title. ```APIDOC ## camera() ### Description Gets all camera types used in this title. ### Returns An array of arrays, where each inner array contains 'type' (string) and 'attributes' (array). ``` -------------------------------- ### mainphoto() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class Retrieves a specified number of photos from the photo page for a given name. Supports thumbnail generation and returns an array of image URLs. ```APIDOC ## mainphoto($amount = 6, $thumb = true) ### Description Gets a specified number of photos (default 6) from the photo page of this name. ### Parameters - `$amount` (int): Controls how many photos are returned (max 9999). - `$thumb` (boolean): - `true`: Height is fixed (as set in config), width is variable. - `false`: Images are returned at their original size, max width 1000 pixels. ### Returns An array of strings, where each string is an image URL. ``` -------------------------------- ### soundtrack() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all soundtracks listed on the soundtrack page of a title. ```APIDOC ## soundtrack() ### Description Gets all soundtracks listed at the soundtrack page of this title. ### Response #### Success Response - Returns an array of soundtrack entries. Each entry is an array containing: - **soundtrack** (string) - The name of the soundtrack. - **credits** (array of strings) - An array of strings detailing the credits for the soundtrack. - **creditSplit** (array) - An array of objects, each detailing a credit split with: - **creditType** (string) - The type of credit (e.g., 'Performed by', 'Written by'). - **name** (string) - The name of the person or entity credited. - **id** (string) - The ID associated with the credit. - **attribute** (string) - Additional attributes for the credit. - **comment** (array of strings) - An array of comments related to the credit. ``` -------------------------------- ### photo() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves the URL for the main photo image, suitable for thumbnails or full-size display. Thumbnails are cropped from the center (190x281 pixels), while full-size images are a maximum of 1000 pixels. ```APIDOC ## photo() ### Description Gets the main photo image url for thumbnail or full size. thumbnail is cropped from center, 190x281 pixels, full is max 1000 pixels. ### Note Thumbnail width and height are in config, keep ratio in mind when changing! ### Returns `string url or false` ``` -------------------------------- ### interestingKeywords() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Provides an alternative for real interests based on keywords, mixing keywords with genre and main genres. ```APIDOC ## interestingKeywords() ### Description This method is an alternative for the real interests based on keywords. It is a mix of keywords bonded with genre and main genres. ### Response #### Success Response - Returns an array of interesting keywords. ``` -------------------------------- ### genre() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all main and sub-genres a title is registered for. ```APIDOC ## genre() ### Description Gets all main and sub genres this title is registered for. ### Returns `array genres (array[0..n] of mainGenre| string, subGenre| array())` ``` -------------------------------- ### gross() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves information about gross revenue, ranked by amount. ```APIDOC ## gross() ### Description Gets Info about Grosses, ranked by amount. ### Response #### Success Response - Returns an array of gross revenue objects, each with: - **areatype** (string) - The type of area for this gross (e.g., 'world wide', 'domestic'). - **amount** (int) - The gross revenue amount. - **currency** (string) - The currency of the gross revenue. ``` -------------------------------- ### prodcompany() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all production companies that worked on a given title. ```APIDOC ## prodcompany() ### Description Gets all production companies that worked on this title. ### Response #### Success Response - Returns an array of production company objects, each with: - **name** (string) - The name of the production company. - **id** (string) - The ID of the production company. - **country** (string) - The country of origin for the company. - **attribute** (string) - Any relevant attribute for the company. - **year** (int) - The year the company was involved. ``` -------------------------------- ### isOngoing() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Determines if a TV series is still running or has ended. Returns true if still running, false if ended, or NULL if it's not a TV series. ```APIDOC ## isOngoing() ### Description Returns whether a tv series is ended or still running. ### Returns `boolean` true: still running, false: ended or NULL (not a tv series) ``` -------------------------------- ### Enable Localization in IMDb GraphQL PHP Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Home Set $useLocalization to true to enable localization. Configure the desired country and language codes. Localization affects title, photo, plotoutline, and recommendation methods. ```php $useLocalization = false; $country = "DE"; $language = "de-DE"; ``` -------------------------------- ### thanks() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all 'thanks' credits for a given title. Includes their IMDb ID, name, jobs, attributes, episode information, and thumbnail URLs. ```APIDOC ## thanks() ### Description Gets all thanks credits of this title. Thumbnail size 140x207 fixed. ### Returns `array` of array( `imdb`: string, `name`: string, `jobs`: array[], `attributes`: array[], `episode`: array(total, year, endYear), `titleFullImageUrl`: string, `titleThumbImageUrl`: string ) ``` -------------------------------- ### distcompany() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all distribution companies that worked on a given title. ```APIDOC ## distcompany() ### Description Gets all distribution companies that worked on this title. ### Response #### Success Response - Returns an array of distribution company objects, each with: - **name** (string) - The name of the distribution company. - **id** (string) - The ID of the distribution company. - **country** (string) - The country of origin for the company. - **attribute** (string) - Any relevant attribute for the company. - **year** (int) - The year the company was involved. ``` -------------------------------- ### Enable Debug Logging in IMDb GraphQL PHP Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Home Set the $debug configuration option to true to enable the logger. The logger currently only works for the return of GraphQL API calls. ```php $debug = true; ``` -------------------------------- ### photo($thumb) Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class This method retrieves the person's photo, with an option for thumbnail size. ```APIDOC ## photo($thumb) ### Description This method gets the person's image. ### Parameters #### Query Parameters - **$thumb** (boolean) - Optional - If true, returns a thumbnail (default: 140x207); if false, returns a large image (max 1000 pixels). ### Note Thumbnail width and height are configurable. Consider the aspect ratio when making changes. ### Returns string URL or false ``` -------------------------------- ### productionStatus() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves the current production status of a title. ```APIDOC ## productionStatus() ### Description Gets the current production status of a title (e.g., Released, In Development, Pre-Production, Complete, Production). ### Returns A string representing the production status. ``` -------------------------------- ### trendingVideo() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Trailers Retrieves a list of trending video trailers. It returns a maximum of 250 items. Titles are skipped if they lack a `videoId`, potentially resulting in fewer than 250 items. The `playbackUrl` is playable directly in a browser. ```APIDOC ## trendingVideo() ### Description Retrieves a list of trending video trailers, returning a maximum of 250 items. Titles are skipped if they lack a `videoId`, potentially resulting in fewer than 250 items. The `playbackUrl` is playable directly in a browser. ### Method `trendingVideo()` ### Parameters None ### Return Value Array[] of arrays, where each inner array contains trailer details: - `videoId` (string or NULL): Video ID without 'vi' - `titleId` (string or NULL): Title ID without 'tt' - `title` (string or NULL): The title of the movie/show the trailer belongs to - `trailerCreateDate` (string or NULL): ISO date string of trailer creation (e.g., 2024-11-17T13:16:18.708Z) - `trailerRuntime` (int or NULL): Trailer duration in seconds - `playbackUrl` (string or NULL): URL to play the trailer in a browser - `thumbnailUrl` (string or NULL): URL for the trailer thumbnail image (140x207) - `releaseDate` (string or NULL): Release date string (e.g., December 4, 2024) - `contentType` (string or NULL): Type of content (e.g., Trailer Season 1 [OV]) ``` -------------------------------- ### language() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Fetches all languages spoken in a given title. ```APIDOC ## language() ### Description Gets all languages spoken in this title. ### Returns `array (array[0..n] of array(id|string, text|string))` ``` -------------------------------- ### akaName() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class This method retrieves alternative names for the person, similar to those found on their IMDb profile. ```APIDOC ## akaName() ### Description This method gets the person's alternative names (e.g., https://www.imdb.com/name/nm0000314/). ### Returns array() of aka names ``` -------------------------------- ### watchOption() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves categorized watch options for a title, currently limited to Amazon providers. ```APIDOC ## watchOption() ### Description Provides watch options by category for this title. As of December 2024, only Amazon providers are returned. ### Returns A categorized array of watch options. Each option includes providerId, providerName, and logoUrl. ### Example Response Structure ```json { "rent/buy": [ { "providerId": "string (amzn1.imdb.w2w.provider.prime_video)", "providerName": "string (Prime Video)", "logoUrl": "string (PNG!)" } ] } ``` ``` -------------------------------- ### height() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class This method retrieves the person's height in both metric and imperial units. ```APIDOC ## height() ### Description This method gets the person's 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 ) ``` -------------------------------- ### newsList($listType) Source: https://github.com/duck7000/imdbgraphqlphp/wiki/News Retrieves a list of news items. It can fetch different types of news lists, with 'MOVIE' as the default. A maximum of 250 items are returned, covering approximately one year of news. ```APIDOC ## newsList($listType) ### Description Retrieves a list of news items based on the specified list type. The default type is 'MOVIE'. This method returns a maximum of 250 items, covering about a year's worth of news. ### Parameters #### Query Parameters - **$listType** (string) - Optional - Defines the type of news list to return. Possible values include: CELEBRITY, INDIE, MOVIE, TOP, TV. Defaults to MOVIE. ### Return Value Array[] of array - **id** (string) - The unique identifier for the news item (without 'ni'). - **title** (string) - The title of the news item. - **author** (string) - The author of the news item. - **date** (string) - The publication date of the news item in ISO date string format. - **extUrl** (string) - An external URL related to the news item. - **exturlLabel** (string) - The label for the external URL. - **textHtml** (string) - The news content in HTML format. - **textText** (string) - The news content in plain text format. - **thumbnailUrl** (string) - The URL of the thumbnail image for the news item. ### Example Usage ```php $imdb = new \Imdb\News(); $results = $imdb->newsList(); // Fetches default MOVIE news $tvNews = $imdb->newsList('TV'); // Fetches TV news ``` ``` -------------------------------- ### Search IMDb Names Source: https://github.com/duck7000/imdbgraphqlphp/blob/master/README.md Search for people on IMDb by their name. This returns a list of matching individuals. ```php $imdb = new \Imdb\NameSearch(); $results = $imdb->search("Peter Fonda"); ``` -------------------------------- ### born() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class This method retrieves the person's birth date and birth location. ```APIDOC ## born() ### Description This method gets the person's birth date and birth location. ### Returns array( day: int, month: string (month name), mon: int (month number), year: int, place: string (birth location) ) ``` -------------------------------- ### name() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class This method retrieves the person's name. ```APIDOC ## name() ### Description This method gets the person's name. ### Returns string ``` -------------------------------- ### age() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class This method retrieves the person's age. ```APIDOC ## age() ### Description This method gets the person's age. ### Returns int (or null) ``` -------------------------------- ### pubpictorial() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Name-class Retrieves the Publicity Pictorials for a given name from the publicity page. Returns an array of pictorial details. ```APIDOC ## pubpictorial() ### Description Gets the Publicity Pictorials of this name as listed on the publicity page. ### Returns An array of arrays, where each inner array contains: - `publication` (string): The name of the publication. - `regionId` (string): The region identifier. - `title` (string): The title of the pictorial. - `date` (array): An array containing 'day', 'month', and 'year' (int). - `reference` (string): A reference identifier. - `authors` (array): An array of author names (string). ``` -------------------------------- ### visualEffects() Source: https://github.com/duck7000/imdbgraphqlphp/wiki/Title-class Retrieves all Visual Effects credits for a given title. Includes their IMDb ID, name, jobs, attributes, episode information, and thumbnail URLs. ```APIDOC ## visualEffects() ### Description Gets all Visual Effects credits of this title. Thumbnail size 140x207 fixed. ### Returns `array` of array( `imdb`: string, `name`: string, `jobs`: array[], `attributes`: array[], `episode`: array(total, year, endYear), `titleFullImageUrl`: string, `titleThumbImageUrl`: string ) ```