Flamenco/web/manager-api
2022-04-08 12:04:34 +02:00
..
docs OAPI: regenerate OpenAPI code 2022-04-08 12:04:34 +02:00
src OAPI: regenerate OpenAPI code 2022-04-08 12:04:34 +02:00
.babelrc OAPI: Add generated JavaScript API client 2022-04-01 16:40:54 +02:00
.gitignore OAPI: Add generated JavaScript API client 2022-04-01 16:40:54 +02:00
.openapi-generator-ignore OAPI: Add generated JavaScript API client 2022-04-01 16:40:54 +02:00
.travis.yml OAPI: Add generated JavaScript API client 2022-04-01 16:40:54 +02:00
git_push.sh OAPI: Add generated JavaScript API client 2022-04-01 16:40:54 +02:00
mocha.opts OAPI: Add generated JavaScript API client 2022-04-01 16:40:54 +02:00
package-lock.json OAPI: regenerate OpenAPI code 2022-04-08 12:04:34 +02:00
package.json OAPI: Add generated JavaScript API client 2022-04-01 16:40:54 +02:00
README.md Job status change system for SocketIO broadcasts 2022-04-05 15:52:55 +02:00

flamenco-manager

flamencoManager - JavaScript client for flamenco-manager Render Farm manager API This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 0.0.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://flamenco.io/

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install flamenco-manager --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your flamenco-manager from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var flamencoManager = require('flamenco-manager');


var api = new flamencoManager.JobsApi()
var job_id = "job_id_example"; // {String} 
api.fetchJob(job_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});


Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
flamencoManager.JobsApi fetchJob GET /api/jobs/{job_id} Fetch info about the job.
flamencoManager.JobsApi getJobTypes GET /api/jobs/types Get list of job types and their parameters.
flamencoManager.JobsApi queryJobs POST /api/jobs/query Fetch list of jobs.
flamencoManager.JobsApi submitJob POST /api/jobs Submit a new job for Flamenco Manager to execute.
flamencoManager.MetaApi getConfiguration GET /api/configuration Get the configuration of this Manager.
flamencoManager.MetaApi getVersion GET /api/version Get the Flamenco version of this Manager
flamencoManager.ShamanApi shamanCheckout POST /shaman/checkout/create Create a directory, and symlink the required files into it. The files must all have been uploaded to Shaman before calling this endpoint.
flamencoManager.ShamanApi shamanCheckoutRequirements POST /shaman/checkout/requirements Checks a Shaman Requirements file, and reports which files are unknown.
flamencoManager.ShamanApi shamanFileStore POST /shaman/files/{checksum}/{filesize} Store a new file on the Shaman server. Note that the Shaman server can forcibly close the HTTP connection when another client finishes uploading the exact same file, to prevent double uploads. The file's contents should be sent in the request body.
flamencoManager.ShamanApi shamanFileStoreCheck GET /shaman/files/{checksum}/{filesize} Check the status of a file on the Shaman server.
flamencoManager.WorkerApi registerWorker POST /api/worker/register-worker Register a new worker
flamencoManager.WorkerApi scheduleTask POST /api/worker/task Obtain a new task to execute
flamencoManager.WorkerApi signOff POST /api/worker/sign-off Mark the worker as offline
flamencoManager.WorkerApi signOn POST /api/worker/sign-on Authenticate & sign in the worker.
flamencoManager.WorkerApi taskUpdate POST /api/worker/task/{task_id} Update the task, typically to indicate progress, completion, or failure.
flamencoManager.WorkerApi workerState GET /api/worker/state
flamencoManager.WorkerApi workerStateChanged POST /api/worker/state-changed Worker changed state. This could be as acknowledgement of a Manager-requested state change, or in response to worker-local signals.

Documentation for Models

Documentation for Authorization

worker_auth

  • Type: HTTP basic authentication