11 KiB
\ApiAnswerAPI
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| AnswerApiV1AnswerAcceptancePost | Post /answer/api/v1/answer/acceptance | Accepted |
| AnswerApiV1AnswerDelete | Delete /answer/api/v1/answer | delete answer |
| AnswerApiV1AnswerInfoGet | Get /answer/api/v1/answer/info | Get Answer |
| AnswerApiV1AnswerPageGet | Get /answer/api/v1/answer/page | AnswerList |
| AnswerApiV1AnswerPost | Post /answer/api/v1/answer | Insert Answer |
| AnswerApiV1AnswerPut | Put /answer/api/v1/answer | Update Answer |
AnswerApiV1AnswerAcceptancePost
string AnswerApiV1AnswerAcceptancePost(ctx).Data(data).Execute()
Accepted
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaAcceptAnswerReq("QuestionId_example") // SchemaAcceptAnswerReq | AcceptAnswerReq
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ApiAnswerAPI.AnswerApiV1AnswerAcceptancePost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiAnswerAPI.AnswerApiV1AnswerAcceptancePost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1AnswerAcceptancePost`: string
fmt.Fprintf(os.Stdout, "Response from `ApiAnswerAPI.AnswerApiV1AnswerAcceptancePost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1AnswerAcceptancePostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaAcceptAnswerReq | AcceptAnswerReq |
Return type
string
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1AnswerDelete
HandlerRespBody AnswerApiV1AnswerDelete(ctx).Data(data).Execute()
delete answer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaRemoveAnswerReq("Id_example") // SchemaRemoveAnswerReq | answer
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ApiAnswerAPI.AnswerApiV1AnswerDelete(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiAnswerAPI.AnswerApiV1AnswerDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1AnswerDelete`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `ApiAnswerAPI.AnswerApiV1AnswerDelete`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1AnswerDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaRemoveAnswerReq | answer |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1AnswerInfoGet
string AnswerApiV1AnswerInfoGet(ctx).Id(id).Execute()
Get Answer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
id := "id_example" // string | Answer TagID (default to "1")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ApiAnswerAPI.AnswerApiV1AnswerInfoGet(context.Background()).Id(id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiAnswerAPI.AnswerApiV1AnswerInfoGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1AnswerInfoGet`: string
fmt.Fprintf(os.Stdout, "Response from `ApiAnswerAPI.AnswerApiV1AnswerInfoGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1AnswerInfoGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | Answer TagID | [default to "1"] |
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]
AnswerApiV1AnswerPageGet
string AnswerApiV1AnswerPageGet(ctx).QuestionId(questionId).Order(order).Page(page).PageSize(pageSize).Execute()
AnswerList
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
questionId := "questionId_example" // string | question_id
order := "order_example" // string | order
page := "page_example" // string | page
pageSize := "pageSize_example" // string | page_size
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ApiAnswerAPI.AnswerApiV1AnswerPageGet(context.Background()).QuestionId(questionId).Order(order).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiAnswerAPI.AnswerApiV1AnswerPageGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1AnswerPageGet`: string
fmt.Fprintf(os.Stdout, "Response from `ApiAnswerAPI.AnswerApiV1AnswerPageGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1AnswerPageGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| questionId | string | question_id | |
| order | string | order | |
| page | string | page | |
| pageSize | string | page_size |
Return type
string
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1AnswerPost
string AnswerApiV1AnswerPost(ctx).Data(data).Execute()
Insert Answer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaAnswerAddReq("Content_example") // SchemaAnswerAddReq | AnswerAddReq
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ApiAnswerAPI.AnswerApiV1AnswerPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiAnswerAPI.AnswerApiV1AnswerPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1AnswerPost`: string
fmt.Fprintf(os.Stdout, "Response from `ApiAnswerAPI.AnswerApiV1AnswerPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1AnswerPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaAnswerAddReq | AnswerAddReq |
Return type
string
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1AnswerPut
string AnswerApiV1AnswerPut(ctx).Data(data).Execute()
Update Answer
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaAnswerUpdateReq("Content_example") // SchemaAnswerUpdateReq | AnswerUpdateReq
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ApiAnswerAPI.AnswerApiV1AnswerPut(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiAnswerAPI.AnswerApiV1AnswerPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1AnswerPut`: string
fmt.Fprintf(os.Stdout, "Response from `ApiAnswerAPI.AnswerApiV1AnswerPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1AnswerPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaAnswerUpdateReq | AnswerUpdateReq |
Return type
string
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]