Skip to content

Commit

Permalink
Generate 2020.11
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-swu committed Nov 13, 2020
1 parent 79de2fd commit 7ab6c77
Show file tree
Hide file tree
Showing 26 changed files with 268 additions and 122 deletions.
1 change: 1 addition & 0 deletions docs/CompiledRead.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**replyTo** | **String** | Reply-To address | [optional]
**subject** | **Blob** | Base64 encoded template subject line | [optional]
**html** | **Blob** | Base64 encoded template HTML body | [optional]
**ampHtml** | **Blob** | Base64 encoded template AMP body | [optional]
**text** | **Blob** | Base64 encoded template text body | [optional]


42 changes: 21 additions & 21 deletions docs/DraftsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Bearer.apiKey = 'YOUR API KEY';
let apiInstance = new DyspatchClient.DraftsApi();
let draftId = "draftId_example"; // String | A draft ID
let languageId = "languageId_example"; // String | A language ID (eg: en-US)
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
apiInstance.deleteLocalization(draftId, languageId, accept).then(() => {
console.log('API called successfully.');
}, (error) => {
Expand All @@ -53,7 +53,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**draftId** | **String**| A draft ID |
**languageId** | **String**| A language ID (eg: en-US) |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |

### Return type

Expand Down Expand Up @@ -91,7 +91,7 @@ Bearer.apiKey = 'YOUR API KEY';
let apiInstance = new DyspatchClient.DraftsApi();
let draftId = "draftId_example"; // String | A draft ID
let targetLanguage = "targetLanguage_example"; // String | The type of templating language to compile as. Should only be used for visual templates.
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
apiInstance.getDraftById(draftId, targetLanguage, accept).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
Expand All @@ -107,7 +107,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**draftId** | **String**| A draft ID |
**targetLanguage** | **String**| The type of templating language to compile as. Should only be used for visual templates. |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |

### Return type

Expand All @@ -120,7 +120,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/vnd.dyspatch.2020.04+json, */*
- **Accept**: application/vnd.dyspatch.2020.11+json, */*


## getDraftLocalizationKeys
Expand All @@ -129,7 +129,7 @@ Name | Type | Description | Notes
Get localization keys

Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2020.04+json` to get a JSON object, or `text/vnd.dyspatch.2020.04+x-gettext-translation` to get the POT file.
Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2020.11+json` to get a JSON object, or `text/vnd.dyspatch.2020.11+x-gettext-translation` to get the POT file.

### Example

Expand All @@ -144,7 +144,7 @@ Bearer.apiKey = 'YOUR API KEY';

let apiInstance = new DyspatchClient.DraftsApi();
let draftId = "draftId_example"; // String | A draft ID
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
apiInstance.getDraftLocalizationKeys(draftId, accept).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
Expand All @@ -159,7 +159,7 @@ apiInstance.getDraftLocalizationKeys(draftId, accept).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**draftId** | **String**| A draft ID |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |

### Return type

Expand All @@ -172,7 +172,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/vnd.dyspatch.2020.04+json, text/vnd.dyspatch.2020.04+x-gettext-translation
- **Accept**: application/vnd.dyspatch.2020.11+json, text/vnd.dyspatch.2020.11+x-gettext-translation


## getDrafts
Expand All @@ -195,7 +195,7 @@ Bearer.apiKey = 'YOUR API KEY';
//Bearer.apiKeyPrefix = 'Token';

let apiInstance = new DyspatchClient.DraftsApi();
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
let opts = {
'cursor': "cursor_example", // String | A cursor value used to retrieve a specific page from a paginated result set.
'status': "status_example" // String | Filter the list of drafts by a particular status
Expand All @@ -213,7 +213,7 @@ apiInstance.getDrafts(accept, opts).then((data) => {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |
**cursor** | **String**| A cursor value used to retrieve a specific page from a paginated result set. | [optional]
**status** | **String**| Filter the list of drafts by a particular status | [optional]

Expand All @@ -228,7 +228,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/vnd.dyspatch.2020.04+json, */*
- **Accept**: application/vnd.dyspatch.2020.11+json, */*


## getLocalizationForDraft
Expand All @@ -252,7 +252,7 @@ Bearer.apiKey = 'YOUR API KEY';

let apiInstance = new DyspatchClient.DraftsApi();
let draftId = "draftId_example"; // String | A draft ID
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
apiInstance.getLocalizationForDraft(draftId, accept).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
Expand All @@ -267,7 +267,7 @@ apiInstance.getLocalizationForDraft(draftId, accept).then((data) => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**draftId** | **String**| A draft ID |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |

### Return type

Expand All @@ -280,7 +280,7 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/vnd.dyspatch.2020.04+json
- **Accept**: application/vnd.dyspatch.2020.11+json


## saveLocalization
Expand All @@ -305,7 +305,7 @@ Bearer.apiKey = 'YOUR API KEY';
let apiInstance = new DyspatchClient.DraftsApi();
let draftId = "draftId_example"; // String | A draft ID
let languageId = "languageId_example"; // String | A language ID (eg: en-US)
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
let inlineObject = new DyspatchClient.InlineObject(); // InlineObject |
apiInstance.saveLocalization(draftId, languageId, accept, inlineObject).then(() => {
console.log('API called successfully.');
Expand All @@ -322,7 +322,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**draftId** | **String**| A draft ID |
**languageId** | **String**| A language ID (eg: en-US) |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |
**inlineObject** | [**InlineObject**](InlineObject.md)| |

### Return type
Expand Down Expand Up @@ -361,7 +361,7 @@ Bearer.apiKey = 'YOUR API KEY';
let apiInstance = new DyspatchClient.DraftsApi();
let draftId = "draftId_example"; // String | A draft ID
let languageId = "languageId_example"; // String | A language ID (eg: en-US)
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
let requestBody = {key: "null"}; // {String: String} |
apiInstance.setTranslation(draftId, languageId, accept, requestBody).then(() => {
console.log('API called successfully.');
Expand All @@ -378,7 +378,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**draftId** | **String**| A draft ID |
**languageId** | **String**| A language ID (eg: en-US) |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |
**requestBody** | [**{String: String}**](String.md)| |

### Return type
Expand Down Expand Up @@ -416,7 +416,7 @@ Bearer.apiKey = 'YOUR API KEY';

let apiInstance = new DyspatchClient.DraftsApi();
let draftId = "draftId_example"; // String | A draft ID
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
apiInstance.submitDraftForApproval(draftId, accept).then(() => {
console.log('API called successfully.');
}, (error) => {
Expand All @@ -431,7 +431,7 @@ apiInstance.submitDraftForApproval(draftId, accept).then(() => {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**draftId** | **String**| A draft ID |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |

### Return type

Expand Down
73 changes: 65 additions & 8 deletions docs/LocalizationsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,74 @@ All URIs are relative to *https://api.dyspatch.io*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getLocalizationById**](LocalizationsApi.md#getLocalizationById) | **GET** /localizations/{localizationId} | Get Localization Object by ID
[**getDraftLocalizationById**](LocalizationsApi.md#getDraftLocalizationById) | **GET** /localizations/{localizationId}/drafts/{draftId} | Get Draft Localization Object by ID
[**getPublishedLocalizationById**](LocalizationsApi.md#getPublishedLocalizationById) | **GET** /localizations/{localizationId} | Get Localization Object by ID



## getLocalizationById
## getDraftLocalizationById

> LocalizationRead getLocalizationById(localizationId, targetLanguage, accept)
> LocalizationRead getDraftLocalizationById(draftId, localizationId, targetLanguage, accept)
Get Draft Localization Object by ID

Returns a specific localization object of the matching draft with a matching localization ID

### Example

```javascript
import DyspatchClient from 'dyspatch-client';
let defaultClient = DyspatchClient.ApiClient.instance;
// Configure API key authorization: Bearer
let Bearer = defaultClient.authentications['Bearer'];
Bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Bearer.apiKeyPrefix = 'Token';

let apiInstance = new DyspatchClient.LocalizationsApi();
let draftId = "draftId_example"; // String | A draft ID
let localizationId = "localizationId_example"; // String | A localization ID
let targetLanguage = "targetLanguage_example"; // String | The type of templating language to compile as. Should only be used for visual templates.
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
apiInstance.getDraftLocalizationById(draftId, localizationId, targetLanguage, accept).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});

```

### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**draftId** | **String**| A draft ID |
**localizationId** | **String**| A localization ID |
**targetLanguage** | **String**| The type of templating language to compile as. Should only be used for visual templates. |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |

### Return type

[**LocalizationRead**](LocalizationRead.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/vnd.dyspatch.2020.11+json, */*


## getPublishedLocalizationById

> LocalizationRead getPublishedLocalizationById(localizationId, targetLanguage, accept)
Get Localization Object by ID

Returns a specific localization object with a matching ID
Returns the published content associated with the localization of the matching ID

### Example

Expand All @@ -30,8 +87,8 @@ Bearer.apiKey = 'YOUR API KEY';
let apiInstance = new DyspatchClient.LocalizationsApi();
let localizationId = "localizationId_example"; // String | A localization ID
let targetLanguage = "targetLanguage_example"; // String | The type of templating language to compile as. Should only be used for visual templates.
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
apiInstance.getLocalizationById(localizationId, targetLanguage, accept).then((data) => {
let accept = "accept_example"; // String | A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\"
apiInstance.getPublishedLocalizationById(localizationId, targetLanguage, accept).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
Expand All @@ -46,7 +103,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**localizationId** | **String**| A localization ID |
**targetLanguage** | **String**| The type of templating language to compile as. Should only be used for visual templates. |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\" |
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2020.11\", set the value to \"application/vnd.dyspatch.2020.11+json\" |

### Return type

Expand All @@ -59,5 +116,5 @@ Name | Type | Description | Notes
### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/vnd.dyspatch.2020.04+json, */*
- **Accept**: application/vnd.dyspatch.2020.11+json, */*

Loading

0 comments on commit 7ab6c77

Please sign in to comment.