All URIs are relative to https://name.eliona.io/v2
Method | HTTP request | Description |
---|---|---|
GetTagByName | Get /tags/{tag-name} | Information about a tag |
GetTags | Get /tags | Information about tags |
PutTag | Put /tags | Create or update a tag |
Tag GetTagByName(ctx, tagName).Execute()
Information about a tag
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
tagName := "Support" // string | The name of the tag
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagsAPI.GetTagByName(context.Background(), tagName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.GetTagByName``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTagByName`: Tag
fmt.Fprintf(os.Stdout, "Response from `TagsAPI.GetTagByName`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
tagName | string | The name of the tag |
Other parameters are passed through a pointer to a apiGetTagByNameRequest 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]
[]Tag GetTags(ctx).Execute()
Information about tags
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.TagsAPI.GetTags(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.GetTags``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTags`: []Tag
fmt.Fprintf(os.Stdout, "Response from `TagsAPI.GetTags`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetTagsRequest 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]
Tag PutTag(ctx).Tag(tag).Execute()
Create or update a tag
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)
func main() {
tag := *openapiclient.NewTag("Support") // Tag |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagsAPI.PutTag(context.Background()).Tag(tag).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagsAPI.PutTag``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutTag`: Tag
fmt.Fprintf(os.Stdout, "Response from `TagsAPI.PutTag`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPutTagRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
tag | Tag |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]