search_query | R Documentation |
Search for a show or movie with a keyword (e.g. "Breaking Bad"
) and receive
basic info of the first search result. It's main use is to retrieve
the IDs or proper show/movie title for further use, as well
as receiving a quick overview of a show/movie.
search_query(
query,
type = "show",
n_results = 1L,
extended = c("min", "full"),
years = NULL,
genres = NULL,
languages = NULL,
countries = NULL,
runtimes = NULL,
ratings = NULL,
certifications = NULL,
networks = NULL,
status = NULL
)
search_id(
id,
id_type = c("trakt", "imdb", "tmdb", "tvdb"),
type = "show",
n_results = 1L,
extended = c("min", "full")
)
query |
|
type |
|
n_results |
|
extended |
|
years |
|
genres |
|
languages |
|
countries |
|
runtimes |
|
ratings |
|
certifications |
|
networks |
|
status |
|
id |
|
id_type |
|
The amount of information returned is equal to *_summary
API methods and
in turn depends on the value of extended
.
See also the
API reference here for
which fields of the item metadata are searched by default.
A tibble containing n_results
results.
Variable type
is equivalent to the value of the type
argument, and
variable score
indicates the search match, where 1000
is a perfect
match.
If no results are found, the tibble
has 0 rows.
If more than one type
is specified, e.g. c("movie", "show")
,
there will be n_results
results per type.
search_query()
wraps endpoint search/:type?query=.
search_id()
wraps endpoint search/:id_type/:id?type=.
# A show
search_query("Breaking Bad", type = "show", n_results = 3)
## Not run:
# A show by its trakt id, and now with more information
search_id(1388, "trakt", type = "show", extended = "full")
# A person
search_query("J. K. Simmons", type = "person", extended = "full")
# A movie or a show, two of each
search_query("Tron", type = c("movie", "show"), n_results = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.