Sonarr::Client
Constructors
Class methods
Global default connect timeout applied to clients constructed without an
explicit connect_timeout (or with an explicit nil). Time to wait for a
connection to be established before giving up; tunable globally.
Global default connect timeout applied to clients constructed without an
explicit connect_timeout (or with an explicit nil). Time to wait for a
connection to be established before giving up; tunable globally.
Global default read timeout applied to clients constructed without an
explicit read_timeout (or with an explicit nil). Time to wait for the
server to send response data before giving up; tunable globally.
Global default read timeout applied to clients constructed without an
explicit read_timeout (or with an explicit nil). Time to wait for the
server to send response data before giving up; tunable globally.
Parses body into an Array(type); returns [] of T for empty/204 bodies.
Parses body into a single type; returns nil for empty/204 bodies.
Normalizes a request body into a JSON string (or nil for no body).
Normalizes a request body into a JSON string (or nil for no body).
Instance methods
Issues method against path (relative to the configured endpoint) and
returns the raw Crest::Response.
query— an optionalSonarr::Queryof paging params / filters.body— an optional request body: aString, or any object that responds to#to_json(a model orArrayof models). When present theContent-Type: application/jsonheader is added.
The apikey query param and X-Api-Key header are always attached.
Non-2xx responses raise Sonarr::ApiError (wrapping crest's failure).
resp = client.request(:get, "api/v3/series", Sonarr::Query.paging(page: 1))
series = Array(Sonarr::Model::SeriesResource).from_json(resp.body)
Requests and deserializes a JSON array of type (empty for empty bodies).
Requests and deserializes a single object of type (nil for empty bodies).