Files
openapi-go-answer/docs/AdminPluginAPI.md
2023-09-26 16:20:01 +08:00

7.8 KiB

\AdminPluginAPI

All URIs are relative to http://localhost

Method HTTP request Description
AnswerAdminApiPluginConfigGet Get /answer/admin/api/plugin/config get plugin config
AnswerAdminApiPluginConfigPut Put /answer/admin/api/plugin/config update plugin config
AnswerAdminApiPluginStatusPut Put /answer/admin/api/plugin/status update plugin status
AnswerAdminApiPluginsGet Get /answer/admin/api/plugins get plugin list

AnswerAdminApiPluginConfigGet

AnswerAdminApiPluginConfigGet200Response AnswerAdminApiPluginConfigGet(ctx).PluginSlugName(pluginSlugName).Execute()

get plugin config

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "git.ncc.cx/package/openapi-go-answer"
)

func main() {
    pluginSlugName := "pluginSlugName_example" // string | plugin_slug_name

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AdminPluginAPI.AnswerAdminApiPluginConfigGet(context.Background()).PluginSlugName(pluginSlugName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AdminPluginAPI.AnswerAdminApiPluginConfigGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AnswerAdminApiPluginConfigGet`: AnswerAdminApiPluginConfigGet200Response
    fmt.Fprintf(os.Stdout, "Response from `AdminPluginAPI.AnswerAdminApiPluginConfigGet`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
pluginSlugName string plugin_slug_name

Return type

AnswerAdminApiPluginConfigGet200Response

Authorization

ApiKeyAuth

HTTP request headers

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

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

AnswerAdminApiPluginConfigPut

HandlerRespBody AnswerAdminApiPluginConfigPut(ctx).Data(data).Execute()

update plugin config

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "git.ncc.cx/package/openapi-go-answer"
)

func main() {
    data := *openapiclient.NewSchemaUpdatePluginConfigReq("PluginSlugName_example") // SchemaUpdatePluginConfigReq | UpdatePluginConfigReq

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AdminPluginAPI.AnswerAdminApiPluginConfigPut(context.Background()).Data(data).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AdminPluginAPI.AnswerAdminApiPluginConfigPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AnswerAdminApiPluginConfigPut`: HandlerRespBody
    fmt.Fprintf(os.Stdout, "Response from `AdminPluginAPI.AnswerAdminApiPluginConfigPut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaUpdatePluginConfigReq UpdatePluginConfigReq

Return type

HandlerRespBody

Authorization

ApiKeyAuth

HTTP request headers

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

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

AnswerAdminApiPluginStatusPut

HandlerRespBody AnswerAdminApiPluginStatusPut(ctx).Data(data).Execute()

update plugin status

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "git.ncc.cx/package/openapi-go-answer"
)

func main() {
    data := *openapiclient.NewSchemaUpdatePluginStatusReq("PluginSlugName_example") // SchemaUpdatePluginStatusReq | UpdatePluginStatusReq

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AdminPluginAPI.AnswerAdminApiPluginStatusPut(context.Background()).Data(data).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AdminPluginAPI.AnswerAdminApiPluginStatusPut``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AnswerAdminApiPluginStatusPut`: HandlerRespBody
    fmt.Fprintf(os.Stdout, "Response from `AdminPluginAPI.AnswerAdminApiPluginStatusPut`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaUpdatePluginStatusReq UpdatePluginStatusReq

Return type

HandlerRespBody

Authorization

ApiKeyAuth

HTTP request headers

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

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

AnswerAdminApiPluginsGet

AnswerAdminApiPluginsGet200Response AnswerAdminApiPluginsGet(ctx).Status(status).HaveConfig(haveConfig).Execute()

get plugin list

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "git.ncc.cx/package/openapi-go-answer"
)

func main() {
    status := "status_example" // string | status: active/inactive (optional)
    haveConfig := true // bool | have config (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AdminPluginAPI.AnswerAdminApiPluginsGet(context.Background()).Status(status).HaveConfig(haveConfig).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AdminPluginAPI.AnswerAdminApiPluginsGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AnswerAdminApiPluginsGet`: AnswerAdminApiPluginsGet200Response
    fmt.Fprintf(os.Stdout, "Response from `AdminPluginAPI.AnswerAdminApiPluginsGet`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
status string status: active/inactive
haveConfig bool have config

Return type

AnswerAdminApiPluginsGet200Response

Authorization

ApiKeyAuth

HTTP request headers

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

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