All URIs are relative to https://api.eduframe.nl/api/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateComment | Post /comments | Create a comment. |
| DeleteCommentById | Delete /comments/{id} | Delete a comment. |
| UpdateCommentById | Patch /comments/{id} | Update a comment. |
Comment CreateComment(ctx).CreateCommentRequest(createCommentRequest).Execute()
Create a comment.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
createCommentRequest := *openapiclient.NewCreateCommentRequest("Content_example", int32(123), openapiclient.CommentType("Account")) // CreateCommentRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentsAPI.CreateComment(context.Background()).CreateCommentRequest(createCommentRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentsAPI.CreateComment``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateComment`: Comment
fmt.Fprintf(os.Stdout, "Response from `CommentsAPI.CreateComment`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateCommentRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createCommentRequest | CreateCommentRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteCommentById(ctx, id).Execute()
Delete a comment.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CommentsAPI.DeleteCommentById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentsAPI.DeleteCommentById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiDeleteCommentByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Comment UpdateCommentById(ctx, id).UpdateCommentByIdRequest(updateCommentByIdRequest).Execute()
Update a comment.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
updateCommentByIdRequest := *openapiclient.NewUpdateCommentByIdRequest() // UpdateCommentByIdRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentsAPI.UpdateCommentById(context.Background(), id).UpdateCommentByIdRequest(updateCommentByIdRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentsAPI.UpdateCommentById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateCommentById`: Comment
fmt.Fprintf(os.Stdout, "Response from `CommentsAPI.UpdateCommentById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiUpdateCommentByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateCommentByIdRequest | UpdateCommentByIdRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]