Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 3.35 KB

README.md

File metadata and controls

65 lines (52 loc) · 3.35 KB

QRCodes

(QRCodes)

Available Operations

  • Get - Retrieve a QR code

Get

Retrieve a QR code for a link.

Example Usage

package main

import(
	dubgo "github.com/dubinc/dub-go"
	"github.com/dubinc/dub-go/models/operations"
	"context"
	"log"
)

func main() {
    s := dubgo.New(
        dubgo.WithSecurity("DUB_API_KEY"),
    )
    request := operations.GetQRCodeRequest{
        URL: "https://brief-micronutrient.org",
    }
    ctx := context.Background()
    res, err := s.QRCodes.Get(ctx, request)
    if err != nil {
        log.Fatal(err)
    }
    if res != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.GetQRCodeRequest ✔️ The request object to use for the request.
opts []operations.Option The options for this request.

Response

*string, error

Error Object Status Code Content Type
sdkerrors.BadRequest 400 application/json
sdkerrors.Unauthorized 401 application/json
sdkerrors.Forbidden 403 application/json
sdkerrors.NotFound 404 application/json
sdkerrors.Conflict 409 application/json
sdkerrors.InviteExpired 410 application/json
sdkerrors.UnprocessableEntity 422 application/json
sdkerrors.RateLimitExceeded 429 application/json
sdkerrors.InternalServerError 500 application/json
sdkerrors.SDKError 4xx-5xx /