For questions or help ask here. File issues here and see pub.dev page here.
- Posters API
- Tests
$ dart pub add t_omdb
or add it manually to your pubspec.yaml
file:
dependencies:
t_omdb: ^replace-with-latest-version
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);
}
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. |
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. |