radarr

Pubdev License

Dart library package to facilitate the connection to and from Radarr's API.

Getting Started

In order to use this package, you need to have to fetch your API key from within Radarr. Please ensure you do not publicly reveal your API key, as it will give any user with access full control of your Radarr instance. To get started simply import the Radarr package, and initialize a connection to your instance:

Radarr radarr = Radarr(host: '<your instance URL>', apiKey: '<your API key>');

Once initialized, you can access any of the command handlers to quickly and easily make calls to Radarr. For most calls that return data, model definitions have been created. Typings have also been created for parameters that have a set, finite list of options.

Optional Parameters

There are a few optional parameters when initializing a Radarr instance.

headers | Map<dynamic, String> (default: null)

Allows you to add on any custom headers to each request.

Radarr(
    host: '<your instance URL>',
    apiKey: '<your API key>',
    headers: {
        'authorization': '<auth_token>',
    },
);

followRedirects | Boolean (default: true)

Allows you to define if the HTTP client should follow redirects.

Radarr(
    host: '<your instance URL>',
    apiKey: '<your API key>',
    followRedirects: false, // Disables following redirects
);

maxRedirects | Integer (default: 5)

Allows you to define the maximum amount of redirects the HTTP client should follow. If followRediects is set to false, then this parameter does nothing.

Radarr(
    host: '<your instance URL>',
    apiKey: '<your API key>',
    maxRedirects: 1, // Only follow 1 redirect at most
);

Custom Dio HTTP Client

This package uses dio to make all HTTP connections. The default constructor will create the HTTP client for you, or you can create your own Dio instance and create a Radarr instance from it using the factory constructor:

Dio dio = Dio(
    BaseOptions(
        baseUrl: '<your instance URL>',
        queryParameters: {
            'apikey': '<your API key>',
        },
    ),
);
Radarr radarr = Radarr.from(dio);

You must ensure you set the BaseOptions specified above, specifically baseUrl and queryParameters otherwise the instance will not be able to create a successful connection to your machine.

Libraries

radarr
Dart library package to facilitate the communication to and from Radarr's API: A movie collection manager for Usenet and BitTorrent users.
commands
Library containing all logic and accessors to make calls to Radarr's API.
models
Library containing all model definitions for Radarr data.
types
Library containing all type definitions for Radarr data.
utilities
Library containing all utility functions for Radarr data.