Skip to content

Latest commit

 

History

History
430 lines (273 loc) · 13.4 KB

WidgetsTypesAPI.md

File metadata and controls

430 lines (273 loc) · 13.4 KB

\WidgetsTypesAPI

All URIs are relative to https://name.eliona.io/v2

Method HTTP request Description
DeleteWidgetTypeByName Delete /widget-types/{widget-type-name} Delete a widget type
GetWidgetTypeByName Get /widget-types/{widget-type-name} Information about a widget type
GetWidgetTypes Get /widget-types List of widget types
PostWidgetType Post /widget-types Create a widget type
PutWidgetType Put /widget-types Create or update a widget type
PutWidgetTypeByName Put /widget-types/{widget-type-name} Update a widget type

DeleteWidgetTypeByName

DeleteWidgetTypeByName(ctx, widgetTypeName).Execute()

Delete a widget type

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)

func main() {
	widgetTypeName := "weather" // string | The name of the widget type

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.WidgetsTypesAPI.DeleteWidgetTypeByName(context.Background(), widgetTypeName).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WidgetsTypesAPI.DeleteWidgetTypeByName``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetWidgetTypeByName

WidgetType GetWidgetTypeByName(ctx, widgetTypeName).Expansions(expansions).Execute()

Information about a widget type

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)

func main() {
	widgetTypeName := "weather" // string | The name of the widget type
	expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WidgetsTypesAPI.GetWidgetTypeByName(context.Background(), widgetTypeName).Expansions(expansions).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WidgetsTypesAPI.GetWidgetTypeByName``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetWidgetTypeByName`: WidgetType
	fmt.Fprintf(os.Stdout, "Response from `WidgetsTypesAPI.GetWidgetTypeByName`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |

Return type

WidgetType

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]

GetWidgetTypes

[]WidgetType GetWidgetTypes(ctx).Expansions(expansions).Execute()

List of widget types

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)

func main() {
	expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WidgetsTypesAPI.GetWidgetTypes(context.Background()).Expansions(expansions).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WidgetsTypesAPI.GetWidgetTypes``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetWidgetTypes`: []WidgetType
	fmt.Fprintf(os.Stdout, "Response from `WidgetsTypesAPI.GetWidgetTypes`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
expansions []string List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'.

Return type

[]WidgetType

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]

PostWidgetType

WidgetType PostWidgetType(ctx).WidgetType(widgetType).Expansions(expansions).Execute()

Create a widget type

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)

func main() {
	widgetType := *openapiclient.NewWidgetType("weather", "TODO", []openapiclient.WidgetTypeElement{*openapiclient.NewWidgetTypeElement("weather")}) // WidgetType | 
	expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WidgetsTypesAPI.PostWidgetType(context.Background()).WidgetType(widgetType).Expansions(expansions).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WidgetsTypesAPI.PostWidgetType``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PostWidgetType`: WidgetType
	fmt.Fprintf(os.Stdout, "Response from `WidgetsTypesAPI.PostWidgetType`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
widgetType WidgetType
expansions []string List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'.

Return type

WidgetType

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]

PutWidgetType

WidgetType PutWidgetType(ctx).WidgetType(widgetType).Expansions(expansions).Execute()

Create or update a widget type

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)

func main() {
	widgetType := *openapiclient.NewWidgetType("weather", "TODO", []openapiclient.WidgetTypeElement{*openapiclient.NewWidgetTypeElement("weather")}) // WidgetType | 
	expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WidgetsTypesAPI.PutWidgetType(context.Background()).WidgetType(widgetType).Expansions(expansions).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WidgetsTypesAPI.PutWidgetType``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PutWidgetType`: WidgetType
	fmt.Fprintf(os.Stdout, "Response from `WidgetsTypesAPI.PutWidgetType`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
widgetType WidgetType
expansions []string List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'.

Return type

WidgetType

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]

PutWidgetTypeByName

WidgetType PutWidgetTypeByName(ctx, widgetTypeName).WidgetType(widgetType).Expansions(expansions).Execute()

Update a widget type

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/eliona-smart-building-assistant/go-eliona-api-client/v2"
)

func main() {
	widgetTypeName := "weather" // string | The name of the widget type
	widgetType := *openapiclient.NewWidgetType("weather", "TODO", []openapiclient.WidgetTypeElement{*openapiclient.NewWidgetTypeElement("weather")}) // WidgetType | 
	expansions := []string{"Inner_example"} // []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.WidgetsTypesAPI.PutWidgetTypeByName(context.Background(), widgetTypeName).WidgetType(widgetType).Expansions(expansions).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `WidgetsTypesAPI.PutWidgetTypeByName``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PutWidgetTypeByName`: WidgetType
	fmt.Fprintf(os.Stdout, "Response from `WidgetsTypesAPI.PutWidgetTypeByName`: %v\n", resp)
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

widgetType | WidgetType | | expansions | []string | List of referenced data to load, insert or update. Each entry defines the full qualified name of the field to be expanded as follows 'ObjectName.fieldName'. |

Return type

WidgetType

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]