fytotron.FytotronApi
All URIs are relative to https://localhost:44339/fyo/rest
| Method | HTTP request | Description |
|---|---|---|
| getvar | GET /getvar | Returns the current value of the variable |
| info | GET /info | Returns all setpoints and actual values in the database. |
| monitor | GET /monitor | Returns the current status of the fytotron |
| setvar | POST /setvar | Set the setpoint value |
getvar
float getvar(name)
Returns the current value of the variable
Example
- Api Key Authentication (ApiKeyAuth):
import fytotron
from fytotron.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://localhost:44339/fyo/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = fytotron.Configuration(
host = "https://localhost:44339/fyo/rest"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with fytotron.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = fytotron.FytotronApi(api_client)
name = 'name_example' # str | variable name
try:
# Returns the current value of the variable
api_response = api_instance.getvar(name)
print("The response of FytotronApi->getvar:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FytotronApi->getvar: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | variable name |
Return type
float
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
info
List[InfoValues] info()
Returns all setpoints and actual values in the database.
Example
- Api Key Authentication (ApiKeyAuth):
import fytotron
from fytotron.models.info_values import InfoValues
from fytotron.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://localhost:44339/fyo/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = fytotron.Configuration(
host = "https://localhost:44339/fyo/rest"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with fytotron.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = fytotron.FytotronApi(api_client)
try:
# Returns all setpoints and actual values in the database.
api_response = api_instance.info()
print("The response of FytotronApi->info:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FytotronApi->info: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
monitor
List[MonitorValues] monitor()
Returns the current status of the fytotron
Example
- Api Key Authentication (ApiKeyAuth):
import fytotron
from fytotron.models.monitor_values import MonitorValues
from fytotron.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://localhost:44339/fyo/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = fytotron.Configuration(
host = "https://localhost:44339/fyo/rest"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with fytotron.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = fytotron.FytotronApi(api_client)
try:
# Returns the current status of the fytotron
api_response = api_instance.monitor()
print("The response of FytotronApi->monitor:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FytotronApi->monitor: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setvar
setvar(name, value)
Set the setpoint value
Example
- Api Key Authentication (ApiKeyAuth):
import fytotron
from fytotron.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://localhost:44339/fyo/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = fytotron.Configuration(
host = "https://localhost:44339/fyo/rest"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with fytotron.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = fytotron.FytotronApi(api_client)
name = 'name_example' # str | variable name
value = 3.4 # float | value to se the variable to
try:
# Set the setpoint value
api_instance.setvar(name, value)
except Exception as e:
print("Exception when calling FytotronApi->setvar: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | variable name | |
| value | float | value to se the variable to |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]