Skip to content

2.0.0: Refactored FSAPI

Compare
Choose a tag to compare
@MatrixEditor MatrixEditor released this 10 Dec 15:13
· 8 commits to master since this release

This major update release candidate introduces a new FSAPI core system, enabling user-friendly integration. With the use of an API wrapper, interacting with FS devices is now simplified. For instance,

from fsapi.net import FSDevice, wrap

device = FSDevice("127.0.0.1")
api = wrap(device)

# Query, list and set nodes' values
version = api.version
api.friendly_name = "FooBar"
for eq_band in api.ls_eq_bands(_pos=1, max_items=10):
    ...

In addition, the CLI to control FS devices has been changed:

$ fsapi-ctl --help
usage: fsapi-ctl [-h] [-C] [-X] [-F] [--raw] {view,get,list,set,get-notifies,update,scan} ...

options:
  -h, --help            show this help message and exit
  -C, --disable-color   Disables colorized output
  -X, --simulate        Simulates the request and prints the used URL.
  -F, --force-session   Creates a new session before running the command.
  --raw                 Prints XML output instead of pretty print.

subcommands:
  Commands of this tool.

  {view,get,list,set,get-notifies,update,scan}
    view                Views properties of a node class
    get                 Fetches the value for the given nodes.
    list                Fetches values from a list node
    set                 Tries to apply a new value to a given node.
    get-notifies        Queries all notifies of the target device
    update              Firmware update related context.
    scan                Scans for known nodes on a device.

For a complete overview of available commands, please refer to the documentation.

What's Changed

Full Changelog: v0.3.4...v2.0.0