All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
GetPlugin | Get /plugins/{slug} | Fetches a plugin by slug or id |
FormattedApiPlugin GetPlugin(ctx, slug).Version(version).Execute()
Fetches a plugin by slug or id
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slug := "slug_example" // string |
version := "version_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PluginsAPI.GetPlugin(context.Background(), slug).Version(version).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PluginsAPI.GetPlugin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetPlugin`: FormattedApiPlugin
fmt.Fprintf(os.Stdout, "Response from `PluginsAPI.GetPlugin`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slug | string |
Other parameters are passed through a pointer to a apiGetPluginRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
version | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]