Skip to content

Latest commit

 

History

History
208 lines (130 loc) · 4.7 KB

TagsAPI.md

File metadata and controls

208 lines (130 loc) · 4.7 KB

\TagsAPI

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

GetTagByName

Tag GetTagByName(ctx, tagName).Execute()

Information about a tag

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
tagName string The name of the tag

Other Parameters

Other parameters are passed through a pointer to a apiGetTagByNameRequest struct via the builder pattern

Name Type Description Notes

Return type

Tag

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTags

[]Tag GetTags(ctx).Execute()

Information about tags

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetTagsRequest struct via the builder pattern

Return type

[]Tag

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PutTag

Tag PutTag(ctx).Tag(tag).Execute()

Create or update a tag

Example

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)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPutTagRequest struct via the builder pattern

Name Type Description Notes
tag Tag

Return type

Tag

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]