lilt-java

Lilt API binding for java

View the Project on GitHub lilt/lilt-java

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: ``` curl –X –request DELETE 'https://api.lilt.com/v2/create/1234?key=API_KEY' ```

Example

// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    Integer contentId = 56; // Integer | The content ID.
    try {
      InlineResponse200 result = apiInstance.deleteLiltCreateContent(contentId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#deleteLiltCreateContent");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentId Integer The content ID.  

Return type

InlineResponse200

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | The Delete Lilt Create Content Response. | - |

generateLiltCreateContent

generateLiltCreateContent(templateParams)

Generate new Lilt Create content

Generate new Lilt Create content with the given parameters. Example CURL: ``` curl –X –request 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 classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    LiltCreateContent templateParams = new LiltCreateContent(); // LiltCreateContent | Input parameters that determine what content will be generated. 
    try {
      apiInstance.generateLiltCreateContent(templateParams);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#generateLiltCreateContent");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

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

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response | - |

getLiltCreateById

LiltCreateContent getLiltCreateById(contentId)

Get Lilt Create content by ID.

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

Example

// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    Integer contentId = 56; // Integer | The content ID.
    try {
      LiltCreateContent result = apiInstance.getLiltCreateById(contentId);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#getLiltCreateById");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentId Integer The content ID.  

Return type

LiltCreateContent

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | The Lilt Create content. | - |

getLiltCreateContent

List<LiltCreateContent> getLiltCreateContent()

Get Lilt Create content

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

Example

// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    try {
      List<LiltCreateContent> result = apiInstance.getLiltCreateContent();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#getLiltCreateContent");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

List<LiltCreateContent>

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | An object with a documents next task Workflow metadata. | - |

getLiltCreatePreferences

getLiltCreatePreferences()

Get Lilt Create preferences

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

Example

// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    try {
      apiInstance.getLiltCreatePreferences();
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#getLiltCreatePreferences");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | An object describing the stored preferences. | - |

regenerateLiltCreateContent

regenerateLiltCreateContent(contentId)

Regenerate Lilt Create content

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

Example

// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    Integer contentId = 56; // Integer | The content ID.
    try {
      apiInstance.regenerateLiltCreateContent(contentId);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#regenerateLiltCreateContent");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentId Integer The content ID.  

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | An event stream produced by Server Side Events. The following events are supported. - message: an object with the newly generated text (e.g. {\"text\": \"hello\"}) - message: upon completion of events the string \"[DONE]\" will be emitted - fullcontent: an object containing the full response | - |

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: ``` curl –X –request POST 'https://api.lilt.com/v2/create/terms-and-conditions?key=API_KEY' \ –header 'Content-Type: application/json' \ –data-raw '{\"signedAgreement\": true}' ```

Example

// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    CreateConverterConfigParameters signedAgreement = new CreateConverterConfigParameters(); // CreateConverterConfigParameters | 
    try {
      SignLiltCreateTermsResponse result = apiInstance.signLiltCreateTerms(signedAgreement);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#signLiltCreateTerms");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
signedAgreement CreateConverterConfigParameters    

Return type

SignLiltCreateTermsResponse

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | An object indicating whether the agreement has been signed or not. | - |

updateLiltCreateContent

LiltCreateContent updateLiltCreateContent(contentId, body)

Update Lilt Create content

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

Example

// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    Integer contentId = 56; // Integer | The content ID.
    LiltCreateContent body = new LiltCreateContent(); // LiltCreateContent | 
    try {
      LiltCreateContent result = apiInstance.updateLiltCreateContent(contentId, body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#updateLiltCreateContent");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

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

Return type

LiltCreateContent

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | The updated Lilt Create content. | - |

updateLiltCreatePreferences

updateLiltCreatePreferences(styleguide)

Update Lilt Create preferences

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

Example

// Import classes:
import com.lilt.client.ApiClient;
import com.lilt.client.ApiException;
import com.lilt.client.Configuration;
import com.lilt.client.auth.*;
import com.lilt.client.models.*;
import com.lilt.client.api.CreateApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.lilt.com");
    
    // Configure API key authorization: ApiKeyAuth
    ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
    ApiKeyAuth.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //ApiKeyAuth.setApiKeyPrefix("Token");

    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    CreateApi apiInstance = new CreateApi(defaultClient);
    LiltCreateContent styleguide = new LiltCreateContent(); // LiltCreateContent | Which styleguide to use.
    try {
      apiInstance.updateLiltCreatePreferences(styleguide);
    } catch (ApiException e) {
      System.err.println("Exception when calling CreateApi#updateLiltCreatePreferences");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

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

Return type

null (empty response body)

Authorization

ApiKeyAuth, BasicAuth

HTTP request headers

HTTP response details

| Status code | Description | Response headers | |————-|————-|——————| 200 | The updated Lilt Create preferences. | - |