sonarr_api 0.0.1-pre.6 copy "sonarr_api: ^0.0.1-pre.6" to clipboard
sonarr_api: ^0.0.1-pre.6 copied to clipboard

discontinued
outdated

Dart abstraction for Sonarr's public API (https://sonarr.tv)

Sonarr API #

Pubdev License

Dart library package providing an abstraction for Sonarr'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.

Endpoints Requiring Implementation #

  • Blocklist
  • Calendar
  • Command
  • CustomFilter
  • Cutoff
  • DownloadClient
  • EpisodeFile
  • Health
  • History
  • ImportList
  • ImportListExclusion
  • Language
  • LanguageProfile
  • LanguageProfileSchema
  • ManualImport
  • Metadata
  • Missing
  • Notification
  • Parse
  • QualityDefinition
  • QualityProfile
  • QualityProfileSchema
  • Queue
  • QueueAction
  • QueueDetails
  • QueueStatus
  • Release
  • ReleasePush
  • SeasonPass
  • SeriesEditor
  • SeriesImport
  • SeriesLookup

Preparing Sonarr #

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

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

Please note that in order to access Sonarr from another machine on the network you must ensure that both the Sonarr 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:sonarr_api/sonarr_api.dart';

Now you can instantiate an instance of SonarrConfig that is used to instantiate an instance of SonarrAPI:

final config = SonarrConfig(
  host: '192.168.1.100:7878',
  apiKey: 'asdf123',
);
final api = SonarrAPI(config);

And you are ready to make API calls!

final series = await api.getSeries(); // Get the current catalogue of series
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
0
points
11
downloads

Publisher

verified publishercomet.tools

Weekly Downloads

Dart abstraction for Sonarr's public API (https://sonarr.tv)

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, freezed_annotation, json_annotation, retrofit

More

Packages that depend on sonarr_api