Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kassellabs/corellia-api

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kassellabs/corellia-api - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

dist/index.d.ts

8

dist/api.d.ts

@@ -1,2 +0,2 @@

import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
import { AxiosInstance, AxiosRequestConfig } from 'axios';
declare type CorelliaAPIContructorType = {

@@ -13,5 +13,5 @@ host?: string;

axios: AxiosInstance;
constructor({ host, clientId, clientSecret }: CorelliaAPIContructorType);
constructor({ host, clientId, clientSecret, }: CorelliaAPIContructorType);
renewAccessToken(): Promise<void>;
request(options: AxiosRequestConfig): Promise<AxiosResponse<any>>;
request(options: AxiosRequestConfig): Promise<import("axios").AxiosResponse<any>>;
getRequestData(options: AxiosRequestConfig): Promise<any>;

@@ -21,4 +21,4 @@ getAllVideoRequests(): Promise<any>;

deleteVideoRequest(id: string): Promise<any>;
requestNewVideo(customJSON: any): Promise<any>;
requestNewVideo(videoRequestBody: any): Promise<any>;
}
export {};

@@ -17,3 +17,3 @@ "use strict";

class CorelliaAPI {
constructor({ host = "https://api.corellia.kassellabs.io", clientId, clientSecret }) {
constructor({ host = 'https://api.corellia.kassellabs.io', clientId, clientSecret, }) {
this.host = host;

@@ -26,3 +26,3 @@ this.clientId = clientId;

headers: {
"Content-Type": "application/json"
'Content-Type': 'application/json',
},

@@ -35,3 +35,3 @@ transformRequest: (data, headers) => {

return JSON.stringify(data);
}
},
});

@@ -42,8 +42,8 @@ }

const response = yield this.axios({
url: "/login",
method: "POST",
url: '/login',
method: 'POST',
data: {
clientId: this.clientId,
clientSecret: this.clientSecret
}
clientSecret: this.clientSecret,
},
});

@@ -83,3 +83,3 @@ this.currentAccessToken = response.data.access_token;

return this.getRequestData({
url: `/video-request`
url: '/video-request',
});

@@ -91,3 +91,3 @@ });

return this.getRequestData({
url: `/video-request/${id}`
url: `/video-request/${id}`,
});

@@ -100,12 +100,12 @@ });

url: `/video-request/${id}`,
method: "DELETE"
method: 'DELETE',
});
});
}
requestNewVideo(customJSON) {
requestNewVideo(videoRequestBody) {
return __awaiter(this, void 0, void 0, function* () {
return this.getRequestData({
url: "/video-request",
method: "POST",
data: customJSON
url: '/video-request',
method: 'POST',
data: videoRequestBody,
});

@@ -112,0 +112,0 @@ });

{
"name": "@kassellabs/corellia-api",
"version": "0.0.2",
"version": "0.0.3",
"description": "Corellia's External API to render After Effects Videos",

@@ -11,4 +11,4 @@ "author": "Kassel Labs Team",

"scripts": {
"build": "tsc",
"test": "echo \"Error: run tests from root\" && exit 1"
"prepublish": "npm run build",
"build": "tsc"
},

@@ -22,4 +22,5 @@ "bugs": {

"devDependencies": {
"ts-node": "^8.6.2"
"ts-node": "^8.6.2",
"typescript": "^3.7.5"
}
}
# Corellia API
This module provides easy access to Corellia's API to render videos based on
After Effects Templates.
This module provides easy access to Corellia's API to request and manage video rendering.

@@ -9,3 +8,3 @@ # Installation

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

@@ -19,6 +18,5 @@

```javascript
import CorelliaAPI from '@corellia/api';
import CorelliaAPI from '@kassellabs/corellia-api';
const api = new CorelliaAPI({
host: 'https://my-own-api', // Defaults to the production server
clientId: '< your corellia client id >',

@@ -28,3 +26,3 @@ 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:

@@ -54,3 +52,2 @@

// "renderJob":{
// "id":"WWWWWWWWWWW",
// "state":"started",

@@ -85,3 +82,2 @@ // "downloadURL":null

// "renderJob":{
// "id":"WWWWWWWWWWW",
// "state":"started",

@@ -116,3 +112,2 @@ // "downloadURL":null

// "renderJob":{
// "id":"WWWWWWWWWWW",
// "state":"started",

@@ -119,0 +114,0 @@ // "downloadURL":null

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc