Title: | Get Movie, Television Data from the 'imdb' Database |
Version: | 0.1.0 |
Author: | Daxuan Deng Yuan Li |
Maintainer: | Yuan Li <851277048@qq.com> |
Description: | Provides API access to the http://imdbapi.net which maintains metadata about movies, games and television shows through a public API. |
Depends: | R (≥ 3.1.1) |
License: | GPL-3 |
Imports: | httr, dplyr, stringr |
RoxygenNote: | 6.0.1 |
NeedsCompilation: | no |
Packaged: | 2018-04-23 11:49:25 UTC; Kevin |
Repository: | CRAN |
Date/Publication: | 2018-04-24 08:11:08 UTC |
Retrieve OMDB info by IMDB ID search
Description
Retrieve OMDB info by IMDB ID search
Usage
find_by_id(id, type = NULL, year_of_release = NULL, plot = "short",
include_tomatoes = FALSE, api_key = omdb_api_key())
Arguments
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 |
Value
tbl_df
/data.frame
of search results (an empty one if none found). Also
classes as an omdb
object for prettier printing
Note
The API's search results limit to 10.
Retrieve OMDB info by title search
Description
Retrieve OMDB info by title search
Usage
find_by_title(title, type = NULL, season = NULL, episode = NULL,
year_of_release = NULL, plot = "short", include_tomatoes = FALSE,
api_key = omdb_api_key())
Arguments
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 |
Value
tbl_df
/data.frame
of search results (an empty one if none found). Also
classes as an omdb
object for prettier printing
Note
The API's search results limit to 10.
See Also
Get actors from an omdb object as a vector
Description
Splits the field at commas and returns a vector of individual entries
Usage
get_actors(omdb)
Arguments
omdb |
an object returned by |
Value
A character vector of actors
Examples
get_actors(find_by_id("tt0031381"))
Get countries from an omdb object as a vector
Description
Splits the field at commas and returns a vector of individual entries
Usage
get_countries(omdb)
Arguments
omdb |
an object returned by |
Value
A character vector of countries
Examples
get_countries(find_by_id("tt0031381"))
Get directors from an omdb object as a vector
Description
Splits the field at commas and returns a vector of individual entries
Usage
get_directors(omdb)
Arguments
omdb |
an object returned by |
Value
A character vector of directors
Examples
get_directors(find_by_id("tt0031381"))
Get genres from an omdb object as a vector
Description
Splits the field at commas and returns a vector of individual entries
Usage
get_genres(omdb)
Arguments
omdb |
an object returned by |
Value
A character vector of genres
Examples
get_genres(find_by_id("tt0031381"))
Get writers from an omdb object as a vector
Description
Splits the field at commas and returns a vector of individual entries
Usage
get_writers(omdb)
Arguments
omdb |
an object returned by |
Value
A character vector of writers
Examples
get_writers(find_by_id("tt0031381"))
Get or set OMDB_API_KEY value
Description
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.
Usage
omdb_api_key(force = FALSE)
Arguments
force |
force setting a new OMDB API key for the current environment? |
Value
atomic character vector containing the OMDB API key
Note
The "poster" API requires a separate key
Lightweight omdb title search
Description
Lightweight omdb title search
Usage
search_by_title(term, type = NULL, year_of_release = NULL, page = 1,
api_key = omdb_api_key())
Arguments
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 |
Value
tbl_df
/data.frame
of search results (an empty one if none found)
Note
The API's search results limit to 10 at a time (see argument page).