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

134 lines
2.6 KiB
Markdown

# flamencoManager.JobsApi
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**fetchJob**](JobsApi.md#fetchJob) | **GET** /api/jobs/{job_id} | Fetch info about the job.
[**getJobTypes**](JobsApi.md#getJobTypes) | **GET** /api/jobs/types | Get list of job types and their parameters.
[**submitJob**](JobsApi.md#submitJob) | **POST** /api/jobs | Submit a new job for Flamenco Manager to execute.
## fetchJob
> Job fetchJob(jobId)
Fetch info about the job.
### Example
```javascript
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**](Job.md)
### 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
```javascript
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**](AvailableJobTypes.md)
### 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
```javascript
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**](SubmittedJob.md)| Job to submit |
### Return type
[**Job**](Job.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json