All URIs are relative to https://yasm.prodyna.com:443/api/graph/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateLayout | Post /layouts | Create a Layout |
| DeleteLayout | Delete /layouts/{layoutId} | Delete a Layout |
| GetLayout | Get /layouts/{layoutId} | Read a Layout |
| SearchLayouts | Post /layouts/search | Search over Layouts |
LayoutDetails CreateLayout(ctx).SvgFile(svgFile).Id(id).Name(name).Execute()
Create a Layout
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
svgFile := os.NewFile(1234, "some_file") // *os.File | SVG layout file
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | (optional)
name := "name_example" // string | Layout JSON object (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LayoutAPI.CreateLayout(context.Background()).SvgFile(svgFile).Id(id).Name(name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LayoutAPI.CreateLayout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateLayout`: LayoutDetails
fmt.Fprintf(os.Stdout, "Response from `LayoutAPI.CreateLayout`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateLayoutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| svgFile | *os.File | SVG layout file | |
| id | string | ||
| name | string | Layout JSON object |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Status DeleteLayout(ctx, layoutId).Execute()
Delete a Layout
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
layoutId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LayoutAPI.DeleteLayout(context.Background(), layoutId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LayoutAPI.DeleteLayout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteLayout`: Status
fmt.Fprintf(os.Stdout, "Response from `LayoutAPI.DeleteLayout`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| layoutId | string |
Other parameters are passed through a pointer to a apiDeleteLayoutRequest 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]
LayoutDetails GetLayout(ctx, layoutId).Execute()
Read a Layout
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
layoutId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LayoutAPI.GetLayout(context.Background(), layoutId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LayoutAPI.GetLayout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLayout`: LayoutDetails
fmt.Fprintf(os.Stdout, "Response from `LayoutAPI.GetLayout`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| layoutId | string |
Other parameters are passed through a pointer to a apiGetLayoutRequest 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]
PagedLayouts SearchLayouts(ctx).Search(search).Execute()
Search over Layouts
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
search := *openapiclient.NewSearch(int32(123), int32(123)) // Search | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LayoutAPI.SearchLayouts(context.Background()).Search(search).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LayoutAPI.SearchLayouts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SearchLayouts`: PagedLayouts
fmt.Fprintf(os.Stdout, "Response from `LayoutAPI.SearchLayouts`: %v\n", resp)
}Other parameters are passed through a pointer to a apiSearchLayoutsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| search | Search |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]