Documentation
¶
Overview ¶
Job creation and management (submit, list, get, cancel, download)
Index ¶
- type Client
- func (c *Client) CancelJob(ctx context.Context, request *api.CancelJobRequest, ...) (*api.CancelJobResponse, error)
- func (c *Client) GetJob(ctx context.Context, request *api.GetJobRequest, opts ...option.RequestOption) (*api.GetJobResponse, error)
- func (c *Client) GetJobTypeSchema(ctx context.Context, request *api.GetJobTypeSchemaRequest, ...) (*api.GetJobTypeSchemaResponse, error)
- func (c *Client) ListJobTypes(ctx context.Context, opts ...option.RequestOption) (*api.ListJobTypesResponse, error)
- func (c *Client) ListJobs(ctx context.Context, request *api.ListJobsRequest, ...) (*api.ListJobsResponse, error)
- func (c *Client) SubmitJob(ctx context.Context, request *api.SubmitJobRequest, ...) (*api.SubmitJobResponse, error)
- type RawClient
- func (r *RawClient) CancelJob(ctx context.Context, request *api.CancelJobRequest, ...) (*core.Response[*api.CancelJobResponse], error)
- func (r *RawClient) GetJob(ctx context.Context, request *api.GetJobRequest, opts ...option.RequestOption) (*core.Response[*api.GetJobResponse], error)
- func (r *RawClient) GetJobTypeSchema(ctx context.Context, request *api.GetJobTypeSchemaRequest, ...) (*core.Response[*api.GetJobTypeSchemaResponse], error)
- func (r *RawClient) ListJobTypes(ctx context.Context, opts ...option.RequestOption) (*core.Response[*api.ListJobTypesResponse], error)
- func (r *RawClient) ListJobs(ctx context.Context, request *api.ListJobsRequest, ...) (*core.Response[*api.ListJobsResponse], error)
- func (r *RawClient) SubmitJob(ctx context.Context, request *api.SubmitJobRequest, ...) (*core.Response[*api.SubmitJobResponse], error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
WithRawResponse *RawClient
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(options *core.RequestOptions) *Client
func (*Client) CancelJob ¶
func (c *Client) CancelJob( ctx context.Context, request *api.CancelJobRequest, opts ...option.RequestOption, ) (*api.CancelJobResponse, error)
Cancel a waiting, dispatched or running job. A running job's upstream execution is stopped too. Completed, failed or already cancelled jobs cannot be cancelled.
Example:
request := &api.CancelJobRequest{
ID: "id",
}
_, err := client.Jobs.CancelJob(
context.TODO(),
request,
)
func (*Client) GetJob ¶
func (c *Client) GetJob( ctx context.Context, request *api.GetJobRequest, opts ...option.RequestOption, ) (*api.GetJobResponse, error)
Retrieve details of a specific job. If the job is complete with an output, includes a download URL.
Example:
request := &api.GetJobRequest{
ID: "id",
}
_, err := client.Jobs.GetJob(
context.TODO(),
request,
)
func (*Client) GetJobTypeSchema ¶
func (c *Client) GetJobTypeSchema( ctx context.Context, request *api.GetJobTypeSchemaRequest, opts ...option.RequestOption, ) (*api.GetJobTypeSchemaResponse, error)
Get connector-neutral parameter field descriptors for a single active job type. Returns flat typed fields (string, number, boolean, options, or json for nested params) plus the raw JSON Schema for advanced consumers. Used by the no-code connectors to render dynamic forms. Public — no credential required.
Example:
request := &api.GetJobTypeSchemaRequest{
Type: "type",
}
_, err := client.Jobs.GetJobTypeSchema(
context.TODO(),
request,
)
func (*Client) ListJobTypes ¶
func (c *Client) ListJobTypes( ctx context.Context, opts ...option.RequestOption, ) (*api.ListJobTypesResponse, error)
List all available job types with their capabilities, cost models, and required inputs. Public — no credential required.
Example:
_, err := client.Jobs.ListJobTypes(
context.TODO(),
)
func (*Client) ListJobs ¶
func (c *Client) ListJobs( ctx context.Context, request *api.ListJobsRequest, opts ...option.RequestOption, ) (*api.ListJobsResponse, error)
List jobs for the authenticated organization. Supports filtering by status and type, with pagination.
Example:
request := &api.ListJobsRequest{
Limit: api.Int(
50,
),
Offset: api.Int(
0,
),
}
_, err := client.Jobs.ListJobs(
context.TODO(),
request,
)
func (*Client) SubmitJob ¶
func (c *Client) SubmitJob( ctx context.Context, request *api.SubmitJobRequest, opts ...option.RequestOption, ) (*api.SubmitJobResponse, error)
Create a new media processing job. Specify the job type, input files, and processing parameters. Use GET /jobs/types to discover available types.
Example:
request := &api.SubmitJobRequest{
SubmitFfprobeJob: &api.SubmitFfprobeJob{
Type: api.SubmitFfprobeJobTypeFfprobe,
Params: &api.FfprobeParams{
Command: "https://cdn.rendobar.com/assets/examples/sample.mp4",
},
},
}
_, err := client.Jobs.SubmitJob(
context.TODO(),
request,
)
type RawClient ¶
type RawClient struct {
// contains filtered or unexported fields
}
func NewRawClient ¶
func NewRawClient(options *core.RequestOptions) *RawClient
func (*RawClient) CancelJob ¶
func (r *RawClient) CancelJob( ctx context.Context, request *api.CancelJobRequest, opts ...option.RequestOption, ) (*core.Response[*api.CancelJobResponse], error)
func (*RawClient) GetJob ¶
func (r *RawClient) GetJob( ctx context.Context, request *api.GetJobRequest, opts ...option.RequestOption, ) (*core.Response[*api.GetJobResponse], error)
func (*RawClient) GetJobTypeSchema ¶
func (r *RawClient) GetJobTypeSchema( ctx context.Context, request *api.GetJobTypeSchemaRequest, opts ...option.RequestOption, ) (*core.Response[*api.GetJobTypeSchemaResponse], error)
func (*RawClient) ListJobTypes ¶
func (r *RawClient) ListJobTypes( ctx context.Context, opts ...option.RequestOption, ) (*core.Response[*api.ListJobTypesResponse], error)
func (*RawClient) ListJobs ¶
func (r *RawClient) ListJobs( ctx context.Context, request *api.ListJobsRequest, opts ...option.RequestOption, ) (*core.Response[*api.ListJobsResponse], error)
func (*RawClient) SubmitJob ¶
func (r *RawClient) SubmitJob( ctx context.Context, request *api.SubmitJobRequest, opts ...option.RequestOption, ) (*core.Response[*api.SubmitJobResponse], error)