Learn R Programming

cablecuttr (version 0.1.1)

can_i_stream: Query CanIStream.It

Description

Searches for the movie's availability on various online services/stores.

Usage

can_i_stream_id(movie_id, media_type = c("streaming", "rental", "purchase", "dvd", "xfinity"), user_agent = NULL, offline = FALSE)
can_i_stream_it(movie_name, media_type = c("streaming", "rental", "purchase", "dvd", "xfinity"), user_agent = NULL)

Arguments

movie_id
The movie's ID, found by running find_movie
media_type
The type to search for:
user_agent
Allows specification of custom UA
offline
A logical flag to simulate the API request
movie_name
The movie's name, which will be passed to find_movie

Value

A data.frame with a row for each service/store and the following columns:

Functions

  • can_i_stream_id: Query CanIStream.It by movie ID and media type
  • can_i_stream_it: Query CanIStream.It by movie name and media type

Details

The API is a bit slow/unreliable, so if you get a HTTP 504 error, just re-run the call.

Examples

Run this code
can_i_stream_id("4eb0173df5f8079d29000002", "purchase")
## Not run: 
#   movie_id <- find_movie("The Babadook")$movie_id
#   can_i_stream_id(movie_id, "streaming")
# ## End(Not run)
## Not run: 
#   can_i_stream_it("Tinker Tailor Soldier Spy")
# ## End(Not run)

Run the code above in your browser using DataLab