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

26 KiB

\QuestionApi

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

Method HTTP request Description
AnswerApiV1PersonalQaTopGet Get /answer/api/v1/personal/qa/top UserTop
AnswerApiV1QuestionAnswerPost Post /answer/api/v1/question/answer add question and answer
AnswerApiV1QuestionClosemsglistGet Get /answer/api/v1/question/closemsglist close question msg list
AnswerApiV1QuestionDelete Delete /answer/api/v1/question delete question
AnswerApiV1QuestionInfoGet Get /answer/api/v1/question/info get question details
AnswerApiV1QuestionOperationPut Put /answer/api/v1/question/operation Operation question
AnswerApiV1QuestionPageGet Get /answer/api/v1/question/page get questions by page
AnswerApiV1QuestionPost Post /answer/api/v1/question add question
AnswerApiV1QuestionPut Put /answer/api/v1/question update question
AnswerApiV1QuestionReopenPut Put /answer/api/v1/question/reopen reopen question
AnswerApiV1QuestionSimilarGet Get /answer/api/v1/question/similar add question title like
AnswerApiV1QuestionSimilarTagGet Get /answer/api/v1/question/similar/tag Search Similar Question
AnswerApiV1QuestionStatusPut Put /answer/api/v1/question/status Close question
PersonalQuestionPageGet Get /personal/question/page UserList

AnswerApiV1PersonalQaTopGet

HandlerRespBody AnswerApiV1PersonalQaTopGet(ctx).Username(username).Execute()

UserTop

Example

package main

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

func main() {
    username := "username_example" // string | username (default to "string")

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

Path Parameters

Other Parameters

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

Name Type Description Notes
username string username [default to "string"]

Return type

HandlerRespBody

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]

AnswerApiV1QuestionAnswerPost

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

add question and answer

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaQuestionAddByAnswer("AnswerContent_example", "Content_example", []openapiclient.SchemaTagItem{*openapiclient.NewSchemaTagItem()}, "Title_example") // SchemaQuestionAddByAnswer | question

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaQuestionAddByAnswer question

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]

AnswerApiV1QuestionClosemsglistGet

HandlerRespBody AnswerApiV1QuestionClosemsglistGet(ctx).Execute()

close question msg list

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.QuestionApi.AnswerApiV1QuestionClosemsglistGet(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `QuestionApi.AnswerApiV1QuestionClosemsglistGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AnswerApiV1QuestionClosemsglistGet`: HandlerRespBody
    fmt.Fprintf(os.Stdout, "Response from `QuestionApi.AnswerApiV1QuestionClosemsglistGet`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

HandlerRespBody

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]

AnswerApiV1QuestionDelete

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

delete question

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaRemoveQuestionReq("Id_example") // SchemaRemoveQuestionReq | question

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaRemoveQuestionReq question

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]

AnswerApiV1QuestionInfoGet

string AnswerApiV1QuestionInfoGet(ctx).Id(id).Execute()

get question details

Example

package main

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

func main() {
    id := "id_example" // string | Question TagID (default to "1")

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

Path Parameters

Other Parameters

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

Name Type Description Notes
id string Question TagID [default to "1"]

Return type

string

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]

AnswerApiV1QuestionOperationPut

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

Operation question

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaOperationQuestionReq("Id_example") // SchemaOperationQuestionReq | question

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaOperationQuestionReq question

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]

AnswerApiV1QuestionPageGet

AnswerApiV1QuestionPageGet200Response AnswerApiV1QuestionPageGet(ctx).Data(data).Execute()

get questions by page

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaQuestionPageReq() // SchemaQuestionPageReq | QuestionPageReq

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaQuestionPageReq QuestionPageReq

Return type

AnswerApiV1QuestionPageGet200Response

Authorization

No authorization required

HTTP request headers

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

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

AnswerApiV1QuestionPost

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

add question

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaQuestionAdd("Content_example", []openapiclient.SchemaTagItem{*openapiclient.NewSchemaTagItem()}, "Title_example") // SchemaQuestionAdd | question

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaQuestionAdd question

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]

AnswerApiV1QuestionPut

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

update question

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaQuestionUpdate("Content_example", "Id_example", []openapiclient.SchemaTagItem{*openapiclient.NewSchemaTagItem()}, "Title_example") // SchemaQuestionUpdate | question

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaQuestionUpdate question

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]

AnswerApiV1QuestionReopenPut

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

reopen question

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaReopenQuestionReq() // SchemaReopenQuestionReq | question

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaReopenQuestionReq question

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]

AnswerApiV1QuestionSimilarGet

HandlerRespBody AnswerApiV1QuestionSimilarGet(ctx).Title(title).Execute()

add question title like

Example

package main

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

func main() {
    title := "title_example" // string | title (default to "string")

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

Path Parameters

Other Parameters

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

Name Type Description Notes
title string title [default to "string"]

Return type

HandlerRespBody

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]

AnswerApiV1QuestionSimilarTagGet

string AnswerApiV1QuestionSimilarTagGet(ctx).QuestionId(questionId).Execute()

Search Similar Question

Example

package main

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

func main() {
    questionId := "questionId_example" // string | question_id

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

Path Parameters

Other Parameters

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

Name Type Description Notes
questionId string question_id

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]

AnswerApiV1QuestionStatusPut

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

Close question

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaCloseQuestionReq("Id_example") // SchemaCloseQuestionReq | question

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaCloseQuestionReq question

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]

PersonalQuestionPageGet

HandlerRespBody PersonalQuestionPageGet(ctx).Username(username).Order(order).Page(page).Pagesize(pagesize).Execute()

UserList

Example

package main

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

func main() {
    username := "username_example" // string | username (default to "string")
    order := "order_example" // string | order
    page := "page_example" // string | page (default to "0")
    pagesize := "pagesize_example" // string | pagesize (default to "20")

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.QuestionApi.PersonalQuestionPageGet(context.Background()).Username(username).Order(order).Page(page).Pagesize(pagesize).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `QuestionApi.PersonalQuestionPageGet``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PersonalQuestionPageGet`: HandlerRespBody
    fmt.Fprintf(os.Stdout, "Response from `QuestionApi.PersonalQuestionPageGet`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
username string username [default to "string"]
order string order
page string page [default to "0"]
pagesize string pagesize [default to "20"]

Return type

HandlerRespBody

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]