Title: | Get Movie, Television Data from the 'imdb' Database |
---|---|
Description: | Provides API access to the <http://imdbapi.net> which maintains metadata about movies, games and television shows through a public API. |
Authors: | Daxuan Deng Yuan Li |
Maintainer: | Yuan Li <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-11-19 06:50:30 UTC |
Source: | CRAN |
Retrieve OMDB info by IMDB ID search
find_by_id(id, type = NULL, year_of_release = NULL, plot = "short", include_tomatoes = FALSE, api_key = omdb_api_key())
find_by_id(id, type = NULL, year_of_release = NULL, plot = "short", include_tomatoes = FALSE, api_key = omdb_api_key())
id |
A valid IMDb ID (e.g. |
type |
Type of result to return. One of |
year_of_release |
Year of release. |
plot |
Return |
include_tomatoes |
Include Rotten Tomatoes ratings. |
api_key |
OMDB API key. See |
tbl_df
/data.frame
of search results (an empty one if none found). Also
classes as an omdb
object for prettier printing
The API's search results limit to 10.
Retrieve OMDB info by title search
find_by_title(title, type = NULL, season = NULL, episode = NULL, year_of_release = NULL, plot = "short", include_tomatoes = FALSE, api_key = omdb_api_key())
find_by_title(title, type = NULL, season = NULL, episode = NULL, year_of_release = NULL, plot = "short", include_tomatoes = FALSE, api_key = omdb_api_key())
title |
Movie title to search for. |
type |
Type of result to return. One of |
season |
if |
episode |
if |
year_of_release |
Year of release. |
plot |
Return |
include_tomatoes |
Include Rotten Tomatoes ratings. |
api_key |
OMDB API key. See |
tbl_df
/data.frame
of search results (an empty one if none found). Also
classes as an omdb
object for prettier printing
The API's search results limit to 10.
Splits the field at commas and returns a vector of individual entries
get_actors(omdb)
get_actors(omdb)
omdb |
an object returned by |
A character vector of actors
get_actors(find_by_id("tt0031381"))
get_actors(find_by_id("tt0031381"))
Splits the field at commas and returns a vector of individual entries
get_countries(omdb)
get_countries(omdb)
omdb |
an object returned by |
A character vector of countries
get_countries(find_by_id("tt0031381"))
get_countries(find_by_id("tt0031381"))
Splits the field at commas and returns a vector of individual entries
get_directors(omdb)
get_directors(omdb)
omdb |
an object returned by |
A character vector of directors
get_directors(find_by_id("tt0031381"))
get_directors(find_by_id("tt0031381"))
Splits the field at commas and returns a vector of individual entries
get_genres(omdb)
get_genres(omdb)
omdb |
an object returned by |
A character vector of genres
get_genres(find_by_id("tt0031381"))
get_genres(find_by_id("tt0031381"))
Splits the field at commas and returns a vector of individual entries
get_writers(omdb)
get_writers(omdb)
omdb |
an object returned by |
A character vector of writers
get_writers(find_by_id("tt0031381"))
get_writers(find_by_id("tt0031381"))
The API wrapper functions in this package all rely on a OMDB API
key residing in the environment variable OMDB_API_KEY
. The
easiest way to accomplish this is to set it in the .Renviron
file in your
home directory.
omdb_api_key(force = FALSE)
omdb_api_key(force = FALSE)
force |
force setting a new OMDB API key for the current environment? |
atomic character vector containing the OMDB API key
The "poster" API requires a separate key
Lightweight omdb title search
search_by_title(term, type = NULL, year_of_release = NULL, page = 1, api_key = omdb_api_key())
search_by_title(term, type = NULL, year_of_release = NULL, page = 1, api_key = omdb_api_key())
term |
Movie title to search for. |
type |
Type of result to return. One of |
year_of_release |
Year of release. |
page |
1 for first 10 results, 2 for next ten, etc... |
api_key |
OMDB API key. See |
tbl_df
/data.frame
of search results (an empty one if none found)
The API's search results limit to 10 at a time (see argument page).