lilt-node

Lilt API Binding for Javascript

View the Project on GitHub lilt/lilt-node

LiltNode.CreateApi

All URIs are relative to https://api.lilt.com

Method HTTP request Description
deleteLiltCreateContent DELETE /v2/create/{contentId} Delete Lilt Create content
generateLiltCreateContent POST /v2/create Generate new Lilt Create content
getLiltCreateById GET /v2/create/{contentId} Get Lilt Create content by ID.
getLiltCreateContent GET /v2/create Get Lilt Create content
getLiltCreatePreferences GET /v2/create/preferences Get Lilt Create preferences
regenerateLiltCreateContent GET /v2/create/{contentId}/create Regenerate Lilt Create content
signLiltCreateTerms POST /v2/create/terms-and-conditions Sign the Lilt Create terms and conditions
updateLiltCreateContent PUT /v2/create/{contentId} Update Lilt Create content
updateLiltCreatePreferences PUT /v2/create/preferences Update Lilt Create preferences

deleteLiltCreateContent

InlineResponse200 deleteLiltCreateContent(contentId)

Delete Lilt Create content

Delete a piece of Lilt Create content. Example CURL: ```bash curl -X DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

let apiInstance = new LiltNode.CreateApi();
let contentId = 56; // Number | The content ID.
apiInstance.deleteLiltCreateContent(contentId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
contentId Number The content ID.  

Return type

InlineResponse200

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

generateLiltCreateContent

generateLiltCreateContent(templateParams)

Generate new Lilt Create content

Generate new Lilt Create content with the given parameters. Example CURL: ```bash curl -X POST 'https://api.lilt.com/v2/create?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{ \"language\":\"en-US\", \"template\":\"blog-post\", \"templateParams\":{ \"contentLength\":\"100\", \"language\":\"en-US\", \"sections\":[], \"summary\":\"a blog post about hiking\" }, \"preferences\":{\"tone\":\"formal\",\"styleguide\":\"\"} }' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

let apiInstance = new LiltNode.CreateApi();
let templateParams = new LiltNode.LiltCreateContentRequest(); // LiltCreateContentRequest | Input parameters that determine what content will be generated. 
apiInstance.generateLiltCreateContent(templateParams).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
templateParams LiltCreateContentRequest Input parameters that determine what content will be generated.  

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

getLiltCreateById

LiltCreateContent getLiltCreateById(contentId)

Get Lilt Create content by ID.

Get Lilt Create content by ID. Example CURL: ```bash curl -X GET 'https://api.lilt.com/v2/create/1234?key=API_KEY' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

let apiInstance = new LiltNode.CreateApi();
let contentId = 56; // Number | The content ID.
apiInstance.getLiltCreateById(contentId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
contentId Number The content ID.  

Return type

LiltCreateContent

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

getLiltCreateContent

GetLiltCreateContentResponse getLiltCreateContent()

Get Lilt Create content

Get a list of all content that has been generated by Lilt Create. Example CURL: ```bash curl -X GET 'https://api.lilt.com/v2/create?key=API_KEY' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

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

Parameters

This endpoint does not need any parameter.

Return type

GetLiltCreateContentResponse

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

getLiltCreatePreferences

getLiltCreatePreferences()

Get Lilt Create preferences

Get the stored preferences for Lilt Create. Example CURL: ```bash curl -X POST 'https://api.lilt.com/v2/create/preferences?key=API_KEY' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

let apiInstance = new LiltNode.CreateApi();
apiInstance.getLiltCreatePreferences().then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

regenerateLiltCreateContent

regenerateLiltCreateContent(contentId)

Regenerate Lilt Create content

Regenerate the given piece of content with the current parameters. Example CURL: ```bash curl -X GET 'https://api.lilt.com/v2/create/1234/create?key=API_KEY' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

let apiInstance = new LiltNode.CreateApi();
let contentId = 56; // Number | The content ID.
apiInstance.regenerateLiltCreateContent(contentId).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
contentId Number The content ID.  

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

signLiltCreateTerms

SignLiltCreateTermsResponse signLiltCreateTerms(signedAgreement)

Sign the Lilt Create terms and conditions

Lilt Create requires that the terms and conditions are signed first before using it. The terms and conditions can be signed by using this endpoint. Example CURL: ```bash curl -X POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{\"signedAgreement\": true}' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

let apiInstance = new LiltNode.CreateApi();
let signedAgreement = new LiltNode.CreateConverterConfigParameters(); // CreateConverterConfigParameters | 
apiInstance.signLiltCreateTerms(signedAgreement).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
signedAgreement CreateConverterConfigParameters    

Return type

SignLiltCreateTermsResponse

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

updateLiltCreateContent

LiltCreateContent updateLiltCreateContent(contentId, opts)

Update Lilt Create content

Update a piece of Lilt Create content. Example CURL: ```bash curl -X PUT 'https://api.lilt.com/v2/create/1234?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{\"language\":\"de-DE\"}' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

let apiInstance = new LiltNode.CreateApi();
let contentId = 56; // Number | The content ID.
let opts = {
  'body': new LiltNode.LiltCreateContent() // LiltCreateContent | 
};
apiInstance.updateLiltCreateContent(contentId, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
contentId Number The content ID.  
body LiltCreateContent   [optional]

Return type

LiltCreateContent

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

updateLiltCreatePreferences

updateLiltCreatePreferences(opts)

Update Lilt Create preferences

Update the stored preferences for Lilt Create. Example CURL: ```bash curl -X PUT 'https://api.lilt.com/v2/create/preferences?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{\"tone\": \"formal\", \"styleguide\": \"\"}' ```

Example

import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';

let apiInstance = new LiltNode.CreateApi();
let opts = {
  'styleguide': new LiltNode.LiltCreateContent() // LiltCreateContent | Which styleguide to use.
};
apiInstance.updateLiltCreatePreferences(opts).then(() => {
  console.log('API called successfully.');
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
styleguide LiltCreateContent Which styleguide to use. [optional]

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers