Files
plexruby/docs/sdks/updater/README.md

5.4 KiB
Raw Blame History

Updater

Overview

This describes the API for searching and applying updates to the Plex Media Server. Updates to the status can be observed via the Event API.

Available Operations

get_update_status

Querying status of updates

Example Usage

require 'plexruby'


s = ::OpenApiSDK::PlexAPI.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    access_token: "<YOUR_API_KEY_HERE>",
  )
)

    
res = s.updater.get_update_status()

if ! res.two_hundred_application_json_object.nil?
  # handle response
end

Response

T.nilable(::OpenApiSDK::Operations::GetUpdateStatusResponse)

check_for_updates

Checking for updates

Example Usage

require 'plexruby'


s = ::OpenApiSDK::PlexAPI.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    access_token: "<YOUR_API_KEY_HERE>",
  )
)

    
res = s.updater.check_for_updates(download=::OpenApiSDK::Operations::Download::ONE)

if res.status_code == 200
  # handle response
end

Parameters

Parameter Type Required Description
download ::OpenApiSDK::Operations::Download Indicate that you want to start download any updates found.

Response

T.nilable(::OpenApiSDK::Operations::CheckForUpdatesResponse)

apply_updates

Note that these two parameters are effectively mutually exclusive. The tonight parameter takes precedence and skip will be ignored if tonight is also passed

Example Usage

require 'plexruby'


s = ::OpenApiSDK::PlexAPI.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    access_token: "<YOUR_API_KEY_HERE>",
  )
)

    
res = s.updater.apply_updates(tonight=::OpenApiSDK::Operations::Tonight::ONE, skip=::OpenApiSDK::Operations::Skip::ZERO)

if res.status_code == 200
  # handle response
end

Parameters

Parameter Type Required Description
tonight ::OpenApiSDK::Operations::Tonight Indicate that you want the update to run during the next Butler execution. Omitting this or setting it to false indicates that the update should install
skip ::OpenApiSDK::Operations::Skip Indicate that the latest version should be marked as skipped. The entry for this version will have the state set to skipped.

Response

T.nilable(::OpenApiSDK::Operations::ApplyUpdatesResponse)