Sybren A. Stüvel e990603311 OAPI: Add generated JavaScript API client
This adds a JS client for the OAPI interface, and introduces the SocketIO
stuff into Flamenco Manager itself.

To build & run:
- in `web/manager-api` run `npm install`
- in `web/manager-api` run `npm link`
- in `web/app` run `npm install`
- in `web/app` run `npm link flamenco-manager`
- in `web/app` run `yarn serve`

This may not be a complete list, but at least some of those steps are
necessary.
2022-04-01 16:40:54 +02:00

2.6 KiB

flamencoManager.JobsApi

All URIs are relative to http://localhost

Method HTTP request Description
fetchJob GET /api/jobs/{job_id} Fetch info about the job.
getJobTypes GET /api/jobs/types Get list of job types and their parameters.
submitJob POST /api/jobs Submit a new job for Flamenco Manager to execute.

fetchJob

Job fetchJob(jobId)

Fetch info about the job.

Example

import flamencoManager from 'flamenco-manager';

let apiInstance = new flamencoManager.JobsApi();
let jobId = "jobId_example"; // String | 
apiInstance.fetchJob(jobId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
jobId String

Return type

Job

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getJobTypes

AvailableJobTypes getJobTypes()

Get list of job types and their parameters.

Example

import flamencoManager from 'flamenco-manager';

let apiInstance = new flamencoManager.JobsApi();
apiInstance.getJobTypes().then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

AvailableJobTypes

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

submitJob

Job submitJob(submittedJob)

Submit a new job for Flamenco Manager to execute.

Example

import flamencoManager from 'flamenco-manager';

let apiInstance = new flamencoManager.JobsApi();
let submittedJob = new flamencoManager.SubmittedJob(); // SubmittedJob | Job to submit
apiInstance.submitJob(submittedJob).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
submittedJob SubmittedJob Job to submit

Return type

Job

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json