Haxe client implementation of the OMDB API.
Currently, only the free public API is supported. If you're interested in the user-level API please make a PR.
Installation
The library is available on Haxelib.
haxelib install omdb
Usage
All the methods return tink_core Promise.
var client: OmdbClient = new OmdbClient('api key');
client.getById('tt0848228').map(r -> r.sure()).handle(movie ->
{
// movie.title, movie.year ...
});
client.getByTitle('avengers').map(r -> r.sure()).handle(movie ->
{
// movie.title: The Avengers
// movie.year: 2012
});
client.getByTitle('avengers', 2019).map(r -> r.sure()).handle(movie ->
{
// movie.title: Avengers: Endgame
// movie.year: 2019
});
client.search('the avengers').map(r -> r.sure()).handle(movies ->
{
for (movie in movies)
{
// movie.title, movie.year ...
}
});
Versioning
This library will follow the M.m.p
versioning scheme, where:
M
: the major number will follow the OMDB API versionm
: the minor number will be incremented when forward-breaking changes are made to the library's interfacep
: the patch number will be incremented when non-breaking changes are made to the library's interface