Skip to main content

DeviceServer API

Project description

DeviceServer

DeviceServer API

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.3
  • Package version: 1.0.3
  • Build package: org.openapitools.codegen.languages.PythonLegacyClientCodegen

Requirements.

Python 3.4+

Installation & Usage

pip install

pip install Icotest-DeviceServer

Then import the package:

import DeviceServer

Getting Started

Please follow the installation procedure and then run the following:

import time
import DeviceServer
from DeviceServer.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost/DeviceServer
# See configuration.py for a list of all supported configuration parameters.
configuration = DeviceServer.Configuration(
    host = "http://localhost/DeviceServer"
)

# Enter a context with an instance of the API client
with DeviceServer.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = DeviceServer.DevicesApi(api_client)
    device_id = "dedfeda9-1bf0-44c2-ac94-69370afb0c3f"  # str: UUID of device

    try:
        # GET all ports for device
        api_response = api_instance.get_device_device_id_ports(device_id)
        pprint(api_response)
    except ApiException as e:
        print(
            "Exception when calling DevicesApi->get_device_device_id_ports: "
            "%s\n" % e
        )

Documentation for API Endpoints

All URIs are relative to http://localhost/DeviceServer

Class Method HTTP request Description
DevicesApi get_device_device_id_ports GET /Devices/{device_id}/Ports GET all ports for device
DevicesApi get_device_id_port_index GET /Devices/{device_id}/Ports/{port_index} GET status of port
DevicesApi get_devices GET /Devices GET list of devices
DevicesApi get_devices_button GET /Devices/{device_id}/Button GET state of button
DevicesApi get_devices_index GET /Devices/{device_id} GET single device
DevicesApi get_devices_led GET /Devices/{device_id}/Leds/{led_index} GET state of LED
DevicesApi get_devices_temperature GET /Devices/{device_id}/Temperature Your GET endpoint
DevicesApi get_host_config GET /Host/Config Your GET endpoint
DevicesApi get_port GET /Port/{port_id} GET status of port by id
DevicesApi get_port_states GET /PortStates/{port_id} Your GET endpoint
DevicesApi get_ports GET /Ports GET status of all ports
DevicesApi get_relay_state GET /Devices/{device_id}/Relay Your GET endpoint
DevicesApi get_temperature_range GET /Devices/{device_id}/Temperature/Range Your GET endpoint
DevicesApi get_temperature_thresholds GET /Devices/{device_id}/Temperature/Thresholds Your GET endpoint
DevicesApi put_device_device_id_description PUT /Device/{device_id}/Description
DevicesApi put_device_device_id_name PUT /Device/{device_id}/Name
DevicesApi put_device_id_label PUT /Device/{device_id}/Port/{port_index}/Label
DevicesApi put_devices_led_index PUT /Devices/{device_id}/Leds/{led_index} PUT state of LED
DevicesApi put_devices_ports PUT /Devices/{device_id}/Ports/{port_index} PUT state of port
DevicesApi put_devices_ports_pulse PUT /Devices/{device_id}/Ports/{port_index}/Pulse PUT port into state for period of time
DevicesApi put_host_config PUT /Host/Config
DevicesApi put_port_port_id_label PUT /Port/{port_id}/Label
DevicesApi put_port_states_port_id PUT /PortStates/{port_id}
DevicesApi put_ports_pulse PUT /Ports/{port_index}/Pulse PUT port into state for period of time
DevicesApi put_relay_state PUT /Devices/{device_id}/Relay
DevicesApi put_socket_refresh PUT /Devices/{device_id}/Socket/Refresh
DevicesApi put_state_by_port_id PUT /Port/{port_id} PUT state of port

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author

david@3adesign.co.uk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Icotest-DeviceServer-1.0.3.tar.gz (33.4 kB view hashes)

Uploaded Source

Built Distribution

Icotest_DeviceServer-1.0.3-py3-none-any.whl (44.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page