All URIs are relative to http://localhost:8080
Method | HTTP request | Description |
---|---|---|
CheckHealth | Get /healthz | |
GopherDelete | Delete /gopher | |
GopherGet | Get /gopher | |
GopherPost | Post /gopher | Add a new Gopher |
GopherPut | Put /gopher | |
GophersGet | Get /gophers |
string CheckHealth(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/scraly/gophers-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GophersApi.CheckHealth(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GophersApi.CheckHealth``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CheckHealth`: string
fmt.Fprintf(os.Stdout, "Response from `GophersApi.CheckHealth`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiCheckHealthRequest struct via the builder pattern
string
No authorization required
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GopherDelete(ctx).Name(name).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/scraly/gophers-sdk-go"
)
func main() {
name := "name_example" // string | Gopher name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.GophersApi.GopherDelete(context.Background()).Name(name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GophersApi.GopherDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiGopherDeleteRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
name | string | Gopher name |
(empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gopher GopherGet(ctx).Name(name).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/scraly/gophers-sdk-go"
)
func main() {
name := "name_example" // string | Gopher name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GophersApi.GopherGet(context.Background()).Name(name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GophersApi.GopherGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GopherGet`: Gopher
fmt.Fprintf(os.Stdout, "Response from `GophersApi.GopherGet`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGopherGetRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
name | string | Gopher name |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gopher GopherPost(ctx).Gopher(gopher).Execute()
Add a new Gopher
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/scraly/gophers-sdk-go"
)
func main() {
gopher := *openapiclient.NewGopherPutRequest("Name_example", "Displayname_example", "Url_example") // GopherPutRequest | The Gopher to create. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GophersApi.GopherPost(context.Background()).Gopher(gopher).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GophersApi.GopherPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GopherPost`: Gopher
fmt.Fprintf(os.Stdout, "Response from `GophersApi.GopherPost`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGopherPostRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
gopher | GopherPutRequest | The Gopher to create. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gopher GopherPut(ctx).Gopher(gopher).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/scraly/gophers-sdk-go"
)
func main() {
gopher := *openapiclient.NewGopherPutRequest("Name_example", "Displayname_example", "Url_example") // GopherPutRequest | The Gopher to update. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GophersApi.GopherPut(context.Background()).Gopher(gopher).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GophersApi.GopherPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GopherPut`: Gopher
fmt.Fprintf(os.Stdout, "Response from `GophersApi.GopherPut`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGopherPutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
gopher | GopherPutRequest | The Gopher to update. |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Gopher GophersGet(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/scraly/gophers-sdk-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.GophersApi.GophersGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `GophersApi.GophersGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GophersGet`: []Gopher
fmt.Fprintf(os.Stdout, "Response from `GophersApi.GophersGet`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGophersGetRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]