9.7 KiB
\NotificationAPI
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| AnswerApiV1NotificationPageGet | Get /answer/api/v1/notification/page | get notification list |
| AnswerApiV1NotificationReadStateAllPut | Put /answer/api/v1/notification/read/state/all | ClearUnRead |
| AnswerApiV1NotificationReadStatePut | Put /answer/api/v1/notification/read/state | ClearUnRead |
| AnswerApiV1NotificationStatusGet | Get /answer/api/v1/notification/status | GetRedDot |
| AnswerApiV1NotificationStatusPut | Put /answer/api/v1/notification/status | DelRedDot |
AnswerApiV1NotificationPageGet
HandlerRespBody AnswerApiV1NotificationPageGet(ctx).Type_(type_).InboxType(inboxType).Page(page).PageSize(pageSize).Execute()
get notification list
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
type_ := "type__example" // string | type
inboxType := "inboxType_example" // string | inbox_type
page := int32(56) // int32 | page size (optional)
pageSize := int32(56) // int32 | page size (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationAPI.AnswerApiV1NotificationPageGet(context.Background()).Type_(type_).InboxType(inboxType).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.AnswerApiV1NotificationPageGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1NotificationPageGet`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.AnswerApiV1NotificationPageGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1NotificationPageGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| type_ | string | type | |
| inboxType | string | inbox_type | |
| page | int32 | page size | |
| pageSize | int32 | page size |
Return type
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]
AnswerApiV1NotificationReadStateAllPut
HandlerRespBody AnswerApiV1NotificationReadStateAllPut(ctx).Data(data).Execute()
ClearUnRead
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaNotificationClearRequest() // SchemaNotificationClearRequest | NotificationClearRequest
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationAPI.AnswerApiV1NotificationReadStateAllPut(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.AnswerApiV1NotificationReadStateAllPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1NotificationReadStateAllPut`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.AnswerApiV1NotificationReadStateAllPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1NotificationReadStateAllPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaNotificationClearRequest | NotificationClearRequest |
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]
AnswerApiV1NotificationReadStatePut
HandlerRespBody AnswerApiV1NotificationReadStatePut(ctx).Data(data).Execute()
ClearUnRead
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaNotificationClearIDRequest() // SchemaNotificationClearIDRequest | NotificationClearIDRequest
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationAPI.AnswerApiV1NotificationReadStatePut(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.AnswerApiV1NotificationReadStatePut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1NotificationReadStatePut`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.AnswerApiV1NotificationReadStatePut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1NotificationReadStatePutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaNotificationClearIDRequest | NotificationClearIDRequest |
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]
AnswerApiV1NotificationStatusGet
HandlerRespBody AnswerApiV1NotificationStatusGet(ctx).Execute()
GetRedDot
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.NotificationAPI.AnswerApiV1NotificationStatusGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.AnswerApiV1NotificationStatusGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1NotificationStatusGet`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.AnswerApiV1NotificationStatusGet`: %v\n", resp)
}
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1NotificationStatusGetRequest struct via the builder pattern
Return type
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]
AnswerApiV1NotificationStatusPut
HandlerRespBody AnswerApiV1NotificationStatusPut(ctx).Data(data).Execute()
DelRedDot
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaNotificationClearRequest() // SchemaNotificationClearRequest | NotificationClearRequest
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.NotificationAPI.AnswerApiV1NotificationStatusPut(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `NotificationAPI.AnswerApiV1NotificationStatusPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1NotificationStatusPut`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `NotificationAPI.AnswerApiV1NotificationStatusPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1NotificationStatusPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaNotificationClearRequest | NotificationClearRequest |
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]