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

6.7 KiB

\LangAPI

All URIs are relative to http://localhost

Method HTTP request Description
AnswerAdminApiLanguageOptionsGet Get /answer/admin/api/language/options Get language options
AnswerApiV1LanguageConfigGet Get /answer/api/v1/language/config get language config mapping
AnswerApiV1LanguageOptionsGet Get /answer/api/v1/language/options Get language options
InstallationLanguageOptionsGet Get /installation/language/options get installation language options

AnswerAdminApiLanguageOptionsGet

HandlerRespBody AnswerAdminApiLanguageOptionsGet(ctx).Execute()

Get language options

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

HandlerRespBody

Authorization

No authorization required

HTTP request headers

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

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

AnswerApiV1LanguageConfigGet

HandlerRespBody AnswerApiV1LanguageConfigGet(ctx).AcceptLanguage(acceptLanguage).Execute()

get language config mapping

Example

package main

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

func main() {
    acceptLanguage := "acceptLanguage_example" // string | Accept-Language

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

Path Parameters

Other Parameters

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

Name Type Description Notes
acceptLanguage string Accept-Language

Return type

HandlerRespBody

Authorization

No authorization required

HTTP request headers

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

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

AnswerApiV1LanguageOptionsGet

HandlerRespBody AnswerApiV1LanguageOptionsGet(ctx).Execute()

Get language options

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

HandlerRespBody

Authorization

No authorization required

HTTP request headers

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

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

InstallationLanguageOptionsGet

InstallationLanguageOptionsGet200Response InstallationLanguageOptionsGet(ctx).Execute()

get installation language options

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

InstallationLanguageOptionsGet200Response

Authorization

No authorization required

HTTP request headers

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

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