Skip to content

Latest commit

 

History

History
79 lines (51 loc) · 1.96 KB

PluginsAPI.md

File metadata and controls

79 lines (51 loc) · 1.96 KB

\PluginsAPI

All URIs are relative to /api

Method HTTP request Description
GetPlugin Get /plugins/{slug} Fetches a plugin by slug or id

GetPlugin

FormattedApiPlugin GetPlugin(ctx, slug).Version(version).Execute()

Fetches a plugin by slug or id

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
slug string

Other Parameters

Other parameters are passed through a pointer to a apiGetPluginRequest struct via the builder pattern

Name Type Description Notes

version | string | |

Return type

FormattedApiPlugin

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]