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