(Feedback)
Feedback
Fetch feedback by id.
package main
import(
"os"
"github.com/log10-io/log10go"
"context"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity(os.Getenv("LOG10_TOKEN")),
)
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
}
}
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 |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.GetResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
List feedback
package main
import(
"os"
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/operations"
"context"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity(os.Getenv("LOG10_TOKEN")),
)
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
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
xLog10Organization |
*string | ➖ | N/A |
requestBody |
*operations.ListRequestBody | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.ListResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |
Upload a piece of feedback
package main
import(
"os"
"github.com/log10-io/log10go"
"github.com/log10-io/log10go/models/operations"
"context"
"log"
)
func main() {
s := log10go.New(
log10go.WithSecurity(os.Getenv("LOG10_TOKEN")),
)
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
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
requestBody |
operations.UploadRequestBody | ✔️ | N/A |
xLog10Organization |
*string | ➖ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.UploadResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |