Files
openapi-go-answer/docs/RevisionAPI.md
2023-09-26 16:20:01 +08:00

7.4 KiB

\RevisionAPI

All URIs are relative to http://localhost

Method HTTP request Description
AnswerApiV1RevisionsAuditPut Put /answer/api/v1/revisions/audit revision audit
AnswerApiV1RevisionsEditCheckGet Get /answer/api/v1/revisions/edit/check check can update revision
AnswerApiV1RevisionsGet Get /answer/api/v1/revisions get revision list
AnswerApiV1RevisionsUnreviewedGet Get /answer/api/v1/revisions/unreviewed get unreviewed revision list

AnswerApiV1RevisionsAuditPut

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

revision audit

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "git.ncc.cx/package/openapi-go-answer"
)

func main() {
    data := *openapiclient.NewSchemaRevisionAuditReq("Id_example", "Operation_example") // SchemaRevisionAuditReq | audit

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

Path Parameters

Other Parameters

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

Name Type Description Notes
data SchemaRevisionAuditReq audit

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]

AnswerApiV1RevisionsEditCheckGet

HandlerRespBody AnswerApiV1RevisionsEditCheckGet(ctx).Id(id).Execute()

check can update revision

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "git.ncc.cx/package/openapi-go-answer"
)

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

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

Path Parameters

Other Parameters

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

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

AnswerApiV1RevisionsGet

AnswerApiV1RevisionsGet200Response AnswerApiV1RevisionsGet(ctx).ObjectId(objectId).Execute()

get revision list

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "git.ncc.cx/package/openapi-go-answer"
)

func main() {
    objectId := "objectId_example" // string | object id

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

Path Parameters

Other Parameters

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

Name Type Description Notes
objectId string object id

Return type

AnswerApiV1RevisionsGet200Response

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]

AnswerApiV1RevisionsUnreviewedGet

AnswerApiV1RevisionsUnreviewedGet200Response AnswerApiV1RevisionsUnreviewedGet(ctx).Page(page).Execute()

get unreviewed revision list

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "git.ncc.cx/package/openapi-go-answer"
)

func main() {
    page := "page_example" // string | page id

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

Path Parameters

Other Parameters

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

Name Type Description Notes
page string page id

Return type

AnswerApiV1RevisionsUnreviewedGet200Response

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]