All URIs are relative to https://127.0.0.1:8006/api2/json
Method | HTTP request | Description |
---|---|---|
CreateStorage | Post /storage | createStorage |
GetStorage | Get /storage | getStorage |
CreateStorage200Response CreateStorage(ctx).CreateStorageRequest(createStorageRequest).Execute()
createStorage
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/DirkTheDaring/px-api-client-go"
)
func main() {
createStorageRequest := *openapiclient.NewCreateStorageRequest("Storage_example", "Type_example") // CreateStorageRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StorageAPI.CreateStorage(context.Background()).CreateStorageRequest(createStorageRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StorageAPI.CreateStorage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateStorage`: CreateStorage200Response
fmt.Fprintf(os.Stdout, "Response from `StorageAPI.CreateStorage`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateStorageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createStorageRequest | CreateStorageRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetStorage200Response GetStorage(ctx).Type_(type_).Execute()
getStorage
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/DirkTheDaring/px-api-client-go"
)
func main() {
type_ := "type__example" // string | Only list storage of specific type (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StorageAPI.GetStorage(context.Background()).Type_(type_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StorageAPI.GetStorage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStorage`: GetStorage200Response
fmt.Fprintf(os.Stdout, "Response from `StorageAPI.GetStorage`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetStorageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
type_ | string | Only list storage of specific type |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]