4.2.2.3. Capture¶
-
class
wsapiwrapper.consumer.capture.
CaptureWrapper
(baseurl: str, tokenstr: str = None)[source]¶ Wraps capture endpoints of the Consumer API.
-
get
(capture_id: int) → dict[source]¶ Get one capture by its ID.
Makes a GET request to the Capture endpoint.
-
get_list
(serial: str, offset: int = 0, limit: int = None) → list[source]¶ Get a list of captures for a tag ordered newest first.
The list can be paginated so that each call returns ‘limit’ captures.
-
get_samples
(capture_id: int, offset: int = 0, limit: int = None) → list[source]¶ Get a list of samples from a capture.
Makes a GET request to the CaptureSamples endpoint.
The list can be paginated so that each call returns ‘limit’ samples at an ‘offset’ from the first.
-
post
(circbufb64: str, serial: str, statusb64: str, timeintb64: str, vfmtb64: str) → dict[source]¶ Create a new capture from parameters encoded by wscodec.
These data are included in URL parameters passed to wsfrontend when a tag is scanned.
Makes a POST request to the Capture endpoint, which unwraps the circular buffer and decodes samples.
- Parameters
circbufb64 (str) – Circular buffer containing base64 encoded samples. Ouptut by wscodec.
serial (str) – Base64 serial identifying the tag the capture has originated from.
statusb64 (str) – Base64 encoded status information (e.g. battery level). Output by wscodec.
timeintb64 (str) – Base64 encoded time interval between samples. Output by wscodec.
vfmtb64 (str) – Tag version string. See wscodec.
- Returns
Capture dictionary.
- Return type
-