Skip to content

Latest commit

 

History

History
159 lines (117 loc) · 10.1 KB

README.md

File metadata and controls

159 lines (117 loc) · 10.1 KB

Integration

(Integration)

Overview

Available Operations

GetUnifiedIntegrationAuth

Returns an authorization URL for the specified integration. Once a successful authorization occurs, a new connection is created.

Example Usage

package main

import(
	unifiedgosdk "github.com/unified-to/unified-go-sdk"
	"context"
	"github.com/unified-to/unified-go-sdk/pkg/models/operations"
	"log"
)

func main() {
    s := unifiedgosdk.New()

    ctx := context.Background()
    res, err := s.Integration.GetUnifiedIntegrationAuth(ctx, operations.GetUnifiedIntegrationAuthRequest{
        IntegrationType: "<value>",
        WorkspaceID: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Res != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.GetUnifiedIntegrationAuthResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*

ListUnifiedIntegrationWorkspaces

No authentication required as this is to be used by front-end interface

Example Usage

package main

import(
	unifiedgosdk "github.com/unified-to/unified-go-sdk"
	"context"
	"github.com/unified-to/unified-go-sdk/pkg/models/operations"
	"log"
)

func main() {
    s := unifiedgosdk.New()

    ctx := context.Background()
    res, err := s.Integration.ListUnifiedIntegrationWorkspaces(ctx, operations.ListUnifiedIntegrationWorkspacesRequest{
        WorkspaceID: "<value>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.Integrations != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.ListUnifiedIntegrationWorkspacesResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*

ListUnifiedIntegrations

Returns all integrations

Example Usage

package main

import(
	unifiedgosdk "github.com/unified-to/unified-go-sdk"
	"context"
	"github.com/unified-to/unified-go-sdk/pkg/models/operations"
	"log"
)

func main() {
    s := unifiedgosdk.New()

    ctx := context.Background()
    res, err := s.Integration.ListUnifiedIntegrations(ctx, operations.ListUnifiedIntegrationsRequest{})
    if err != nil {
        log.Fatal(err)
    }
    if res.Integrations != nil {
        // handle response
    }
}

Parameters

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

Response

*operations.ListUnifiedIntegrationsResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*