Class: RoonApiImage

RoonApiImage(core)

new RoonApiImage(core)

Roon API Image Service
Parameters:
Name Type Description
core Core The Core providing the service
Source:

Methods

get_image(image_key, optionsopt, cb)

Roon API services provide image_key properties. This translates the image_key into an actual image. It is also possible to issue image requests directly using HTTP if that is more convenient: http://IP:PORT/api/image/image_key?scale=XXX&width=XXX&height=XXX&format=XXX The rules for parameter types and optional/required follow the same as for the options parameter.

Parameters:
Name Type Attributes Description
image_key string the key, as given by another api
options object <optional>
Properties
Name Type Attributes Description
scale 'fit' | 'fill' | 'stretch' <optional>
If this is not set, the image will be returned at original size. Warning: that could be very large!
width number <optional>
The image width to be returned. Required if the scale property is set
height number <optional>
The image height to be returned. Required if the scale property is set
format 'image/jpeg' | 'image/png' <optional>
If you don't specify, Roon will choose for you.
cb RoonApiImage~imageresultcallback Called on success or error
Source:

Type Definitions

imageresultcallback(error, content_type, image)

Parameters:
Name Type Description
error string | false an error code or false if no error
content_type string the MIME type of the image data
image Buffer the image data
Source: