Skip to content

Commit 35d5732

Browse files
committed
Initial client version
1 parent 79b507e commit 35d5732

File tree

96 files changed

+4893
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+4893
-0
lines changed

Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[package]
2+
name = "spanapi"
3+
version = "4.1.7"
4+
authors = ["OpenAPI Generator team and contributors"]
5+
edition = "2018"
6+
7+
[dependencies]
8+
serde = "^1.0"
9+
serde_derive = "^1.0"
10+
serde_json = "^1.0"
11+
url = "^2.2"
12+
[dependencies.reqwest]
13+
version = "^0.11"
14+
default-features = false
15+
features = ["json", "multipart"]
16+
17+
[dev-dependencies]

README.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Rust API client for spanapi
2+
3+
API for device, collection, output and firmware management
4+
5+
## Overview
6+
7+
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client.
8+
9+
- API version: 4.1.7 prized-adelbert
10+
- Package version: 4.1.7
11+
- Build package: org.openapitools.codegen.languages.RustClientCodegen
12+
For more information, please visit [https://lab5e.com/span](https://lab5e.com/span)
13+
14+
## Installation
15+
16+
Put the package under your project folder and add the following to `Cargo.toml` under `[dependencies]`:
17+
18+
```
19+
openapi = { path = "./generated" }
20+
```
21+
22+
## Documentation for API Endpoints
23+
24+
All URIs are relative to *https://api.lab5e.com/span*
25+
26+
Class | Method | HTTP request | Description
27+
------------ | ------------- | ------------- | -------------
28+
*CollectionsApi* | [**broadcast_message**](docs/CollectionsApi.md#broadcast_message) | **post** /collections/{collectionId}/to | Broadcast message
29+
*CollectionsApi* | [**create_collection**](docs/CollectionsApi.md#create_collection) | **post** /collections | Create collection
30+
*CollectionsApi* | [**delete_collection**](docs/CollectionsApi.md#delete_collection) | **delete** /collections/{collectionId} | Delete collection
31+
*CollectionsApi* | [**list_collection_data**](docs/CollectionsApi.md#list_collection_data) | **get** /collections/{collectionId}/data | Get payloads
32+
*CollectionsApi* | [**list_collections**](docs/CollectionsApi.md#list_collections) | **get** /collections | List collections
33+
*CollectionsApi* | [**retrieve_collection**](docs/CollectionsApi.md#retrieve_collection) | **get** /collections/{collectionId} | Retrieve collection
34+
*CollectionsApi* | [**update_collection**](docs/CollectionsApi.md#update_collection) | **patch** /collections/{collectionId} | Update collection
35+
*DatadumpApi* | [**data_dump**](docs/DatadumpApi.md#data_dump) | **post** /datadump | Data dump
36+
*DevicesApi* | [**create_device**](docs/DevicesApi.md#create_device) | **post** /collections/{collectionId}/devices | Create device
37+
*DevicesApi* | [**delete_device**](docs/DevicesApi.md#delete_device) | **delete** /collections/{collectionId}/devices/{deviceId} | Remove device
38+
*DevicesApi* | [**list_device_data**](docs/DevicesApi.md#list_device_data) | **get** /collections/{collectionId}/devices/{deviceId}/data | Get payloads
39+
*DevicesApi* | [**list_devices**](docs/DevicesApi.md#list_devices) | **get** /collections/{collectionId}/devices | List devices
40+
*DevicesApi* | [**retrieve_device**](docs/DevicesApi.md#retrieve_device) | **get** /collections/{collectionId}/devices/{deviceId} | Retrieve device
41+
*DevicesApi* | [**send_message**](docs/DevicesApi.md#send_message) | **post** /collections/{collectionId}/devices/{deviceId}/to | Send message
42+
*DevicesApi* | [**update_device**](docs/DevicesApi.md#update_device) | **patch** /collections/{existingCollectionId}/devices/{deviceId} | Update device
43+
*FotaApi* | [**clear_firmware_error**](docs/FotaApi.md#clear_firmware_error) | **delete** /collections/{collectionId}/devices/{deviceId}/fwerror | Clear FOTA error
44+
*FotaApi* | [**create_firmware**](docs/FotaApi.md#create_firmware) | **post** /collections/{collectionId}/firmware | Create firmware
45+
*FotaApi* | [**delete_firmware**](docs/FotaApi.md#delete_firmware) | **delete** /collections/{collectionId}/firmware/{imageId} | Delete firmware
46+
*FotaApi* | [**firmware_usage**](docs/FotaApi.md#firmware_usage) | **patch** /collections/{collectionId}/firmware/{imageId}/usage | Firmware usage
47+
*FotaApi* | [**list_firmware**](docs/FotaApi.md#list_firmware) | **get** /collections/{collectionId}/firmware | List firmware
48+
*FotaApi* | [**retrieve_firmware**](docs/FotaApi.md#retrieve_firmware) | **get** /collections/{collectionId}/firmware/{imageId} | Retrieve firmware
49+
*FotaApi* | [**update_firmware**](docs/FotaApi.md#update_firmware) | **patch** /collections/{collectionId}/firmware/{imageId} | Update firmware
50+
*OutputsApi* | [**create_output**](docs/OutputsApi.md#create_output) | **post** /collections/{collectionId}/outputs | Create output
51+
*OutputsApi* | [**delete_output**](docs/OutputsApi.md#delete_output) | **delete** /collections/{collectionId}/outputs/{outputId} | Delete output
52+
*OutputsApi* | [**list_outputs**](docs/OutputsApi.md#list_outputs) | **get** /collections/{collectionId}/outputs | List outputs
53+
*OutputsApi* | [**logs**](docs/OutputsApi.md#logs) | **get** /collections/{collectionId}/outputs/{outputId}/logs | Output logs
54+
*OutputsApi* | [**retrieve_output**](docs/OutputsApi.md#retrieve_output) | **get** /collections/{collectionId}/outputs/{outputId} | Retrieve output
55+
*OutputsApi* | [**status**](docs/OutputsApi.md#status) | **get** /collections/{collectionId}/outputs/{outputId}/status | Output status
56+
*OutputsApi* | [**update_output**](docs/OutputsApi.md#update_output) | **patch** /collections/{collectionId}/outputs/{outputId} | Update output
57+
*SystemApi* | [**get_system_info**](docs/SystemApi.md#get_system_info) | **get** /system | System information
58+
59+
60+
## Documentation For Models
61+
62+
- [BroadcastMessageRequest](docs/BroadcastMessageRequest.md)
63+
- [ClearFirmwareErrorResponse](docs/ClearFirmwareErrorResponse.md)
64+
- [CoApMetadata](docs/CoApMetadata.md)
65+
- [Collection](docs/Collection.md)
66+
- [CollectionFirmware](docs/CollectionFirmware.md)
67+
- [CollectionFirmwareFirmwareManagement](docs/CollectionFirmwareFirmwareManagement.md)
68+
- [CreateFirmwareRequest](docs/CreateFirmwareRequest.md)
69+
- [DataDumpRequest](docs/DataDumpRequest.md)
70+
- [DataDumpResponse](docs/DataDumpResponse.md)
71+
- [Device](docs/Device.md)
72+
- [DumpedCollection](docs/DumpedCollection.md)
73+
- [DumpedDevice](docs/DumpedDevice.md)
74+
- [FieldMask](docs/FieldMask.md)
75+
- [Firmware](docs/Firmware.md)
76+
- [FirmwareMetadata](docs/FirmwareMetadata.md)
77+
- [FirmwareUsageResponse](docs/FirmwareUsageResponse.md)
78+
- [ListCollectionResponse](docs/ListCollectionResponse.md)
79+
- [ListDataResponse](docs/ListDataResponse.md)
80+
- [ListDevicesResponse](docs/ListDevicesResponse.md)
81+
- [ListFirmwareResponse](docs/ListFirmwareResponse.md)
82+
- [ListOutputResponse](docs/ListOutputResponse.md)
83+
- [MessageSendResult](docs/MessageSendResult.md)
84+
- [MultiSendMessageResponse](docs/MultiSendMessageResponse.md)
85+
- [NetworkMetadata](docs/NetworkMetadata.md)
86+
- [Output](docs/Output.md)
87+
- [OutputConfig](docs/OutputConfig.md)
88+
- [OutputDataMessage](docs/OutputDataMessage.md)
89+
- [OutputDataMessageOutputMessageType](docs/OutputDataMessageOutputMessageType.md)
90+
- [OutputLogEntry](docs/OutputLogEntry.md)
91+
- [OutputLogResponse](docs/OutputLogResponse.md)
92+
- [OutputStatusResponse](docs/OutputStatusResponse.md)
93+
- [OutputType](docs/OutputType.md)
94+
- [ProtobufAny](docs/ProtobufAny.md)
95+
- [RpcStatus](docs/RpcStatus.md)
96+
- [SendMessageRequest](docs/SendMessageRequest.md)
97+
- [SendMessageResponse](docs/SendMessageResponse.md)
98+
- [SystemInfoResponse](docs/SystemInfoResponse.md)
99+
- [UdpMetadata](docs/UdpMetadata.md)
100+
- [UpdateDeviceRequest](docs/UpdateDeviceRequest.md)
101+
102+
103+
To get access to the crate's generated documentation, use:
104+
105+
```
106+
cargo doc --open
107+
```
108+
109+
## Author
110+
111+
112+

docs/BroadcastMessageRequest.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# BroadcastMessageRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**collection_id** | Option<**String**> | | [optional]
8+
**port** | Option<**i32**> | | [optional]
9+
**payload** | Option<**String**> | | [optional]
10+
**transport** | Option<**String**> | Valid transports are \"udp\", \"coap\", \"coap-pull\", \"udp-pull\", \"coap-push\", \"udp-push\". \"udp\" is equivalent to \"udp-push\" and \"coap\" is equivalent to \"coap-push\". Push messages are sent unsolicited to the device wheil pull messages are sent whenever the device wither sends data upstream (for UDP) or does a CoAP request to the CoAP service in span. | [optional]
11+
**coap_path** | Option<**String**> | | [optional]
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
15+

docs/ClearFirmwareErrorResponse.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ClearFirmwareErrorResponse
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**result** | Option<**String**> | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/CoApMetadata.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# CoApMetadata
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**code** | Option<**String**> | | [optional]
8+
**path** | Option<**String**> | | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

docs/Collection.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Collection
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**collection_id** | Option<**String**> | The ID of the collection. This is assigned by the backend. | [optional]
8+
**team_id** | Option<**String**> | The team ID that owns the collection. This field is required. When you create new collections the default is to use your private team ID. | [optional]
9+
**field_mask** | Option<[**crate::models::FieldMask**](FieldMask.md)> | | [optional]
10+
**firmware** | Option<[**crate::models::CollectionFirmware**](CollectionFirmware.md)> | | [optional]
11+
**tags** | Option<**::std::collections::HashMap<String, String>**> | Tags for the collection. Tags are metadata fields that you can assign to the collection. | [optional]
12+
13+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
14+
15+

docs/CollectionFirmware.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CollectionFirmware
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**current_firmware_id** | Option<**String**> | The current firmware is the firmware that the devices are currently using. | [optional]
8+
**target_firmware_id** | Option<**String**> | The target firmware is set to the desired firmware image for the devices in this collection. If the management is set to \"device\" this will only be used if the target firmware isn't set on the device itself. | [optional]
9+
**management** | Option<[**crate::models::CollectionFirmwareFirmwareManagement**](CollectionFirmwareFirmwareManagement.md)> | | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# CollectionFirmwareFirmwareManagement
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

0 commit comments

Comments
 (0)