Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 5.8 KB

README.md

File metadata and controls

68 lines (51 loc) · 5.8 KB

ConnectorResources

(Connector.ConnectorResources)

Overview

Available Operations

  • Get - Get Connector Resource

Get

Get Connector Resource

Example Usage

package main

import(
	"context"
	"os"
	sdkgo "github.com/apideck-libraries/sdk-go"
	"github.com/apideck-libraries/sdk-go/models/components"
	"log"
)

func main() {
    ctx := context.Background()
    
    s := sdkgo.New(
        sdkgo.WithSecurity(os.Getenv("APIDECK_API_KEY")),
        sdkgo.WithConsumerID("test-consumer"),
        sdkgo.WithAppID("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX"),
    )

    res, err := s.Connector.ConnectorResources.Get(ctx, "<id>", "<id>", nil, components.UnifiedAPIIDCrm.ToPointer())
    if err != nil {
        log.Fatal(err)
    }
    if res.GetConnectorResourceResponse != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description Example
ctx context.Context ✔️ The context to use for the request.
id string ✔️ ID of the record you are acting upon.
resourceID string ✔️ ID of the resource you are acting upon.
appID *string The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
unifiedAPI *components.UnifiedAPIID Specify unified API for the connector resource. This is useful when a resource appears in multiple APIs crm
opts []operations.Option The options for this request.

Response

*operations.ConnectorConnectorResourcesOneResponse, error

Errors

Error Type Status Code Content Type
apierrors.UnauthorizedResponse 401 application/json
apierrors.PaymentRequiredResponse 402 application/json
apierrors.NotFoundResponse 404 application/json
apierrors.APIError 4XX, 5XX */*