Coder Social home page Coder Social logo

t-omdb's Introduction

Unofficial Dart library for interacting with OMDb API

For questions or help ask here. File issues here and see pub.dev page here.

Todo list

  • Posters API
  • Tests

Getting started

Add dependency

$ dart pub add t_omdb

or add it manually to your pubspec.yaml file:

dependencies:
  t_omdb: ^replace-with-latest-version

Example usage:

import 'package:t_omdb/t_omdb.dart';

void main() async {
  final omdb = OmdbApi('your-api-key');

  // Search for "guardians of the galaxy" by it's imdb id
  final String? byId = await omdb.searchById('tt3896198');

  // Search specifically for "guardians of the galaxy" by title (returns the first result)
  final String? byTitle = await omdb.searchByTitle('guardians of the galaxy');

  // Search for "guardians of the galaxy" by query (returns multiple results that match the query)
  final String? byQuery = await omdb.searchByQuery('guardians of the galaxy', type: OmdbType.movie, year: '2017', responseType: OmdbResponseType.json);

  print(byId);
  print(byTitle);
  print(byQuery);
}

Parameters

By ID or Title

Please note either i or t is required

Parameter Required Valid options Description
i Optional* A valid IMDb ID (e.g. tt1285016)
t Optional* Movie title to search for.
type No movie, series, episode Type of result to return.
y No Year of release.
plot No short, full Return short or full plot.
r No json, xml The data type to return.

By Search

Parameter Required Valid options Default Value Description
s Yes Movie title to search for.
type No movie, series, episode Type of result to return.
y No Year of release.
r No json, xml json The data type to return.
page No 1 - 100 1 Page number to return.

t-omdb's People

Contributors

vg9wb2dyyxboesbeawdpdgfs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.