Skip to contents

search_movies() is a wrapper function, which uses combine_page_results() to:

  • run search_movies_response(query) to get the response of the first page and determine how many total pages/results the query returned

    • takes the $total_pages from the response,

    • Compares with the optional argument num_pages

  • if more pages are desired, uses loop_through_pages() to combine rows from all pages, then returns one data.frame object

search_movies_response() returns a named list from one page of the JSON response (default page = 1). The response contains:

  • $page - (an integer value)

  • $results - (a data.frame object representing one page of results, typically 20 entries per page)

  • $total_pages - (an integer value)

  • $total_results - (an integer value)

Usage

search_movies(query, ...)

search_movies_response(query, ..., auth_token = get_auth_token())

Arguments

query

Required. A character vector with one element

...

Other Optional Query Parameters passed to the search/movies/ resource. The only required parameter is query

Details

Search TMDB movie database movies by their original, translated and alternative titles.

See also

get_tmdb_response(), call_tmdb_fn(), unique()