Files
openapi-go-answer/docs/SiteApi.md
2023-08-18 10:03:31 +08:00

6.2 KiB

\SiteApi

All URIs are relative to http://127.0.0.1:80

Method HTTP request Description
AnswerApiV1SiteinfoGet Get /answer/api/v1/siteinfo get site info
AnswerApiV1SiteinfoLegalGet Get /answer/api/v1/siteinfo/legal get site legal info
CustomCssGet Get /custom.css get site robots information
RobotsTxtGet Get /robots.txt get site robots information

AnswerApiV1SiteinfoGet

AnswerApiV1SiteinfoGet200Response AnswerApiV1SiteinfoGet(ctx).Execute()

get site info

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

AnswerApiV1SiteinfoGet200Response

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]

AnswerApiV1SiteinfoLegalGet

AnswerApiV1SiteinfoLegalGet200Response AnswerApiV1SiteinfoLegalGet(ctx).InfoType(infoType).Execute()

get site legal info

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {
    infoType := "infoType_example" // string | legal information type

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

Path Parameters

Other Parameters

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

Name Type Description Notes
infoType string legal information type

Return type

AnswerApiV1SiteinfoLegalGet200Response

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]

CustomCssGet

string CustomCssGet(ctx).Execute()

get site robots information

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

string

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]

RobotsTxtGet

string RobotsTxtGet(ctx).Execute()

get site robots information

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

string

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]