mirror of
https://github.com/LukeHagar/log10go.git
synced 2025-12-06 04:20:12 +00:00
7.7 KiB
7.7 KiB
Feedback
(Feedback)
Overview
Feedback
Available Operations
Get
Fetch feedback by id.
Example Usage
package main
import(
"github.com/log10-io/log10go"
"context"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
var feedbackID string = "<value>"
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Feedback.Get(ctx, feedbackID, xLog10Organization)
if err != nil {
log.Fatal(err)
}
if res.Feedback != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
feedbackID |
string | ✔️ | The feedback id to fetch. |
xLog10Organization |
*string | ➖ | N/A |
Response
*operations.GetResponse, error
| Error Object | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4xx-5xx | / |
List
List feedback
Example Usage
package main
import(
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/operations"
"context"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
var xLog10Organization *string = log10go.String("<value>")
var requestBody *operations.ListRequestBody = &operations.ListRequestBody{}
ctx := context.Background()
res, err := s.Feedback.List(ctx, xLog10Organization, requestBody)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
xLog10Organization |
*string | ➖ | N/A |
requestBody |
*operations.ListRequestBody | ➖ | N/A |
Response
*operations.ListResponse, error
| Error Object | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4xx-5xx | / |
Upload
Upload a piece of feedback
Example Usage
package main
import(
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/operations"
"context"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity("<YOUR_API_KEY_HERE>"),
log10go.WithXLog10Organization("<value>"),
)
var requestBody operations.UploadRequestBody = operations.CreateUploadRequestBodyOne(
operations.One{
TaskID: "<value>",
JSONValues: operations.JSONValues{},
MatchedCompletionIds: []string{
"<value>",
},
Comment: "The slim & simple Maple Gaming Keyboard from Dev Byte comes with a sleek body and 7- Color RGB LED Back-lighting for smart functionality",
CompletionTagsSelector: []string{
"<value>",
},
},
)
var xLog10Organization *string = log10go.String("<value>")
ctx := context.Background()
res, err := s.Feedback.Upload(ctx, requestBody, xLog10Organization)
if err != nil {
log.Fatal(err)
}
if res.Feedback != nil {
// handle response
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
requestBody |
operations.UploadRequestBody | ✔️ | N/A |
xLog10Organization |
*string | ➖ | N/A |
Response
*operations.UploadResponse, error
| Error Object | Status Code | Content Type |
|---|---|---|
| sdkerrors.SDKError | 4xx-5xx | / |