open-index/open-npm huggingface dataset:
npm package: @kassellabs/corellia-api
Description: Corellia's External API to render After Effects Videos
Author: Kassel Labs Team
Latest version: 0.0.4
Deprecated: A new version is available on @videomatik/api

# Corellia API

This module provides easy access to Corellia's API to request and manage video rendering.

# Installation

```bash
npm i --save @kassellabs/corellia-api
```

# Usage

First you should get your Corellia API **Client ID** and **Client Secret**, then
you can start using this project by instantiating the main class

```javascript
import CorelliaAPI from '@kassellabs/corellia-api';

const api = new CorelliaAPI({
  clientId: '< your corellia client id >',
  clientSecret: '< your corellia client secret >',
});
```
You can also specify a different API endpoint via `host` param on the constructor.
After that you can start calling the main methods:

## requestNewVideo(customJSON)

Requests a new video to be rendered based on a custom JSON

```javascript
const videoRequest = await api.requestNewVideo(customJSON);
// Example:
//
// {
//   "lastModified":"2020-01-24T18:08:13.654Z",
//   "userId":"XXXX",
//   "actions":[
//     ...,
//   ],
//   "templateId":"my-template-id",
//   "customJSON":{
//     "videoURL":"<my-video-url>",
//     "timeToBeContinued":9.731636028610229,
//     "videoStartAt":0,
//     "videoEndAt":14.731636028610229
//   },
//   "renderJob":{
//     "state":"started",
//     "downloadURL":null
//   },
//   "id":"IIIIIIIIIIIIII"
// }
```

## getAllVideoRequests()

Retrieve a list of all requestd videos so far

```javascript
const videoRequests = await api.getAllVideoRequests(customJSON);
// Example:
//
// [{
//   "lastModified":"2020-01-24T18:08:13.654Z",
//   "userId":"XXXX",
//   "actions":[
//     ...,
//   ],
//   "templateId":"my-template-id",
//   "customJSON":{
//     "videoURL":"<my-video-url>",
//     "timeToBeContinued":9.731636028610229,
//     "videoStartAt":0,
//     "videoEndAt":14.731636028610229
//   },
//   "renderJob":{
//     "state":"started",
//     "downloadURL":null
//   },
//   "id":"IIIIIIIIIIIIII"
// }, ...]
```

## getVideoRequest(id)

Retrieve the status of a already created videoRequest

```javascript
const videoRequest = await api.getVideoRequest('<your-video-request-id>');
// Example:
//
// {
//   "lastModified":"2020-01-24T18:08:13.654Z",
//   "userId":"XXXX",
//   "actions":[
//     ...,
//   ],
//   "templateId":"my-template-id",
//   "customJSON":{
//     "videoURL":"<my-video-url>",
//     "timeToBeContinued":9.731636028610229,
//     "videoStartAt":0,
//     "videoEndAt":14.731636028610229
//   },
//   "renderJob":{
//     "state":"started",
//     "downloadURL":null
//   },
//   "id":"IIIIIIIIIIIIII"
// }
```

## deleteVideoRequest(id)

Remove a specific video request

```javascript
const { success } = await api.deleteVideoRequest('<your-video-request-id>');
// success === true -> deleted
// success === false -> not deleted
```
npm package: @kassellabs/mail-server-api
Description: Kassel Labs mailing api client
Author: Kassel Labs Team
Latest version: 0.1.0

# Kassel Labs Mail Server API

This is a client made to make Kassel Labs mailing system easier

# How to Use

First you need to initialize your client with your credentials

```javascript
const MailServerApi = require('@kassellabs/mail-server-api');

const mailApi = MailServerApi({
  url: '<the url from your broker goes here>',
});
```

Then you're ready to send e-mails

# Sending Common HTML or Text e-mails

To send e-mails, you can use the basic mailing API

```javascript
mailApi.sendEmail({
  from: 'foo@kassellabs.io', // Must be @kassellabs.io
  to: 'foo@gmail.com' // can also be an array of strings,
  replyTo: 'no-reply@kassellabs.io', // optional, defaults to "support@kassellabs.io"
  subject: 'Just wanna say Hi', // optional

  html: '<div>Hi</div>',
  // or
  text: 'Hi',
});
```

# Sending Template E-mails

Sending template e-mails will enable you to send templates e-mails that are
already included on the `mail-server`, check its code to see them.

```javascript
mailApi.sendTemplateEmail({
  template: 'video-is-ready' // Must be one of the available templates within mail-server
  to: 'foo@gmail.com', // can also be an array of strings
  replyTo: 'no-reply@kassellabs.io', // optional, defaults to "support@kassellabs.io"

  // This data is related to the template you'll send, you'll have to check
  // which variables your template accepts to know what you can send on its
  // context
  context: {
    name: 'John Doe',
    code: 'JHND',
    ...
  },
});
```