All URIs are relative to https://name.eliona.io/v2
Method | HTTP request | Description |
---|---|---|
GetNodeByIdent | Get /nodes/{node-ident} | Information about a node |
GetNodes | Get /nodes | Information about nodes |
PostNode | Post /nodes | Create a node |
PutNode | Put /nodes | Create or update a node |
PutNodeByIdent | Put /nodes/{node-ident} | Update a node |
Node GetNodeByIdent(ctx, nodeIdent).Execute()
Information about a node
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
nodeIdent := "4711" // string | The UUID identifier of the node
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodesAPI.GetNodeByIdent(context.Background(), nodeIdent).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodesAPI.GetNodeByIdent``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNodeByIdent`: Node
fmt.Fprintf(os.Stdout, "Response from `NodesAPI.GetNodeByIdent`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
nodeIdent | string | The UUID identifier of the node |
Other parameters are passed through a pointer to a apiGetNodeByIdentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Node GetNodes(ctx).Execute()
Information about nodes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodesAPI.GetNodes(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodesAPI.GetNodes``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetNodes`: []Node
fmt.Fprintf(os.Stdout, "Response from `NodesAPI.GetNodes`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetNodesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Node PostNode(ctx).Node(node).Execute()
Create a node
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
node := *openapiclient.NewNode() // Node |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodesAPI.PostNode(context.Background()).Node(node).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodesAPI.PostNode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostNode`: Node
fmt.Fprintf(os.Stdout, "Response from `NodesAPI.PostNode`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostNodeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
node | Node |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Node PutNode(ctx).Node(node).Execute()
Create or update a node
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
node := *openapiclient.NewNode() // Node |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodesAPI.PutNode(context.Background()).Node(node).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodesAPI.PutNode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutNode`: Node
fmt.Fprintf(os.Stdout, "Response from `NodesAPI.PutNode`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPutNodeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
node | Node |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Node PutNodeByIdent(ctx, nodeIdent).Node(node).Execute()
Update a node
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
nodeIdent := "4711" // string | The UUID identifier of the node
node := *openapiclient.NewNode() // Node |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NodesAPI.PutNodeByIdent(context.Background(), nodeIdent).Node(node).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NodesAPI.PutNodeByIdent``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutNodeByIdent`: Node
fmt.Fprintf(os.Stdout, "Response from `NodesAPI.PutNodeByIdent`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
nodeIdent | string | The UUID identifier of the node |
Other parameters are passed through a pointer to a apiPutNodeByIdentRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
node | Node | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]