tautulli 2.0.0+1 copy "tautulli: ^2.0.0+1" to clipboard
tautulli: ^2.0.0+1 copied to clipboard

Facilitate the communication to and from Tautulli's API, a Python based monitoring and tracking tool for Plex Media Server.

tautulli #

Pubdev License

Dart library package to facilitate the connection to and from Tautulli's API, a Python based monitoring and tracking tool for Plex Media Server.

Getting Started #

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

Tautulli tautulli = Tautulli(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 Tautulli. 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 Tautulli instance.

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

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

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

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

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

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

Commands #

All commands have been split into categories, each with their own respective handler, and can be accessed via an initialized Tautulli object.

Any command handler can be initialized directly, but will require you to create your own Dio HTTP client. You will still need to ensure you set the BaseOptions as specified above.

Activity #

All commands that are activity related. All commands in this category can be accessed via:

  • A TautulliCommandHandler_Activity instance.
  • activity within an initialized Tautulli object.
API Command Method
delete_temp_sessions deleteTempSessions()
get_activity getActivity()
terminate_session terminateSession()

History #

All commands that are history related. All commands in this category can be accessed via:

  • A TautulliCommandHandler_History instance.
  • history within an initialized Tautulli object.
API Command Method
delete_history deleteHistory()
get_history getHistory()
get_home_stats getHomeStats()
get_plays_by_date getPlaysByDate()
get_plays_by_dayofweek getPlaysByDayOfWeek()
get_plays_by_hourofday getPlaysByHourOfDay()
get_plays_by_source_resolution getPlaysBySourceResolution()
get_plays_by_stream_resolution getPlaysByStreamResolution()
get_plays_by_stream_type getPlaysByStreamType()
get_plays_by_top_10_platforms getPlaysByTopTenPlatforms()
get_plays_by_top_10_users getPlaysByTopTenUsers()
get_plays_per_month getPlaysPerMonth()
get_stream_data getStreamData()
get_stream_type_by_top_10_platforms getStreamTypeByTopTenPlatforms()
get_stream_type_by_top_10_users getStreamTypeByTopTenUsers()

Libraries #

All commands that are library related. All commands in this category can be accessed via:

  • A TautulliCommandHandler_Libraries instance.
  • libraries within an initialized Tautulli object.
API Command Method
delete_all_library_history deleteAllLibraryHistory()
delete_library deleteLibrary()
delete_recently_added deleteRecentlyAdded()
edit_library editLibrary()
get_libraries getLibraries()
get_libraries_table getLibrariesTable()
get_library getLibrary()
get_library_media_info getLibraryMediaInfo()
get_library_names getLibraryNames()
get_library_user_stats getLibraryUserStats()
get_library_watch_time_stats getLibraryWatchTimeStats()
get_metadata getMetadata()
get_new_rating_keys getNewRatingKeys()
get_old_rating_keys getOldRatingKeys()
get_recently_added getRecentlyAdded()
get_synced_items getSyncedItems()
refresh_libraries_list refreshLibrariesList()
search search()
undelete_library undeleteLibrary()
update_metadata_details updateMetadataDetails()

Miscellaneous #

All commands that couldn't be sorted into the other categories. All commands in this category can be accessed via:

  • A TautulliCommandHandler_Miscellaneous instance.
  • miscellaneous within an initialized Tautulli object.
API Command Method
arnold arnold()
docs docs()
docs_md docsMd()
download_config downloadConfig()
download_database downloadDatabase()
download_log downloadLog()
download_plex_log downloadPlexLog()
get_date_formats getDateFormats()
get_geoip_lookup getGeoIPLookup()
get_logs getLogs()
get_plex_log getPlexLog()
get_server_friendly_name getServerFriendlyName()
get_server_id getServerID()
get_server_identity getServerIdentity()
get_server_list getServerList()
get_server_pref getServerPref()
get_servers_info getServersInfo()
get_whois_lookup getWHOISLookup()
pms_image_proxy pmsImageProxy()
sql sql()

Notifications #

All commands that are notification (newsletter/notifier) related. All commands in this category can be accessed via:

  • A TautulliCommandHandler_Notifications instance.
  • notifications within an initialized Tautulli object.
API Command Method
add_newsletter_config addNewsletterConfig()
add_notifier_config addNotifierConfig()
delete_mobile_device deleteMobileDevive()
delete_newsletter deleteNewsletter()
delete_notifier deleteNotifier()
get_newsletter_config getNewsletterConfig()
get_newsletter_log getNewsletterLog()
get_newsletters getNewsletters()
get_notification_log getNotificationLog()
get_notifier_config getNotifierConfig()
get_notifier_parameters getNotifierParameters()
get_notifiers getNotifiers()
notify notify()
notify_newsletter notifyNewsletter()
notify_recently_added notifyRecentlyAdded()
register_device registerDevice()
set_mobile_device_config setMobileDeviceConfig()
set_newsletter_config setNewsletterConfig()
set_notifier_config setNotifierConfig()

System #

All commands that are system related. All commands in this category can be accessed via:

  • A TautulliCommandHandler_System instance.
  • system within an initialized Tautulli object.
API Command Method
backup_config backupConfig()
backup_db backupDB()
delete_cache deleteCache()
delete_hosted_images deleteHostedImages()
delete_image_cache deleteImageCache()
delete_login_log deleteLoginLog()
delete_lookup_info deleteLookupInfo()
delete_media_info_cache deleteMediaInfoCache()
delete_newsletter_log deleteNewsletterLog()
delete_notification_log deleteNotificationLog()
get_pms_token getPMSToken()
get_pms_update getPMSUpdate()
get_settings getSettings()
restart restart()
status status()
update update()
update_check updateCheck()

Users #

All commands that are user related. All commands in this category can be accessed via:

  • A TautulliCommandHandler_Users instance.
  • users within an initialized Tautulli object.
API Command Method
delete_all_user_history deleteAllUserHistory()
delete_user deleteUser()
edit_user editUser()
get_user getUser()
get_user_ips getUserIPs()
get_user_logins getUserLogins()
get_user_names getUserNames()
get_user_player_stats getUserPlayerStats()
get_user_watch_time_stats getUserWatchTimeStats()
get_users getUsers()
get_users_table getUsersTable()
refresh_users_list refreshUsersList()
undelete_user undeleteUser()

Not Implemented #

All commands that have not been implemented by this package.

API Command Reason
get_apikey In order to use this package a user would need their API key, making it redundant.
import_database A function like importing a new database should be done through the web GUI to ensure no user errors occur.
1
likes
110
pub points
0%
popularity

Publisher

verified publishercomet.tools

Facilitate the communication to and from Tautulli's API, a Python based monitoring and tracking tool for Plex Media Server.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

GPL-3.0 (LICENSE)

Dependencies

dio, json_annotation

More

Packages that depend on tautulli