sonarr 0.0.1-pre.14 copy "sonarr: ^0.0.1-pre.14" to clipboard
sonarr: ^0.0.1-pre.14 copied to clipboard

discontinued
outdated

Facilitate the communication to and from Sonarr's API, a smart PVR for newsgroup and bittorrent users.

sonarr (prerelease) #

Pubdev License

Dart library package to facilitate the connection to and from Sonarr's API, a smart PVR for newsgroup and bittorrent users.

Getting Started #

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

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

Once initialized, you can access any of the command handlers (detailed below) to quickly and easily make calls to Sonarr. 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 Sonarr instance.

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

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

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

strictTLS | Boolean (default: true) #

Allows you to disable strict TLS validation. Strict TLS validation ensures that the SSL certificate on the host machine is valid by checking it against your device's certificate authorities (CAs). Disabling this feature will allow for successful connections to machines with self-signed SSL certificates, but should be left enabled when possible.

Sonarr(
    host: '<your instance URL>',
    apiKey: '<your API key>',
    strictTLS: false, // Disables strict TLS
);

followRedirects | Boolean (default: true) #

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

Sonarr(
    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.

Sonarr(
    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 Sonarr instance from it using the factory constructor:

Dio dio = Dio(
    BaseOptions(
        baseUrl: '<your instance URL>',
        queryParameters: {
            'apikey': '<your API key>',
        },
    ),
);
Sonarr sonarr = Sonarr.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.

1
likes
0
pub points
0%
popularity

Publisher

verified publishercomet.tools

Facilitate the communication to and from Sonarr's API, a smart PVR for newsgroup and bittorrent users.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

dio, json_annotation, meta

More

Packages that depend on sonarr