t_omdb 1.0.2 copy "t_omdb: ^1.0.2" to clipboard
t_omdb: ^1.0.2 copied to clipboard

A simple convenience library for interacting with the OMDb API.

example/t_omdb_example.dart

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);
}
1
likes
140
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A simple convenience library for interacting with the OMDb API.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

http

More

Packages that depend on t_omdb