Skip to content

Latest commit

 

History

History
179 lines (139 loc) · 8.44 KB

README.md

File metadata and controls

179 lines (139 loc) · 8.44 KB

Feedback

(Feedback)

Overview

Feedback

Available Operations

  • Get - Fetch feedback by id.
  • List - List feedback
  • Upload - Upload a piece of feedback

Get

Fetch feedback by id.

Example Usage

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
    }
}

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
opts []operations.Option The options for this request.

Response

*operations.GetResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /

List

List feedback

Example Usage

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
    }
}

Parameters

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.

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(
	"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
    }
}

Parameters

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.

Response

*operations.UploadResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /