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

4.2 KiB

\CollectionApi

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

Method HTTP request Description
AnswerApiV1CollectionSwitchPost Post /answer/api/v1/collection/switch add collection
AnswerApiV1PersonalCollectionPageGet Get /answer/api/v1/personal/collection/page UserCollectionList

AnswerApiV1CollectionSwitchPost

AnswerApiV1CollectionSwitchPost200Response AnswerApiV1CollectionSwitchPost(ctx).Data(data).Execute()

add collection

Example

package main

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

func main() {
    data := *openapiclient.NewSchemaCollectionSwitchReq("GroupId_example", "ObjectId_example") // SchemaCollectionSwitchReq | collection

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaCollectionSwitchReq collection

Return type

AnswerApiV1CollectionSwitchPost200Response

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]

AnswerApiV1PersonalCollectionPageGet

HandlerRespBody AnswerApiV1PersonalCollectionPageGet(ctx).Page(page).Pagesize(pagesize).Execute()

UserCollectionList

Example

package main

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

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

Path Parameters

Other Parameters

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

Name Type Description Notes
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]