18 KiB
\TagAPI
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| AnswerApiV1QuestionTagsGet | Get /answer/api/v1/question/tags | get tag list |
| AnswerApiV1TagDelete | Delete /answer/api/v1/tag | delete tag |
| AnswerApiV1TagGet | Get /answer/api/v1/tag | get tag one |
| AnswerApiV1TagPost | Post /answer/api/v1/tag | add tag |
| AnswerApiV1TagPut | Put /answer/api/v1/tag | update tag |
| AnswerApiV1TagSynonymPut | Put /answer/api/v1/tag/synonym | update tag |
| AnswerApiV1TagSynonymsGet | Get /answer/api/v1/tag/synonyms | get tag synonyms |
| AnswerApiV1TagsFollowingGet | Get /answer/api/v1/tags/following | get following tag list |
| AnswerApiV1TagsGet | Get /answer/api/v1/tags | get tags list |
| AnswerApiV1TagsPageGet | Get /answer/api/v1/tags/page | get tag page |
AnswerApiV1QuestionTagsGet
AnswerApiV1QuestionTagsGet200Response AnswerApiV1QuestionTagsGet(ctx).Tag(tag).Execute()
get tag list
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
tag := "tag_example" // string | tag (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1QuestionTagsGet(context.Background()).Tag(tag).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1QuestionTagsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1QuestionTagsGet`: AnswerApiV1QuestionTagsGet200Response
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1QuestionTagsGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionTagsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| tag | string | tag |
Return type
AnswerApiV1QuestionTagsGet200Response
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]
AnswerApiV1TagDelete
HandlerRespBody AnswerApiV1TagDelete(ctx).Data(data).Execute()
delete tag
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaRemoveTagReq("TagId_example") // SchemaRemoveTagReq | tag
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1TagDelete(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagDelete`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagDelete`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaRemoveTagReq | tag |
Return type
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]
AnswerApiV1TagGet
AnswerApiV1TagGet200Response AnswerApiV1TagGet(ctx).TagId(tagId).TagName(tagName).Execute()
get tag one
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
tagId := "tagId_example" // string | tag id
tagName := "tagName_example" // string | tag name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1TagGet(context.Background()).TagId(tagId).TagName(tagName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagGet`: AnswerApiV1TagGet200Response
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| tagId | string | tag id | |
| tagName | string | tag name |
Return type
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]
AnswerApiV1TagPost
HandlerRespBody AnswerApiV1TagPost(ctx).Data(data).Execute()
add tag
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaAddTagReq("DisplayName_example", "OriginalText_example", "SlugName_example") // SchemaAddTagReq | tag
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1TagPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagPost`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaAddTagReq | tag |
Return type
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]
AnswerApiV1TagPut
HandlerRespBody AnswerApiV1TagPut(ctx).Data(data).Execute()
update tag
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaUpdateTagReq("TagId_example") // SchemaUpdateTagReq | tag
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1TagPut(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagPut`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaUpdateTagReq | tag |
Return type
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]
AnswerApiV1TagSynonymPut
HandlerRespBody AnswerApiV1TagSynonymPut(ctx).Data(data).Execute()
update tag
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaUpdateTagSynonymReq([]openapiclient.SchemaTagItem{*openapiclient.NewSchemaTagItem()}, "TagId_example") // SchemaUpdateTagSynonymReq | tag
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1TagSynonymPut(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagSynonymPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagSynonymPut`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagSynonymPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagSynonymPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaUpdateTagSynonymReq | tag |
Return type
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]
AnswerApiV1TagSynonymsGet
AnswerApiV1TagSynonymsGet200Response AnswerApiV1TagSynonymsGet(ctx).TagId(tagId).Execute()
get tag synonyms
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
tagId := int32(56) // int32 | tag id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1TagSynonymsGet(context.Background()).TagId(tagId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagSynonymsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagSynonymsGet`: AnswerApiV1TagSynonymsGet200Response
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagSynonymsGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagSynonymsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| tagId | int32 | tag id |
Return type
AnswerApiV1TagSynonymsGet200Response
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]
AnswerApiV1TagsFollowingGet
AnswerApiV1TagsFollowingGet200Response AnswerApiV1TagsFollowingGet(ctx).Execute()
get following tag list
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.TagAPI.AnswerApiV1TagsFollowingGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagsFollowingGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagsFollowingGet`: AnswerApiV1TagsFollowingGet200Response
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagsFollowingGet`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagsFollowingGetRequest struct via the builder pattern
Return type
AnswerApiV1TagsFollowingGet200Response
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]
AnswerApiV1TagsGet
HandlerRespBody AnswerApiV1TagsGet(ctx).Tags(tags).Execute()
get tags list
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
tags := []string{"Inner_example"} // []string | string collection (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1TagsGet(context.Background()).Tags(tags).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagsGet`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagsGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| tags | []string | string collection |
Return type
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]
AnswerApiV1TagsPageGet
AnswerApiV1TagsPageGet200Response AnswerApiV1TagsPageGet(ctx).Page(page).PageSize(pageSize).SlugName(slugName).QueryCond(queryCond).Execute()
get tag page
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
page := int32(56) // int32 | page size (optional)
pageSize := int32(56) // int32 | page size (optional)
slugName := "slugName_example" // string | slug_name (optional)
queryCond := "queryCond_example" // string | query condition (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TagAPI.AnswerApiV1TagsPageGet(context.Background()).Page(page).PageSize(pageSize).SlugName(slugName).QueryCond(queryCond).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TagAPI.AnswerApiV1TagsPageGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1TagsPageGet`: AnswerApiV1TagsPageGet200Response
fmt.Fprintf(os.Stdout, "Response from `TagAPI.AnswerApiV1TagsPageGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1TagsPageGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| page | int32 | page size | |
| pageSize | int32 | page size | |
| slugName | string | slug_name | |
| queryCond | string | query condition |
Return type
AnswerApiV1TagsPageGet200Response
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]