Type: | Package |
Date: | 2020-01-06 |
Title: | Get 'OMDB' API Multiple Information |
Version: | 0.1.0 |
Author: | Alberto Almuiña <albertogonzalezalmuinha@gmail.com> |
Maintainer: | Alberto Almuiña <albertogonzalezalmuinha@gmail.com> |
Description: | Load multiple movies, series, actors, directors etc from 'OMDB' API. More information in: http://www.omdbapi.com/ . |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 6.1.1 |
URL: | https://github.com/AlbertoAlmuinha/ROMDB |
Imports: | dplyr, purrr, httr, stringr, RODBC, magick |
NeedsCompilation: | no |
Packaged: | 2020-01-09 12:50:47 UTC; albgonzal |
Repository: | CRAN |
Date/Publication: | 2020-01-14 11:40:06 UTC |
Get OMDB Item
Description
This function searches OMDB Movies/Series by ID.
Usage
get_omdb_item(omdb_id, include_image = TRUE,
API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
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.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item('tt0120338')
## End(Not run)
Get OMDB Item Actors
Description
This function returns a vector with the actors returned by the api (separated by commas).
Usage
get_omdb_item_actors(omdb_id, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Return a vector with the actors of a movie/series.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item_actors(omdb_id = 'tt0120338')
## End(Not run)
Get OMDB Item Countries
Description
This function returns a vector with the countries returned by the api (separated by commas).
Usage
get_omdb_item_countries(omdb_id, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Return a vector with the countries of a movie/series.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item_countries(omdb_id = 'tt0120338')
## End(Not run)
Get OMDB Item Directors
Description
This function returns a vector with the directors returned by the api (separated by commas).
Usage
get_omdb_item_directors(omdb_id, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Return a vector with the directors of a movie/series.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item_directors(omdb_id = 'tt0120338')
## End(Not run)
Get OMDB Item Genres
Description
This function returns a vector with the genres returned by the api (separated by commas).
Usage
get_omdb_item_genres(omdb_id, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Return a vector with the genres of a movie/series.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item_genres(omdb_id = 'tt0120338')
## End(Not run)
Get OMDB Item Languages
Description
This function returns a vector with the languages returned by the api (separated by commas).
Usage
get_omdb_item_languages(omdb_id, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Return a vector with the languages of a movie/series.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item_languages(omdb_id = 'tt0120338')
## End(Not run)
Get OMDB Item Poster
Description
This function searches Item Poster.
Usage
get_omdb_item_poster(omdb_id, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Return an image with the movie/series poster.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item_poster(omdb_id = 'tt0120338')
## End(Not run)
Get OMDB Item Ratings
Description
This function searches Item Ratings.
Usage
get_omdb_item_ratings(omdb_id, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Return a tibble with the movie/series ratings.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item_ratings(odmb_id = 'tt0120338')
## End(Not run)
Get OMDB Item Writers
Description
This function returns a vector with the writers returned by the api (separated by commas).
Usage
get_omdb_item_writers(omdb_id, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Return a vector with the writers of a movie/series.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_item_writers(omdb_id = 'tt0120338')
## End(Not run)
Get OMDB Several Items
Description
This function searches OMDB Movies/Series by ID.
Usage
get_omdb_several_items(omdb_ids, include_gif = TRUE,
API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
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.
Author(s)
Alberto Almuiña
Examples
## Not run:
get_omdb_several_items(odmb_ids = search_omdb_items('Titanic', include_gif = F) %>% .$imdb_id)
## End(Not run)
Get Request Status
Description
This function determines if a OMDB API Request is correct or not.
Usage
get_request_status(res)
Arguments
res |
OMDB API Request |
Value
Raise an error if the request is not correct.
Author(s)
Alberto Almuiña
Item to Database
Description
This function stores an item into a database table.
Usage
item_to_database(con, item, dbtable, rownames = F, colnames = F,
append = T)
Arguments
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 |
Author(s)
Alberto Almuiña
Examples
## Not run:
item_to_database(con, tibble_df, 'M_SQL_TABLE')
## End(Not run)
Search OMDB Gif
Description
This function searches OMDB Api Items (movies or series) by name, type and year.
Usage
search_omdb_gif(movie, type = "movie", year = NULL, page = 1,
API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
Returns a gif of the movies searched (an image if only one result is returned)
Author(s)
Alberto Almuiña
Examples
## Not run:
search_omdb_gif('Titanic')
## End(Not run)
Search OMDB Items
Description
This function searches OMDB Api Items (movies or series) by name, type and year.
Usage
search_omdb_items(movie, type = "movie", year = NULL, page = 1,
include_gif = TRUE, API_KEY = Sys.getenv("API_KEY"))
Arguments
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 |
Value
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.
Author(s)
Alberto Almuiña
Examples
## Not run:
search_omdb_items('Titanic')
## End(Not run)