dyspatch_client 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +42 -16
- data/docs/APIError.md +1 -1
- data/docs/Body.md +8 -0
- data/docs/Body1.md +8 -0
- data/docs/CreatedAt.md +7 -0
- data/docs/DraftDescription.md +7 -0
- data/docs/DraftId.md +7 -0
- data/docs/DraftMetaRead.md +14 -0
- data/docs/DraftName.md +7 -0
- data/docs/DraftRead.md +15 -0
- data/docs/DraftUrl.md +7 -0
- data/docs/DraftsApi.md +467 -0
- data/docs/DraftsRead.md +9 -0
- data/docs/LanguageId.md +7 -0
- data/docs/LocalizationId.md +7 -0
- data/docs/LocalizationKeyRead.md +9 -0
- data/docs/LocalizationMetaRead.md +1 -0
- data/docs/LocalizationName.md +7 -0
- data/docs/LocalizationUrl.md +7 -0
- data/docs/LocalizationsApi.md +8 -11
- data/docs/TemplateDescription.md +7 -0
- data/docs/TemplateId.md +7 -0
- data/docs/TemplateMetaRead.md +1 -1
- data/docs/TemplateName.md +7 -0
- data/docs/TemplateRead.md +1 -1
- data/docs/TemplateUrl.md +7 -0
- data/docs/TemplatesApi.md +9 -14
- data/docs/TemplatesRead.md +1 -1
- data/docs/UpdatedAt.md +7 -0
- data/dyspatch_client.gemspec +8 -8
- data/lib/dyspatch_client.rb +24 -3
- data/lib/dyspatch_client/api/drafts_api.rb +479 -0
- data/lib/dyspatch_client/api/localizations_api.rb +23 -22
- data/lib/dyspatch_client/api/templates_api.rb +25 -28
- data/lib/dyspatch_client/api_client.rb +11 -11
- data/lib/dyspatch_client/api_error.rb +3 -3
- data/lib/dyspatch_client/configuration.rb +4 -4
- data/lib/dyspatch_client/models/api_error.rb +11 -15
- data/lib/dyspatch_client/models/body.rb +183 -0
- data/lib/dyspatch_client/models/body_1.rb +183 -0
- data/lib/dyspatch_client/models/compiled_read.rb +14 -22
- data/lib/dyspatch_client/models/created_at.rb +175 -0
- data/lib/dyspatch_client/models/cursor.rb +8 -12
- data/lib/dyspatch_client/models/draft_description.rb +175 -0
- data/lib/dyspatch_client/models/draft_id.rb +175 -0
- data/lib/dyspatch_client/models/draft_meta_read.rb +244 -0
- data/lib/dyspatch_client/models/draft_name.rb +175 -0
- data/lib/dyspatch_client/models/draft_read.rb +255 -0
- data/lib/dyspatch_client/models/draft_url.rb +175 -0
- data/lib/dyspatch_client/models/drafts_read.rb +196 -0
- data/lib/dyspatch_client/models/language_id.rb +175 -0
- data/lib/dyspatch_client/models/localization_id.rb +175 -0
- data/lib/dyspatch_client/models/localization_key_read.rb +192 -0
- data/lib/dyspatch_client/models/localization_meta_read.rb +20 -15
- data/lib/dyspatch_client/models/localization_name.rb +175 -0
- data/lib/dyspatch_client/models/localization_read.rb +8 -13
- data/lib/dyspatch_client/models/localization_url.rb +175 -0
- data/lib/dyspatch_client/models/template_description.rb +175 -0
- data/lib/dyspatch_client/models/template_id.rb +175 -0
- data/lib/dyspatch_client/models/template_meta_read.rb +8 -13
- data/lib/dyspatch_client/models/template_name.rb +175 -0
- data/lib/dyspatch_client/models/template_read.rb +8 -13
- data/lib/dyspatch_client/models/template_url.rb +175 -0
- data/lib/dyspatch_client/models/templates_read.rb +8 -13
- data/lib/dyspatch_client/models/updated_at.rb +175 -0
- data/lib/dyspatch_client/version.rb +4 -4
- data/spec/api/drafts_api_spec.rb +138 -0
- data/spec/api/localizations_api_spec.rb +6 -7
- data/spec/api/templates_api_spec.rb +6 -8
- data/spec/api_client_spec.rb +37 -37
- data/spec/configuration_spec.rb +11 -11
- data/spec/models/api_error_spec.rb +10 -11
- data/spec/models/body_1_spec.rb +41 -0
- data/spec/models/body_spec.rb +41 -0
- data/spec/models/compiled_read_spec.rb +8 -9
- data/spec/models/created_at_spec.rb +35 -0
- data/spec/models/cursor_spec.rb +5 -6
- data/spec/models/draft_description_spec.rb +35 -0
- data/spec/models/draft_id_spec.rb +35 -0
- data/spec/models/draft_meta_read_spec.rb +77 -0
- data/spec/models/draft_name_spec.rb +35 -0
- data/spec/models/draft_read_spec.rb +83 -0
- data/spec/models/draft_url_spec.rb +35 -0
- data/spec/models/drafts_read_spec.rb +47 -0
- data/spec/models/language_id_spec.rb +35 -0
- data/spec/models/localization_id_spec.rb +35 -0
- data/spec/models/localization_key_read_spec.rb +47 -0
- data/spec/models/localization_meta_read_spec.rb +13 -8
- data/spec/models/localization_name_spec.rb +35 -0
- data/spec/models/localization_read_spec.rb +11 -12
- data/spec/models/localization_url_spec.rb +35 -0
- data/spec/models/template_description_spec.rb +35 -0
- data/spec/models/template_id_spec.rb +35 -0
- data/spec/models/template_meta_read_spec.rb +10 -11
- data/spec/models/template_name_spec.rb +35 -0
- data/spec/models/template_read_spec.rb +11 -12
- data/spec/models/template_url_spec.rb +35 -0
- data/spec/models/templates_read_spec.rb +5 -6
- data/spec/models/updated_at_spec.rb +35 -0
- data/spec/spec_helper.rb +3 -3
- metadata +106 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: d968f402243af33665a9e94bffff96ea5486490b
|
4
|
+
data.tar.gz: d6c060c99bc7e076bd8c6f63301e796d7e3b3c04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2005c2159497c7480de663a7a40cdcaf3e7bc7dca8f9d6de66e7d36b3c884839422be380d8f483549a416e03459a3a0f24cd2be2cb2624edb422a670c5d4f978
|
7
|
+
data.tar.gz: 784df20371eb8d2b2f029476c1d3bb7955054a4a71106b893644a83ada8995d67bb1b0475cfde34b8a2c17e56554f6f55f68387c149e573b785f76a4d1661d1e
|
data/README.md
CHANGED
@@ -4,9 +4,9 @@ DyspatchClient - the Ruby gem for the Dyspatch API
|
|
4
4
|
|
5
5
|
# Introduction
|
6
6
|
|
7
|
-
The Dyspatch API is based on the REST paradigm
|
7
|
+
The Dyspatch API is based on the REST paradigm and features resource based URLs with standard HTTP response codes to indicate errors. We use standard HTTP authentication and request verbs and all responses are JSON formatted. See our [Implementation Guide](https://docs.dyspatch.io/development/implementing_dyspatch/) for more details on how to implement Dyspatch.
|
8
8
|
|
9
|
-
## API Client Libraries Dyspatch provides API Clients for
|
9
|
+
## API Client Libraries Dyspatch provides API Clients for the following languages and web frameworks:
|
10
10
|
- [Java](https://github.com/getdyspatch/dyspatch-java)
|
11
11
|
- [Javascript](https://github.com/getdyspatch/dyspatch-javascript)
|
12
12
|
- [Python](https://github.com/getdyspatch/dyspatch-python)
|
@@ -16,8 +16,8 @@ The Dyspatch API is based on the REST paradigm, and features resource based URLs
|
|
16
16
|
|
17
17
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
18
18
|
|
19
|
-
- API version: 2019.
|
20
|
-
- Package version:
|
19
|
+
- API version: 2019.10
|
20
|
+
- Package version: 3.0.0
|
21
21
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
22
22
|
For more information, please visit [https://docs.dyspatch.io](https://docs.dyspatch.io)
|
23
23
|
|
@@ -34,15 +34,15 @@ gem build dyspatch_client.gemspec
|
|
34
34
|
Then either install the gem locally:
|
35
35
|
|
36
36
|
```shell
|
37
|
-
gem install ./dyspatch_client-
|
37
|
+
gem install ./dyspatch_client-3.0.0.gem
|
38
38
|
```
|
39
|
-
(for development, run `gem install --dev ./dyspatch_client-
|
39
|
+
(for development, run `gem install --dev ./dyspatch_client-3.0.0.gem` to install the development dependencies)
|
40
40
|
|
41
41
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
42
42
|
|
43
43
|
Finally add this to the Gemfile:
|
44
44
|
|
45
|
-
gem 'dyspatch_client', '~>
|
45
|
+
gem 'dyspatch_client', '~> 3.0.0'
|
46
46
|
|
47
47
|
### Install from Git
|
48
48
|
|
@@ -73,21 +73,19 @@ DyspatchClient.configure do |config|
|
|
73
73
|
#config.api_key_prefix['Authorization'] = 'Bearer'
|
74
74
|
end
|
75
75
|
|
76
|
-
api_instance = DyspatchClient::
|
76
|
+
api_instance = DyspatchClient::DraftsApi.new
|
77
77
|
|
78
|
-
|
78
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
79
|
+
|
80
|
+
target_language = 'target_language_example' # String | The type of templating language to compile as. Should only be used for visual templates.
|
79
81
|
|
80
|
-
opts = {
|
81
|
-
target_language: "target_language_example", # String | The type of templating language to compile as. Should only be used for visual templates.
|
82
|
-
accept: "accept_example" # String | A version of the API that should be used for the request. For example, to use version "2019.03", set the value to "application/vnd.dyspatch.2019.03+json"
|
83
|
-
}
|
84
82
|
|
85
83
|
begin
|
86
|
-
#Get
|
87
|
-
result = api_instance.
|
84
|
+
#Get Draft by ID
|
85
|
+
result = api_instance.drafts_draft_id_get(draft_id, target_language)
|
88
86
|
p result
|
89
87
|
rescue DyspatchClient::ApiError => e
|
90
|
-
puts "Exception when calling
|
88
|
+
puts "Exception when calling DraftsApi->drafts_draft_id_get: #{e}"
|
91
89
|
end
|
92
90
|
|
93
91
|
```
|
@@ -98,6 +96,14 @@ All URIs are relative to *https://api.dyspatch.io*
|
|
98
96
|
|
99
97
|
Class | Method | HTTP request | Description
|
100
98
|
------------ | ------------- | ------------- | -------------
|
99
|
+
*DyspatchClient::DraftsApi* | [**drafts_draft_id_get**](docs/DraftsApi.md#drafts_draft_id_get) | **GET** /drafts/{draftId} | Get Draft by ID
|
100
|
+
*DyspatchClient::DraftsApi* | [**drafts_draft_id_localization_keys_get**](docs/DraftsApi.md#drafts_draft_id_localization_keys_get) | **GET** /drafts/{draftId}/localizationKeys | Get Localization Keys
|
101
|
+
*DyspatchClient::DraftsApi* | [**drafts_draft_id_localizations_get**](docs/DraftsApi.md#drafts_draft_id_localizations_get) | **GET** /drafts/{draftId}/localizations | Get Localizations on a Draft
|
102
|
+
*DyspatchClient::DraftsApi* | [**drafts_draft_id_localizations_language_id_delete**](docs/DraftsApi.md#drafts_draft_id_localizations_language_id_delete) | **DELETE** /drafts/{draftId}/localizations/{languageId} | Remove a Localization
|
103
|
+
*DyspatchClient::DraftsApi* | [**drafts_draft_id_localizations_language_id_put**](docs/DraftsApi.md#drafts_draft_id_localizations_language_id_put) | **PUT** /drafts/{draftId}/localizations/{languageId} | Create or Update a Localization
|
104
|
+
*DyspatchClient::DraftsApi* | [**drafts_draft_id_localizations_language_id_translations_put**](docs/DraftsApi.md#drafts_draft_id_localizations_language_id_translations_put) | **PUT** /drafts/{draftId}/localizations/{languageId}/translations | Set Translations for Language
|
105
|
+
*DyspatchClient::DraftsApi* | [**drafts_draft_id_publish_request_post**](docs/DraftsApi.md#drafts_draft_id_publish_request_post) | **POST** /drafts/{draftId}/publishRequest | Submit the Draft for Approval
|
106
|
+
*DyspatchClient::DraftsApi* | [**drafts_get**](docs/DraftsApi.md#drafts_get) | **GET** /drafts | List Drafts
|
101
107
|
*DyspatchClient::LocalizationsApi* | [**localizations_localization_id_get**](docs/LocalizationsApi.md#localizations_localization_id_get) | **GET** /localizations/{localizationId} | Get Localization Object by ID
|
102
108
|
*DyspatchClient::TemplatesApi* | [**templates_get**](docs/TemplatesApi.md#templates_get) | **GET** /templates | List Templates
|
103
109
|
*DyspatchClient::TemplatesApi* | [**templates_template_id_get**](docs/TemplatesApi.md#templates_template_id_get) | **GET** /templates/{templateId} | Get Template by ID
|
@@ -106,13 +112,33 @@ Class | Method | HTTP request | Description
|
|
106
112
|
## Documentation for Models
|
107
113
|
|
108
114
|
- [DyspatchClient::APIError](docs/APIError.md)
|
115
|
+
- [DyspatchClient::Body](docs/Body.md)
|
116
|
+
- [DyspatchClient::Body1](docs/Body1.md)
|
109
117
|
- [DyspatchClient::CompiledRead](docs/CompiledRead.md)
|
118
|
+
- [DyspatchClient::CreatedAt](docs/CreatedAt.md)
|
110
119
|
- [DyspatchClient::Cursor](docs/Cursor.md)
|
120
|
+
- [DyspatchClient::DraftDescription](docs/DraftDescription.md)
|
121
|
+
- [DyspatchClient::DraftId](docs/DraftId.md)
|
122
|
+
- [DyspatchClient::DraftMetaRead](docs/DraftMetaRead.md)
|
123
|
+
- [DyspatchClient::DraftName](docs/DraftName.md)
|
124
|
+
- [DyspatchClient::DraftRead](docs/DraftRead.md)
|
125
|
+
- [DyspatchClient::DraftUrl](docs/DraftUrl.md)
|
126
|
+
- [DyspatchClient::DraftsRead](docs/DraftsRead.md)
|
127
|
+
- [DyspatchClient::LanguageId](docs/LanguageId.md)
|
128
|
+
- [DyspatchClient::LocalizationId](docs/LocalizationId.md)
|
129
|
+
- [DyspatchClient::LocalizationKeyRead](docs/LocalizationKeyRead.md)
|
111
130
|
- [DyspatchClient::LocalizationMetaRead](docs/LocalizationMetaRead.md)
|
131
|
+
- [DyspatchClient::LocalizationName](docs/LocalizationName.md)
|
112
132
|
- [DyspatchClient::LocalizationRead](docs/LocalizationRead.md)
|
133
|
+
- [DyspatchClient::LocalizationUrl](docs/LocalizationUrl.md)
|
134
|
+
- [DyspatchClient::TemplateDescription](docs/TemplateDescription.md)
|
135
|
+
- [DyspatchClient::TemplateId](docs/TemplateId.md)
|
113
136
|
- [DyspatchClient::TemplateMetaRead](docs/TemplateMetaRead.md)
|
137
|
+
- [DyspatchClient::TemplateName](docs/TemplateName.md)
|
114
138
|
- [DyspatchClient::TemplateRead](docs/TemplateRead.md)
|
139
|
+
- [DyspatchClient::TemplateUrl](docs/TemplateUrl.md)
|
115
140
|
- [DyspatchClient::TemplatesRead](docs/TemplatesRead.md)
|
141
|
+
- [DyspatchClient::UpdatedAt](docs/UpdatedAt.md)
|
116
142
|
|
117
143
|
|
118
144
|
## Documentation for Authorization
|
data/docs/APIError.md
CHANGED
@@ -5,6 +5,6 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**code** | **String** | Error code: * server_error - Internal server error. * invalid_parameter - Validation error, parameter will contain invalid field and message will contain the reason. * invalid_body - Body could not be parsed, message will contain the reason. * invalid_request - Validation error, the protocol used to make the request was not https. * unauthorized - Credentials were found but permissions were not sufficient. * unauthenticated - Credentials were not found or were not valid. * not_found - The requested resource was not found. * rate_limited - The request was refused because a rate limit was exceeded. There is an account wide rate limit of 3600 requests per-minute, although that is subject to change. The current remaining rate limit can be viewed by checking the X-Ratelimit-Remaining header. | [optional]
|
7
7
|
**message** | **String** | Human readable error message | [optional]
|
8
|
-
**parameter** | **String** | The invalid parameter, if
|
8
|
+
**parameter** | **String** | The invalid parameter, if 'code' is invalid_parameter | [optional]
|
9
9
|
|
10
10
|
|
data/docs/Body.md
ADDED
data/docs/Body1.md
ADDED
data/docs/CreatedAt.md
ADDED
data/docs/DraftId.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# DyspatchClient::DraftMetaRead
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **String** | An opaque, unique identifier for a draft | [optional]
|
7
|
+
**template_id** | **String** | An opaque, unique identifier for a template | [optional]
|
8
|
+
**name** | **String** | The name of a draft | [optional]
|
9
|
+
**description** | **String** | A description of the draft | [optional]
|
10
|
+
**url** | **String** | The API url for a specific draft | [optional]
|
11
|
+
**created_at** | **DateTime** | The time of initial creation | [optional]
|
12
|
+
**updated_at** | **DateTime** | The time of last update | [optional]
|
13
|
+
|
14
|
+
|
data/docs/DraftName.md
ADDED
data/docs/DraftRead.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# DyspatchClient::DraftRead
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**id** | **String** | An opaque, unique identifier for a draft | [optional]
|
7
|
+
**template** | **String** | An opaque, unique identifier for a template | [optional]
|
8
|
+
**name** | **String** | The name of a draft | [optional]
|
9
|
+
**url** | **String** | The API url for a specific draft | [optional]
|
10
|
+
**compiled** | [**CompiledRead**](CompiledRead.md) | | [optional]
|
11
|
+
**created_at** | **DateTime** | The time of initial creation | [optional]
|
12
|
+
**updated_at** | **DateTime** | The time of last update | [optional]
|
13
|
+
**localizations** | [**Array<LocalizationMetaRead>**](LocalizationMetaRead.md) | A list of the Template's available localizations | [optional]
|
14
|
+
|
15
|
+
|
data/docs/DraftUrl.md
ADDED
data/docs/DraftsApi.md
ADDED
@@ -0,0 +1,467 @@
|
|
1
|
+
# DyspatchClient::DraftsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.dyspatch.io*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**drafts_draft_id_get**](DraftsApi.md#drafts_draft_id_get) | **GET** /drafts/{draftId} | Get Draft by ID
|
8
|
+
[**drafts_draft_id_localization_keys_get**](DraftsApi.md#drafts_draft_id_localization_keys_get) | **GET** /drafts/{draftId}/localizationKeys | Get Localization Keys
|
9
|
+
[**drafts_draft_id_localizations_get**](DraftsApi.md#drafts_draft_id_localizations_get) | **GET** /drafts/{draftId}/localizations | Get Localizations on a Draft
|
10
|
+
[**drafts_draft_id_localizations_language_id_delete**](DraftsApi.md#drafts_draft_id_localizations_language_id_delete) | **DELETE** /drafts/{draftId}/localizations/{languageId} | Remove a Localization
|
11
|
+
[**drafts_draft_id_localizations_language_id_put**](DraftsApi.md#drafts_draft_id_localizations_language_id_put) | **PUT** /drafts/{draftId}/localizations/{languageId} | Create or Update a Localization
|
12
|
+
[**drafts_draft_id_localizations_language_id_translations_put**](DraftsApi.md#drafts_draft_id_localizations_language_id_translations_put) | **PUT** /drafts/{draftId}/localizations/{languageId}/translations | Set Translations for Language
|
13
|
+
[**drafts_draft_id_publish_request_post**](DraftsApi.md#drafts_draft_id_publish_request_post) | **POST** /drafts/{draftId}/publishRequest | Submit the Draft for Approval
|
14
|
+
[**drafts_get**](DraftsApi.md#drafts_get) | **GET** /drafts | List Drafts
|
15
|
+
|
16
|
+
|
17
|
+
# **drafts_draft_id_get**
|
18
|
+
> DraftRead drafts_draft_id_get(draft_id, target_language)
|
19
|
+
|
20
|
+
Get Draft by ID
|
21
|
+
|
22
|
+
Gets a draft object with the matching ID. The "compiled" field will contain the unlocalized default template object.
|
23
|
+
|
24
|
+
### Example
|
25
|
+
```ruby
|
26
|
+
# load the gem
|
27
|
+
require 'dyspatch_client'
|
28
|
+
# setup authorization
|
29
|
+
DyspatchClient.configure do |config|
|
30
|
+
# Configure API key authorization: Bearer
|
31
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
32
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
33
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
34
|
+
end
|
35
|
+
|
36
|
+
api_instance = DyspatchClient::DraftsApi.new
|
37
|
+
|
38
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
39
|
+
|
40
|
+
target_language = 'target_language_example' # String | The type of templating language to compile as. Should only be used for visual templates.
|
41
|
+
|
42
|
+
|
43
|
+
begin
|
44
|
+
#Get Draft by ID
|
45
|
+
result = api_instance.drafts_draft_id_get(draft_id, target_language)
|
46
|
+
p result
|
47
|
+
rescue DyspatchClient::ApiError => e
|
48
|
+
puts "Exception when calling DraftsApi->drafts_draft_id_get: #{e}"
|
49
|
+
end
|
50
|
+
```
|
51
|
+
|
52
|
+
### Parameters
|
53
|
+
|
54
|
+
Name | Type | Description | Notes
|
55
|
+
------------- | ------------- | ------------- | -------------
|
56
|
+
**draft_id** | **String**| A draft ID |
|
57
|
+
**target_language** | **String**| The type of templating language to compile as. Should only be used for visual templates. |
|
58
|
+
|
59
|
+
### Return type
|
60
|
+
|
61
|
+
[**DraftRead**](DraftRead.md)
|
62
|
+
|
63
|
+
### Authorization
|
64
|
+
|
65
|
+
[Bearer](../README.md#Bearer)
|
66
|
+
|
67
|
+
### HTTP request headers
|
68
|
+
|
69
|
+
- **Content-Type**: Not defined
|
70
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
# **drafts_draft_id_localization_keys_get**
|
75
|
+
> Array<LocalizationKeyRead> drafts_draft_id_localization_keys_get(draft_id, , opts)
|
76
|
+
|
77
|
+
Get Localization Keys
|
78
|
+
|
79
|
+
Returns the list of values that need to be translated for the draft. Set the `Accept` header to `application/vnd.dyspatch.2019.10+json` to get a JSON object, or `text/vnd.dyspatch.2019.10+x-gettext-translation` to get the POT file.
|
80
|
+
|
81
|
+
### Example
|
82
|
+
```ruby
|
83
|
+
# load the gem
|
84
|
+
require 'dyspatch_client'
|
85
|
+
# setup authorization
|
86
|
+
DyspatchClient.configure do |config|
|
87
|
+
# Configure API key authorization: Bearer
|
88
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
89
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
90
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
91
|
+
end
|
92
|
+
|
93
|
+
api_instance = DyspatchClient::DraftsApi.new
|
94
|
+
|
95
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
96
|
+
|
97
|
+
opts = {
|
98
|
+
accept: 'accept_example' # String | A version of the API that should be used for the request. For example, to use version "2019.10", set the value to "application/vnd.dyspatch.2019.10+json".
|
99
|
+
}
|
100
|
+
|
101
|
+
begin
|
102
|
+
#Get Localization Keys
|
103
|
+
result = api_instance.drafts_draft_id_localization_keys_get(draft_id, , opts)
|
104
|
+
p result
|
105
|
+
rescue DyspatchClient::ApiError => e
|
106
|
+
puts "Exception when calling DraftsApi->drafts_draft_id_localization_keys_get: #{e}"
|
107
|
+
end
|
108
|
+
```
|
109
|
+
|
110
|
+
### Parameters
|
111
|
+
|
112
|
+
Name | Type | Description | Notes
|
113
|
+
------------- | ------------- | ------------- | -------------
|
114
|
+
**draft_id** | **String**| A draft ID |
|
115
|
+
**accept** | **String**| A version of the API that should be used for the request. For example, to use version "2019.10", set the value to "application/vnd.dyspatch.2019.10+json". | [optional]
|
116
|
+
|
117
|
+
### Return type
|
118
|
+
|
119
|
+
[**Array<LocalizationKeyRead>**](LocalizationKeyRead.md)
|
120
|
+
|
121
|
+
### Authorization
|
122
|
+
|
123
|
+
[Bearer](../README.md#Bearer)
|
124
|
+
|
125
|
+
### HTTP request headers
|
126
|
+
|
127
|
+
- **Content-Type**: Not defined
|
128
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json, text/vnd.dyspatch.2019.10+x-gettext-translation
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
# **drafts_draft_id_localizations_get**
|
133
|
+
> Array<LocalizationMetaRead> drafts_draft_id_localizations_get(draft_id, )
|
134
|
+
|
135
|
+
Get Localizations on a Draft
|
136
|
+
|
137
|
+
Returns localization metadata object for a template draft.
|
138
|
+
|
139
|
+
### Example
|
140
|
+
```ruby
|
141
|
+
# load the gem
|
142
|
+
require 'dyspatch_client'
|
143
|
+
# setup authorization
|
144
|
+
DyspatchClient.configure do |config|
|
145
|
+
# Configure API key authorization: Bearer
|
146
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
147
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
148
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
149
|
+
end
|
150
|
+
|
151
|
+
api_instance = DyspatchClient::DraftsApi.new
|
152
|
+
|
153
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
154
|
+
|
155
|
+
|
156
|
+
begin
|
157
|
+
#Get Localizations on a Draft
|
158
|
+
result = api_instance.drafts_draft_id_localizations_get(draft_id, )
|
159
|
+
p result
|
160
|
+
rescue DyspatchClient::ApiError => e
|
161
|
+
puts "Exception when calling DraftsApi->drafts_draft_id_localizations_get: #{e}"
|
162
|
+
end
|
163
|
+
```
|
164
|
+
|
165
|
+
### Parameters
|
166
|
+
|
167
|
+
Name | Type | Description | Notes
|
168
|
+
------------- | ------------- | ------------- | -------------
|
169
|
+
**draft_id** | **String**| A draft ID |
|
170
|
+
|
171
|
+
### Return type
|
172
|
+
|
173
|
+
[**Array<LocalizationMetaRead>**](LocalizationMetaRead.md)
|
174
|
+
|
175
|
+
### Authorization
|
176
|
+
|
177
|
+
[Bearer](../README.md#Bearer)
|
178
|
+
|
179
|
+
### HTTP request headers
|
180
|
+
|
181
|
+
- **Content-Type**: Not defined
|
182
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
# **drafts_draft_id_localizations_language_id_delete**
|
187
|
+
> drafts_draft_id_localizations_language_id_delete(draft_id, language_id)
|
188
|
+
|
189
|
+
Remove a Localization
|
190
|
+
|
191
|
+
Deletes the localization with the given `languageId` if it exists.
|
192
|
+
|
193
|
+
### Example
|
194
|
+
```ruby
|
195
|
+
# load the gem
|
196
|
+
require 'dyspatch_client'
|
197
|
+
# setup authorization
|
198
|
+
DyspatchClient.configure do |config|
|
199
|
+
# Configure API key authorization: Bearer
|
200
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
201
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
202
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
203
|
+
end
|
204
|
+
|
205
|
+
api_instance = DyspatchClient::DraftsApi.new
|
206
|
+
|
207
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
208
|
+
|
209
|
+
language_id = 'language_id_example' # String | A language ID (eg: en-US)
|
210
|
+
|
211
|
+
|
212
|
+
begin
|
213
|
+
#Remove a Localization
|
214
|
+
api_instance.drafts_draft_id_localizations_language_id_delete(draft_id, language_id)
|
215
|
+
rescue DyspatchClient::ApiError => e
|
216
|
+
puts "Exception when calling DraftsApi->drafts_draft_id_localizations_language_id_delete: #{e}"
|
217
|
+
end
|
218
|
+
```
|
219
|
+
|
220
|
+
### Parameters
|
221
|
+
|
222
|
+
Name | Type | Description | Notes
|
223
|
+
------------- | ------------- | ------------- | -------------
|
224
|
+
**draft_id** | **String**| A draft ID |
|
225
|
+
**language_id** | **String**| A language ID (eg: en-US) |
|
226
|
+
|
227
|
+
### Return type
|
228
|
+
|
229
|
+
nil (empty response body)
|
230
|
+
|
231
|
+
### Authorization
|
232
|
+
|
233
|
+
[Bearer](../README.md#Bearer)
|
234
|
+
|
235
|
+
### HTTP request headers
|
236
|
+
|
237
|
+
- **Content-Type**: Not defined
|
238
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
# **drafts_draft_id_localizations_language_id_put**
|
243
|
+
> drafts_draft_id_localizations_language_id_put(draft_id, language_idbody)
|
244
|
+
|
245
|
+
Create or Update a Localization
|
246
|
+
|
247
|
+
Inserts a localization or sets the name on an existing localization that already uses the `languageId`.
|
248
|
+
|
249
|
+
### Example
|
250
|
+
```ruby
|
251
|
+
# load the gem
|
252
|
+
require 'dyspatch_client'
|
253
|
+
# setup authorization
|
254
|
+
DyspatchClient.configure do |config|
|
255
|
+
# Configure API key authorization: Bearer
|
256
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
257
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
258
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
259
|
+
end
|
260
|
+
|
261
|
+
api_instance = DyspatchClient::DraftsApi.new
|
262
|
+
|
263
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
264
|
+
|
265
|
+
language_id = 'language_id_example' # String | A language ID (eg: en-US)
|
266
|
+
|
267
|
+
body = DyspatchClient::Body1.new # Body1 |
|
268
|
+
|
269
|
+
|
270
|
+
begin
|
271
|
+
#Create or Update a Localization
|
272
|
+
api_instance.drafts_draft_id_localizations_language_id_put(draft_id, language_idbody)
|
273
|
+
rescue DyspatchClient::ApiError => e
|
274
|
+
puts "Exception when calling DraftsApi->drafts_draft_id_localizations_language_id_put: #{e}"
|
275
|
+
end
|
276
|
+
```
|
277
|
+
|
278
|
+
### Parameters
|
279
|
+
|
280
|
+
Name | Type | Description | Notes
|
281
|
+
------------- | ------------- | ------------- | -------------
|
282
|
+
**draft_id** | **String**| A draft ID |
|
283
|
+
**language_id** | **String**| A language ID (eg: en-US) |
|
284
|
+
**body** | [**Body1**](Body1.md)| |
|
285
|
+
|
286
|
+
### Return type
|
287
|
+
|
288
|
+
nil (empty response body)
|
289
|
+
|
290
|
+
### Authorization
|
291
|
+
|
292
|
+
[Bearer](../README.md#Bearer)
|
293
|
+
|
294
|
+
### HTTP request headers
|
295
|
+
|
296
|
+
- **Content-Type**: Not defined
|
297
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
# **drafts_draft_id_localizations_language_id_translations_put**
|
302
|
+
> drafts_draft_id_localizations_language_id_translations_put(draft_id, language_idbody)
|
303
|
+
|
304
|
+
Set Translations for Language
|
305
|
+
|
306
|
+
Completely replaces any existing translations for the given language with those provided in request body. Variables embedded in keys or values are expected to be in the format `%(my_variable)s` and will automatically convert to the correct Dyspatch format depending on the type of template. Accepts key/value pairs in JSON format or in gettext PO file format. For JSON set `Content-Type` header to `application/json`. For gettext PO format set `Content-Type` header to `text/x-gettext-translation`.
|
307
|
+
|
308
|
+
### Example
|
309
|
+
```ruby
|
310
|
+
# load the gem
|
311
|
+
require 'dyspatch_client'
|
312
|
+
# setup authorization
|
313
|
+
DyspatchClient.configure do |config|
|
314
|
+
# Configure API key authorization: Bearer
|
315
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
316
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
317
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
318
|
+
end
|
319
|
+
|
320
|
+
api_instance = DyspatchClient::DraftsApi.new
|
321
|
+
|
322
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
323
|
+
|
324
|
+
language_id = 'language_id_example' # String | A language ID (eg: en-US)
|
325
|
+
|
326
|
+
body = DyspatchClient::Body.new # Body |
|
327
|
+
|
328
|
+
|
329
|
+
begin
|
330
|
+
#Set Translations for Language
|
331
|
+
api_instance.drafts_draft_id_localizations_language_id_translations_put(draft_id, language_idbody)
|
332
|
+
rescue DyspatchClient::ApiError => e
|
333
|
+
puts "Exception when calling DraftsApi->drafts_draft_id_localizations_language_id_translations_put: #{e}"
|
334
|
+
end
|
335
|
+
```
|
336
|
+
|
337
|
+
### Parameters
|
338
|
+
|
339
|
+
Name | Type | Description | Notes
|
340
|
+
------------- | ------------- | ------------- | -------------
|
341
|
+
**draft_id** | **String**| A draft ID |
|
342
|
+
**language_id** | **String**| A language ID (eg: en-US) |
|
343
|
+
**body** | [**Body**](Body.md)| |
|
344
|
+
|
345
|
+
### Return type
|
346
|
+
|
347
|
+
nil (empty response body)
|
348
|
+
|
349
|
+
### Authorization
|
350
|
+
|
351
|
+
[Bearer](../README.md#Bearer)
|
352
|
+
|
353
|
+
### HTTP request headers
|
354
|
+
|
355
|
+
- **Content-Type**: Not defined
|
356
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
# **drafts_draft_id_publish_request_post**
|
361
|
+
> drafts_draft_id_publish_request_post(draft_id, )
|
362
|
+
|
363
|
+
Submit the Draft for Approval
|
364
|
+
|
365
|
+
Moves the draft into [submitted and locked state](https://docs.dyspatch.io/templates/submitting_a_template/#awaiting-approval). This will allow your email stakeholders to review the template draft and provide feedback.
|
366
|
+
|
367
|
+
### Example
|
368
|
+
```ruby
|
369
|
+
# load the gem
|
370
|
+
require 'dyspatch_client'
|
371
|
+
# setup authorization
|
372
|
+
DyspatchClient.configure do |config|
|
373
|
+
# Configure API key authorization: Bearer
|
374
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
375
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
376
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
377
|
+
end
|
378
|
+
|
379
|
+
api_instance = DyspatchClient::DraftsApi.new
|
380
|
+
|
381
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
382
|
+
|
383
|
+
|
384
|
+
begin
|
385
|
+
#Submit the Draft for Approval
|
386
|
+
api_instance.drafts_draft_id_publish_request_post(draft_id, )
|
387
|
+
rescue DyspatchClient::ApiError => e
|
388
|
+
puts "Exception when calling DraftsApi->drafts_draft_id_publish_request_post: #{e}"
|
389
|
+
end
|
390
|
+
```
|
391
|
+
|
392
|
+
### Parameters
|
393
|
+
|
394
|
+
Name | Type | Description | Notes
|
395
|
+
------------- | ------------- | ------------- | -------------
|
396
|
+
**draft_id** | **String**| A draft ID |
|
397
|
+
|
398
|
+
### Return type
|
399
|
+
|
400
|
+
nil (empty response body)
|
401
|
+
|
402
|
+
### Authorization
|
403
|
+
|
404
|
+
[Bearer](../README.md#Bearer)
|
405
|
+
|
406
|
+
### HTTP request headers
|
407
|
+
|
408
|
+
- **Content-Type**: Not defined
|
409
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
# **drafts_get**
|
414
|
+
> DraftsRead drafts_get(opts)
|
415
|
+
|
416
|
+
List Drafts
|
417
|
+
|
418
|
+
Gets a list of all drafts for your oranization. Up to 25 results returned before results are paginated.
|
419
|
+
|
420
|
+
### Example
|
421
|
+
```ruby
|
422
|
+
# load the gem
|
423
|
+
require 'dyspatch_client'
|
424
|
+
# setup authorization
|
425
|
+
DyspatchClient.configure do |config|
|
426
|
+
# Configure API key authorization: Bearer
|
427
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
428
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
429
|
+
#config.api_key_prefix['Authorization'] = 'Bearer'
|
430
|
+
end
|
431
|
+
|
432
|
+
api_instance = DyspatchClient::DraftsApi.new
|
433
|
+
|
434
|
+
opts = {
|
435
|
+
status: 'status_example' # String | Filter the list of drafts by a particular status
|
436
|
+
}
|
437
|
+
|
438
|
+
begin
|
439
|
+
#List Drafts
|
440
|
+
result = api_instance.drafts_get(opts)
|
441
|
+
p result
|
442
|
+
rescue DyspatchClient::ApiError => e
|
443
|
+
puts "Exception when calling DraftsApi->drafts_get: #{e}"
|
444
|
+
end
|
445
|
+
```
|
446
|
+
|
447
|
+
### Parameters
|
448
|
+
|
449
|
+
Name | Type | Description | Notes
|
450
|
+
------------- | ------------- | ------------- | -------------
|
451
|
+
**status** | **String**| Filter the list of drafts by a particular status | [optional]
|
452
|
+
|
453
|
+
### Return type
|
454
|
+
|
455
|
+
[**DraftsRead**](DraftsRead.md)
|
456
|
+
|
457
|
+
### Authorization
|
458
|
+
|
459
|
+
[Bearer](../README.md#Bearer)
|
460
|
+
|
461
|
+
### HTTP request headers
|
462
|
+
|
463
|
+
- **Content-Type**: Not defined
|
464
|
+
- **Accept**: application/vnd.dyspatch.2019.10+json
|
465
|
+
|
466
|
+
|
467
|
+
|