Title: | Get 'OMDB' API Multiple Information |
---|---|
Description: | Load multiple movies, series, actors, directors etc from 'OMDB' API. More information in: <http://www.omdbapi.com/> . |
Authors: | Alberto Almuiña <[email protected]> |
Maintainer: | Alberto Almuiña <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-10-27 04:04:07 UTC |
Source: | https://github.com/albertoalmuinha/romdb |
This function searches OMDB Movies/Series by ID.
get_omdb_item(omdb_id, include_image = TRUE, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item(omdb_id, include_image = TRUE, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
include_image |
If TRUE, the result includes an image of the movie/series. Default: TRUE. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
If include_image is TRUE, returns a list with a tibble with the movie information and a image of the film. If include_image is FALSE, only returns the tibble.
Alberto Almuiña
## Not run: get_omdb_item('tt0120338') ## End(Not run)
## Not run: get_omdb_item('tt0120338') ## End(Not run)
This function returns a vector with the actors returned by the api (separated by commas).
get_omdb_item_actors(omdb_id, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item_actors(omdb_id, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Return a vector with the actors of a movie/series.
Alberto Almuiña
## Not run: get_omdb_item_actors(omdb_id = 'tt0120338') ## End(Not run)
## Not run: get_omdb_item_actors(omdb_id = 'tt0120338') ## End(Not run)
This function returns a vector with the countries returned by the api (separated by commas).
get_omdb_item_countries(omdb_id, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item_countries(omdb_id, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Return a vector with the countries of a movie/series.
Alberto Almuiña
## Not run: get_omdb_item_countries(omdb_id = 'tt0120338') ## End(Not run)
## Not run: get_omdb_item_countries(omdb_id = 'tt0120338') ## End(Not run)
This function returns a vector with the directors returned by the api (separated by commas).
get_omdb_item_directors(omdb_id, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item_directors(omdb_id, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Return a vector with the directors of a movie/series.
Alberto Almuiña
## Not run: get_omdb_item_directors(omdb_id = 'tt0120338') ## End(Not run)
## Not run: get_omdb_item_directors(omdb_id = 'tt0120338') ## End(Not run)
This function returns a vector with the genres returned by the api (separated by commas).
get_omdb_item_genres(omdb_id, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item_genres(omdb_id, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Return a vector with the genres of a movie/series.
Alberto Almuiña
## Not run: get_omdb_item_genres(omdb_id = 'tt0120338') ## End(Not run)
## Not run: get_omdb_item_genres(omdb_id = 'tt0120338') ## End(Not run)
This function returns a vector with the languages returned by the api (separated by commas).
get_omdb_item_languages(omdb_id, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item_languages(omdb_id, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Return a vector with the languages of a movie/series.
Alberto Almuiña
## Not run: get_omdb_item_languages(omdb_id = 'tt0120338') ## End(Not run)
## Not run: get_omdb_item_languages(omdb_id = 'tt0120338') ## End(Not run)
This function searches Item Poster.
get_omdb_item_poster(omdb_id, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item_poster(omdb_id, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Return an image with the movie/series poster.
Alberto Almuiña
## Not run: get_omdb_item_poster(omdb_id = 'tt0120338') ## End(Not run)
## Not run: get_omdb_item_poster(omdb_id = 'tt0120338') ## End(Not run)
This function searches Item Ratings.
get_omdb_item_ratings(omdb_id, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item_ratings(omdb_id, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Return a tibble with the movie/series ratings.
Alberto Almuiña
## Not run: get_omdb_item_ratings(odmb_id = 'tt0120338') ## End(Not run)
## Not run: get_omdb_item_ratings(odmb_id = 'tt0120338') ## End(Not run)
This function returns a vector with the writers returned by the api (separated by commas).
get_omdb_item_writers(omdb_id, API_KEY = Sys.getenv("API_KEY"))
get_omdb_item_writers(omdb_id, API_KEY = Sys.getenv("API_KEY"))
omdb_id |
String with the omdb_id for a movie/series. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Return a vector with the writers of a movie/series.
Alberto Almuiña
## Not run: get_omdb_item_writers(omdb_id = 'tt0120338') ## End(Not run)
## Not run: get_omdb_item_writers(omdb_id = 'tt0120338') ## End(Not run)
This function searches OMDB Movies/Series by ID.
get_omdb_several_items(omdb_ids, include_gif = TRUE, API_KEY = Sys.getenv("API_KEY"))
get_omdb_several_items(omdb_ids, include_gif = TRUE, API_KEY = Sys.getenv("API_KEY"))
omdb_ids |
Vector with the omdb_ids for selected movies/series. All the IDs must be the same type (movie or series). |
include_gif |
If TRUE, the result includes a gif of the movies/series. Default: TRUE. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
If include_gif is TRUE, returns a list with a tibble with the movie information and a gif of the films. If include_image is FALSE, only returns the tibble.
Alberto Almuiña
## Not run: get_omdb_several_items(odmb_ids = search_omdb_items('Titanic', include_gif = F) %>% .$imdb_id) ## End(Not run)
## Not run: get_omdb_several_items(odmb_ids = search_omdb_items('Titanic', include_gif = F) %>% .$imdb_id) ## End(Not run)
This function determines if a OMDB API Request is correct or not.
get_request_status(res)
get_request_status(res)
res |
OMDB API Request |
Raise an error if the request is not correct.
Alberto Almuiña
This function stores an item into a database table.
item_to_database(con, item, dbtable, rownames = F, colnames = F, append = T)
item_to_database(con, item, dbtable, rownames = F, colnames = F, append = T)
con |
Conecction to some database made with the RODBC package or some other. |
item |
Tibble returned for some of the functions of the ROMDB package. |
dbtable |
Name of the database table to insert the results. |
rownames |
either logical or character. If logical, save the row names as the first column rownames in the table? If character, the column name under which to save the rownames. Default: FALSE |
colnames |
logical: save column names as the first row of table? Default: FALSE |
append |
logical. Should data be appended to an existing table? Default: TRUE |
Alberto Almuiña
## Not run: item_to_database(con, tibble_df, 'M_SQL_TABLE') ## End(Not run)
## Not run: item_to_database(con, tibble_df, 'M_SQL_TABLE') ## End(Not run)
This function searches OMDB Api Items (movies or series) by name, type and year.
search_omdb_gif(movie, type = "movie", year = NULL, page = 1, API_KEY = Sys.getenv("API_KEY"))
search_omdb_gif(movie, type = "movie", year = NULL, page = 1, API_KEY = Sys.getenv("API_KEY"))
movie |
String of movie/series name |
type |
Default: 'movie'. Valid options are 'movie' or 'series'. |
year |
Optional. Year of release. |
page |
The number of results returned. 1: 10 results, 2: 20 results... |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
Returns a gif of the movies searched (an image if only one result is returned)
Alberto Almuiña
## Not run: search_omdb_gif('Titanic') ## End(Not run)
## Not run: search_omdb_gif('Titanic') ## End(Not run)
This function searches OMDB Api Items (movies or series) by name, type and year.
search_omdb_items(movie, type = "movie", year = NULL, page = 1, include_gif = TRUE, API_KEY = Sys.getenv("API_KEY"))
search_omdb_items(movie, type = "movie", year = NULL, page = 1, include_gif = TRUE, API_KEY = Sys.getenv("API_KEY"))
movie |
String of movie/series name |
type |
Default: 'movie'. Valid options are 'movie' or 'series'. |
year |
Optional. Year of release. |
page |
The number of results returned. 1: 10 results, 2: 20 results... |
include_gif |
If TRUE, the result includes a gif of the movies/series. Default: TRUE. |
API_KEY |
OMBD Api Key. Default: Get the Api Key from system environment. Use Sys.setenv('API_KEY' = 'XXXXX'). More information in: http://www.omdbapi.com/apikey.aspx |
If include_gif is TRUE, returns a list with a tibble with the movie information and a gif of the films. If include_image is FALSE, only returns the tibble.
Alberto Almuiña
## Not run: search_omdb_items('Titanic') ## End(Not run)
## Not run: search_omdb_items('Titanic') ## End(Not run)