libSDRForge
Loading...
Searching...
No Matches
sdrforge.protocols.rest.radio_api.RadioApi Class Reference

Pure request dispatcher; no HTTP server or SDR device dependencies. More...

Public Member Functions

None __init__ (self, RadioCatalogIf catalog, PresetService presets, *, tuple[RadioPreset,...] factory_presets=())
 Bind radio catalog and preset services.
tuple[int, dict[str, Any]] dispatch (self, str method, str target, dict[str, Any]|None body=None)
 Dispatch a radio catalog or preset request.

Public Attributes

 catalog = catalog
 presets = presets
 factory_presets = factory_presets

Detailed Description

Pure request dispatcher; no HTTP server or SDR device dependencies.

Constructor & Destructor Documentation

◆ __init__()

None sdrforge.protocols.rest.radio_api.RadioApi.__init__ ( self,
RadioCatalogIf catalog,
PresetService presets,
* ,
tuple[RadioPreset, ...] factory_presets = () )

Bind radio catalog and preset services.

Parameters
selfThe current instance.
catalogCanonical radio catalog.
presetsUser preset service.
factory_presetsImmutable factory presets.

Member Function Documentation

◆ dispatch()

tuple[int, dict[str, Any]] sdrforge.protocols.rest.radio_api.RadioApi.dispatch ( self,
str method,
str target,
dict[str, Any] | None body = None )

Dispatch a radio catalog or preset request.

Parameters
selfThe current instance.
methodHTTP request method.
targetRequest path and optional query string.
bodyOptional decoded JSON request body.
Returns
HTTP status and response payload.

Member Data Documentation

◆ catalog

sdrforge.protocols.rest.radio_api.RadioApi.catalog = catalog

◆ factory_presets

sdrforge.protocols.rest.radio_api.RadioApi.factory_presets = factory_presets

◆ presets

sdrforge.protocols.rest.radio_api.RadioApi.presets = presets

The documentation for this class was generated from the following file: