Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | API interface to OMDB (Open Movie Database) |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.5.0 |
SHA1 sum: | bc5ef97af45431a45826e1cf53b65baae626e414 |
Author: | Ebrahim Azarisooreh <ebrahim.azarisooreh@gmail.com> |
Home page: | https://github.com/eazar001/pl_omdb |
Download URL: | https://github.com/eazar001/pl_omdb/archive/v0.5.0.zip |
Requires: | typedef |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.1.1 | fe7234fa3dc43cbf22197b703f692c12b00deb52 | 1 | https://github.com/eazar001/pl_omdb/archive/v0.1.1.zip |
0.1.2 | 2f900596521607134c298344fa055b3711f33ceb | 1 | https://github.com/eazar001/pl_omdb/archive/v0.1.2.zip |
0.1.3 | 9eec74f996187f8497ee61115d50fe50cfb65516 | 1 | https://github.com/eazar001/pl_omdb/archive/v0.1.3.zip |
0.1.4 | 4fc683b1f1a6272434c64c7050cbc23781608b80 | 6 | https://github.com/eazar001/pl_omdb/archive/v0.1.4.zip |
0.2.0 | 29aa2d85743c3015b4804c6b2e670bcdc15af2c1 | 5 | https://github.com/eazar001/pl_omdb/archive/v0.2.0.zip |
0.2.1 | 5c20e9765859ffdb655718dd70afee85c47fdeb4 | 2 | https://github.com/eazar001/pl_omdb/archive/v0.2.1.zip |
0.3.0 | d3a0291d912bf9630cc2fd262b5359bb00b0b6af | 1 | https://github.com/eazar001/pl_omdb/archive/v0.3.0.zip |
0.4.0 | f9a917c793c99764a3e220b71a7f58e5b368511d | 3 | https://github.com/eazar001/pl_omdb/archive/v0.4.0.zip |
0.5.0 | bc5ef97af45431a45826e1cf53b65baae626e414 | 19 | https://github.com/eazar001/pl_omdb/archive/v0.5.0.zip |
This is A SWI-Prolog interface to the OMDB (Open Movie Database) API http://www.omdbapi.com
% Loading pl_omdb will create a special API key flag to store the API key to be referenced later ?- use_module(library(pl_omdb)). % The user can store the API key in the special flag for access at runtime now ?- set_prolog_flag(omdb_api_key, 'my_unique_key') % This will fetch the release date for Casino Royale, year 2006. ?- omdb_fetch('Released'=Value, [title='Casino Royale',year='2006']). % This will fetch the object that corresponds to Casino Royale, 2006, with all the keys % and respective values ... including results specific to Rotten Tomatoes. ?- omdb_fetch(Key=Value, [title='Casino Royale',year='2006',tomatoes='true']). % Return list of search results along with number of results. ?- omdb_search(Key=Value, [title='The Matrix']). % Iterate through all the search results while also unifying with the number of results found. ?- omdb_search_results(Key=Value, [title='The Matrix'], NumResults). % Fetch the dictionary object for all titles matching "The Matrix". ?- omdb_fetch_dict(Dict, [title='The Matrix']). % Fetch the dictionary object for search results pertaining to the title "The Matrix". ?- omdb_search_dict(Dict, [title='The Matrix']).
Alternatively, one may specify the API key in the above examples as a first argument, if they wish to bypass the flag mechanism and/or use multiple keys in one application.
The Options list is a list of valid parameters to pass to the OMDB API. All parameters are essentially key values that are of the type atom (described below). All of these keys correspond to a value (all represented as string types).
Here are some valid options for fetches/retrievals:
Pack contains 7 files holding a total of 12.9K bytes.