radarr_api 1.2.11 copy "radarr_api: ^1.2.11" to clipboard
radarr_api: ^1.2.11 copied to clipboard

Dart abstraction for Radarr's public API (https://radarr.video)

Radarr API #

Dart library package providing an abstraction for Radarr's public API.

This package is intended to supply a 1:1 mapping of the public API documentation and does not make assumptions on orchestration to execute different workflows.

Preparing Radarr #

To connect to your instance of Radarr, you will need:

  1. The host IPv4 address of the machine running Radarr
  2. The API key of the Radarr instance (which can be found in the web GUI under Settings → General)

Please note that in order to access Radarr from another machine on the network you must ensure that both the Radarr executable and the running port are allowed in any running firewalls on the host machine.

Connecting to the API #

All classes, models, and types are exported in the main package file:

import 'package:radarr_api/radarr_api.dart';

Now you can instantiate an instance of RadarrConfig that is used to instantiate an instance of RadarrAPI:

final config = RadarrConfig(
  host: '192.168.1.100:7878',
  apiKey: 'asdf123',
);
final api = RadarrAPI(config);

You can optionally pass in a Dio BaseOptions instance to the configuration to customize the HTTP client. Note that the baseUrl property will be overwritten with the given host property in the configuration.

And you are ready to make API calls!

final movies = await api.getMovies(); // Get the current catalogue of movies
final queue = await api.getQueue();   // Get items in the queue
...

Additional Notes #

  1. All available API methods can be viewed in the generated Dart documentation
  2. All models are immutable freezed-generated classes that can be modified using the <model>.copyWith(...) method
  3. All models are JSON serializable using the <model>.toJson() method
2
likes
120
points
84
downloads

Publisher

verified publishercomet.tools

Weekly Downloads

Dart abstraction for Radarr's public API (https://radarr.video)

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

dio, freezed_annotation, json_annotation, retrofit

More

Packages that depend on radarr_api