Package 'imdbapi'

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

Help Index


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. tt1285016)

type

Type of result to return. One of [movie|series|episode|game].

year_of_release

Year of release.

plot

Return short or full plot.

include_tomatoes

Include Rotten Tomatoes ratings.

api_key

OMDB API key. See omdb_api_key() & https://www.patreon.com/bePatron?u=5038490 for more information.

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 [movie|series|episode|game].

season

if type is series or episode then it possible to search within a season AND epispde (both required)

episode

if type is series or episode then it possible to search within a season AND epispde (both required)

year_of_release

Year of release.

plot

Return short or full plot.

include_tomatoes

Include Rotten Tomatoes ratings.

api_key

OMDB API key. See omdb_api_key() & https://www.patreon.com/bePatron?u=5038490 for more information.

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

http://www.omdbapi.com/


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 find_by_title or find_by_id

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 find_by_title or find_by_id

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 find_by_title or find_by_id

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 find_by_title or find_by_id

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 find_by_title or find_by_id

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 [movie|series|episode|game].

year_of_release

Year of release.

page

1 for first 10 results, 2 for next ten, etc...

api_key

OMDB API key. See omdb_api_key() & https://www.patreon.com/bePatron?u=5038490 for more information.

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).

See Also

http://www.omdbapi.com/