api

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client handles HTTP requests to Payloop API.

func NewClient

func NewClient(baseURL, apiKey string, timeout time.Duration) *Client

NewClient creates a new API client.

type InvocationClient

type InvocationClient struct {
	// contains filtered or unexported fields
}

InvocationClient manages invocation operations.

func (*InvocationClient) Attribution

func (i *InvocationClient) Attribution(parentID, parentName string, subsidiaryID, subsidiaryName *string) *InvocationClient

Attribution sets attribution filter for summary queries. Returns a new client with attribution set.

func (*InvocationClient) Summary

func (i *InvocationClient) Summary(ctx context.Context, opts SummaryOptions) (map[string]interface{}, error)

Summary retrieves invocation summary for a workflow.

type SummaryOptions

type SummaryOptions struct {
	DateStart time.Time
	DateEnd   *time.Time
}

SummaryOptions configures a summary request.

type Workflow

type Workflow struct {
	UUID  string `json:"uuid"`
	Label string `json:"label"`
}

Workflow represents a Payloop workflow.

type WorkflowClient

type WorkflowClient struct {
	// contains filtered or unexported fields
}

WorkflowClient manages a single workflow.

func NewWorkflowClient

func NewWorkflowClient(uuid string, api *Client) *WorkflowClient

NewWorkflowClient creates a new workflow client.

func (*WorkflowClient) Invocation

func (w *WorkflowClient) Invocation() *InvocationClient

Invocation returns a client for invocation operations.

func (*WorkflowClient) Update

func (w *WorkflowClient) Update(ctx context.Context, label string) error

Update updates a workflow's label.

type WorkflowsClient

type WorkflowsClient struct {
	// contains filtered or unexported fields
}

WorkflowsClient manages multiple workflows.

func NewWorkflowsClient

func NewWorkflowsClient(api *Client) *WorkflowsClient

NewWorkflowsClient creates a new workflows client.

func (*WorkflowsClient) List

func (w *WorkflowsClient) List(ctx context.Context) ([]Workflow, error)

List returns all workflows.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL