dyspatch_client 3.0.0 → 6.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 +4 -4
- data/Gemfile +3 -1
- data/README.md +45 -53
- data/Rakefile +2 -0
- data/docs/APIError.md +13 -2
- data/docs/CompiledRead.md +15 -0
- data/docs/Cursor.md +11 -1
- data/docs/DraftMetaRead.md +14 -1
- data/docs/DraftRead.md +17 -1
- data/docs/DraftsApi.md +140 -131
- data/docs/DraftsRead.md +12 -2
- data/docs/{Body.md → InlineObject.md} +10 -1
- data/docs/LocalizationKeyRead.md +10 -0
- data/docs/LocalizationMetaRead.md +15 -2
- data/docs/LocalizationRead.md +19 -1
- data/docs/LocalizationsApi.md +75 -13
- data/docs/TemplateMetaRead.md +16 -1
- data/docs/TemplateRead.md +17 -1
- data/docs/TemplatesApi.md +40 -36
- data/docs/TemplatesRead.md +11 -1
- data/dyspatch_client.gemspec +5 -11
- data/lib/dyspatch_client.rb +5 -20
- data/lib/dyspatch_client/api/drafts_api.rb +375 -234
- data/lib/dyspatch_client/api/localizations_api.rb +135 -31
- data/lib/dyspatch_client/api/templates_api.rb +99 -65
- data/lib/dyspatch_client/api_client.rb +46 -47
- data/lib/dyspatch_client/api_error.rb +23 -4
- data/lib/dyspatch_client/configuration.rb +48 -9
- data/lib/dyspatch_client/models/api_error.rb +46 -22
- data/lib/dyspatch_client/models/compiled_read.rb +56 -67
- data/lib/dyspatch_client/models/cursor.rb +43 -20
- data/lib/dyspatch_client/models/draft_meta_read.rb +49 -35
- data/lib/dyspatch_client/models/draft_read.rb +49 -25
- data/lib/dyspatch_client/models/drafts_read.rb +42 -19
- data/lib/dyspatch_client/models/{body.rb → inline_object.rb} +40 -17
- data/lib/dyspatch_client/models/localization_key_read.rb +41 -17
- data/lib/dyspatch_client/models/localization_meta_read.rb +62 -36
- data/lib/dyspatch_client/models/localization_read.rb +71 -35
- data/lib/dyspatch_client/models/template_meta_read.rb +48 -24
- data/lib/dyspatch_client/models/template_read.rb +49 -25
- data/lib/dyspatch_client/models/templates_read.rb +41 -17
- data/lib/dyspatch_client/version.rb +5 -5
- data/spec/api/drafts_api_spec.rb +61 -53
- data/spec/api/localizations_api_spec.rb +26 -10
- data/spec/api/templates_api_spec.rb +22 -20
- data/spec/api_client_spec.rb +5 -5
- data/spec/configuration_spec.rb +4 -4
- data/spec/spec_helper.rb +4 -4
- metadata +11 -219
- data/LICENSE +0 -202
- data/docs/Body1.md +0 -8
- data/docs/CreatedAt.md +0 -7
- data/docs/DraftDescription.md +0 -7
- data/docs/DraftId.md +0 -7
- data/docs/DraftName.md +0 -7
- data/docs/DraftUrl.md +0 -7
- data/docs/LanguageId.md +0 -7
- data/docs/LocalizationId.md +0 -7
- data/docs/LocalizationName.md +0 -7
- data/docs/LocalizationUrl.md +0 -7
- data/docs/TemplateDescription.md +0 -7
- data/docs/TemplateId.md +0 -7
- data/docs/TemplateName.md +0 -7
- data/docs/TemplateUrl.md +0 -7
- data/docs/UpdatedAt.md +0 -7
- data/git_push.sh +0 -55
- data/lib/dyspatch_client/models/body_1.rb +0 -183
- data/lib/dyspatch_client/models/created_at.rb +0 -175
- data/lib/dyspatch_client/models/draft_description.rb +0 -175
- data/lib/dyspatch_client/models/draft_id.rb +0 -175
- data/lib/dyspatch_client/models/draft_name.rb +0 -175
- data/lib/dyspatch_client/models/draft_url.rb +0 -175
- data/lib/dyspatch_client/models/language_id.rb +0 -175
- data/lib/dyspatch_client/models/localization_id.rb +0 -175
- data/lib/dyspatch_client/models/localization_name.rb +0 -175
- data/lib/dyspatch_client/models/localization_url.rb +0 -175
- data/lib/dyspatch_client/models/template_description.rb +0 -175
- data/lib/dyspatch_client/models/template_id.rb +0 -175
- data/lib/dyspatch_client/models/template_name.rb +0 -175
- data/lib/dyspatch_client/models/template_url.rb +0 -175
- data/lib/dyspatch_client/models/updated_at.rb +0 -175
- data/spec/models/api_error_spec.rb +0 -57
- data/spec/models/body_1_spec.rb +0 -41
- data/spec/models/body_spec.rb +0 -41
- data/spec/models/compiled_read_spec.rb +0 -65
- data/spec/models/created_at_spec.rb +0 -35
- data/spec/models/cursor_spec.rb +0 -47
- data/spec/models/draft_description_spec.rb +0 -35
- data/spec/models/draft_id_spec.rb +0 -35
- data/spec/models/draft_meta_read_spec.rb +0 -77
- data/spec/models/draft_name_spec.rb +0 -35
- data/spec/models/draft_read_spec.rb +0 -83
- data/spec/models/draft_url_spec.rb +0 -35
- data/spec/models/drafts_read_spec.rb +0 -47
- data/spec/models/language_id_spec.rb +0 -35
- data/spec/models/localization_id_spec.rb +0 -35
- data/spec/models/localization_key_read_spec.rb +0 -47
- data/spec/models/localization_meta_read_spec.rb +0 -65
- data/spec/models/localization_name_spec.rb +0 -35
- data/spec/models/localization_read_spec.rb +0 -83
- data/spec/models/localization_url_spec.rb +0 -35
- data/spec/models/template_description_spec.rb +0 -35
- data/spec/models/template_id_spec.rb +0 -35
- data/spec/models/template_meta_read_spec.rb +0 -77
- data/spec/models/template_name_spec.rb +0 -35
- data/spec/models/template_read_spec.rb +0 -83
- data/spec/models/template_url_spec.rb +0 -35
- data/spec/models/templates_read_spec.rb +0 -47
- data/spec/models/updated_at_spec.rb +0 -35
data/docs/DraftsRead.md
CHANGED
@@ -1,9 +1,19 @@
|
|
1
1
|
# DyspatchClient::DraftsRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**cursor** | **
|
7
|
-
**data** | [**Array
|
7
|
+
**cursor** | [**Cursor**](Cursor.md) | | [optional]
|
8
|
+
**data** | [**Array<DraftMetaRead>**](DraftMetaRead.md) | A list of draft metadata objects | [optional]
|
9
|
+
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'DyspatchClient'
|
14
|
+
|
15
|
+
instance = DyspatchClient::DraftsRead.new(cursor: null,
|
16
|
+
data: null)
|
17
|
+
```
|
8
18
|
|
9
19
|
|
@@ -1,8 +1,17 @@
|
|
1
|
-
# DyspatchClient::
|
1
|
+
# DyspatchClient::InlineObject
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**name** | **String** | | [optional]
|
7
8
|
|
9
|
+
## Code Sample
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'DyspatchClient'
|
13
|
+
|
14
|
+
instance = DyspatchClient::InlineObject.new(name: English (US))
|
15
|
+
```
|
16
|
+
|
8
17
|
|
data/docs/LocalizationKeyRead.md
CHANGED
@@ -1,9 +1,19 @@
|
|
1
1
|
# DyspatchClient::LocalizationKeyRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**key** | **String** | | [optional]
|
7
8
|
**comment** | **String** | | [optional]
|
8
9
|
|
10
|
+
## Code Sample
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'DyspatchClient'
|
14
|
+
|
15
|
+
instance = DyspatchClient::LocalizationKeyRead.new(key: null,
|
16
|
+
comment: null)
|
17
|
+
```
|
18
|
+
|
9
19
|
|
@@ -1,12 +1,25 @@
|
|
1
1
|
# DyspatchClient::LocalizationMetaRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**id** | **String** | An opaque, unique identifier for a localization | [optional]
|
7
|
-
**language** | **String** | A language identifier comprised of a language and a country identifier. See [supported languages](https://docs.dyspatch.io/localization/supported_languages/). | [optional]
|
8
8
|
**name** | **String** | The user-specified name of a localization | [optional]
|
9
9
|
**url** | **String** | The API url for a specific localization | [optional]
|
10
|
-
**
|
10
|
+
**locale_group** | **String** | the locale group this localization belongs to, if this field is empty the localization does not belong to any locale group | [optional]
|
11
|
+
**languages** | **Array<String>** | a list of locale codes that are available in the localization. See [supported languages](https://docs.dyspatch.io/localization/supported_languages/) for an exhaustive list of locale codes. | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'DyspatchClient'
|
17
|
+
|
18
|
+
instance = DyspatchClient::LocalizationMetaRead.new(id: loc_g3L7Cw6Hp5wUaf395LehwK,
|
19
|
+
name: English (US),
|
20
|
+
url: /localizations/loc_g3L7Cw6Hp5wUaf395LehwK,
|
21
|
+
locale_group: lgr_alka38ajla301,
|
22
|
+
languages: null)
|
23
|
+
```
|
11
24
|
|
12
25
|
|
data/docs/LocalizationRead.md
CHANGED
@@ -1,15 +1,33 @@
|
|
1
1
|
# DyspatchClient::LocalizationRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**id** | **String** | An opaque, unique identifier for a localization | [optional]
|
7
|
-
**
|
8
|
+
**languages** | **Array<String>** | a list of locale codes that are available in the localization. See [supported languages](https://docs.dyspatch.io/localization/supported_languages/) for an exhaustive list of locale codes. | [optional]
|
8
9
|
**url** | **String** | The API url for a specific localization | [optional]
|
9
10
|
**template** | **String** | An opaque, unique identifier for a template | [optional]
|
10
11
|
**compiled** | [**CompiledRead**](CompiledRead.md) | | [optional]
|
11
12
|
**created_at** | **DateTime** | The time of initial creation | [optional]
|
12
13
|
**updated_at** | **DateTime** | The time of last update | [optional]
|
13
14
|
**name** | **String** | The user-specified name of a localization | [optional]
|
15
|
+
**locale_group** | **String** | the locale group this localization belongs to, if this field is empty the localization does not belong to any locale group | [optional]
|
16
|
+
|
17
|
+
## Code Sample
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
require 'DyspatchClient'
|
21
|
+
|
22
|
+
instance = DyspatchClient::LocalizationRead.new(id: loc_g3L7Cw6Hp5wUaf395LehwK,
|
23
|
+
languages: null,
|
24
|
+
url: /localizations/loc_g3L7Cw6Hp5wUaf395LehwK,
|
25
|
+
template: tem_g3L7Cw6Hp5wU,
|
26
|
+
compiled: null,
|
27
|
+
created_at: null,
|
28
|
+
updated_at: null,
|
29
|
+
name: English (US),
|
30
|
+
locale_group: lgr_alka38ajla301)
|
31
|
+
```
|
14
32
|
|
15
33
|
|
data/docs/LocalizationsApi.md
CHANGED
@@ -4,17 +4,21 @@ All URIs are relative to *https://api.dyspatch.io*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**
|
7
|
+
[**get_draft_localization_by_id**](LocalizationsApi.md#get_draft_localization_by_id) | **GET** /localizations/{localizationId}/drafts/{draftId} | Get Draft Localization Object by ID
|
8
|
+
[**get_published_localization_by_id**](LocalizationsApi.md#get_published_localization_by_id) | **GET** /localizations/{localizationId} | Get Localization Object by ID
|
8
9
|
|
9
10
|
|
10
|
-
# **localizations_localization_id_get**
|
11
|
-
> LocalizationRead localizations_localization_id_get(localization_id, target_language)
|
12
11
|
|
13
|
-
|
12
|
+
## get_draft_localization_by_id
|
13
|
+
|
14
|
+
> LocalizationRead get_draft_localization_by_id(draft_id, localization_id, target_language, accept)
|
14
15
|
|
15
|
-
|
16
|
+
Get Draft Localization Object by ID
|
17
|
+
|
18
|
+
Returns a specific localization object of the matching draft with a matching localization ID
|
16
19
|
|
17
20
|
### Example
|
21
|
+
|
18
22
|
```ruby
|
19
23
|
# load the gem
|
20
24
|
require 'dyspatch_client'
|
@@ -27,27 +31,29 @@ DyspatchClient.configure do |config|
|
|
27
31
|
end
|
28
32
|
|
29
33
|
api_instance = DyspatchClient::LocalizationsApi.new
|
30
|
-
|
34
|
+
draft_id = 'draft_id_example' # String | A draft ID
|
31
35
|
localization_id = 'localization_id_example' # String | A localization ID
|
32
|
-
|
33
36
|
target_language = 'target_language_example' # String | The type of templating language to compile as. Should only be used for visual templates.
|
34
|
-
|
37
|
+
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\"
|
35
38
|
|
36
39
|
begin
|
37
|
-
#Get Localization Object by ID
|
38
|
-
result = api_instance.
|
40
|
+
#Get Draft Localization Object by ID
|
41
|
+
result = api_instance.get_draft_localization_by_id(draft_id, localization_id, target_language, accept)
|
39
42
|
p result
|
40
43
|
rescue DyspatchClient::ApiError => e
|
41
|
-
puts "Exception when calling LocalizationsApi->
|
44
|
+
puts "Exception when calling LocalizationsApi->get_draft_localization_by_id: #{e}"
|
42
45
|
end
|
43
46
|
```
|
44
47
|
|
45
48
|
### Parameters
|
46
49
|
|
50
|
+
|
47
51
|
Name | Type | Description | Notes
|
48
52
|
------------- | ------------- | ------------- | -------------
|
53
|
+
**draft_id** | **String**| A draft ID |
|
49
54
|
**localization_id** | **String**| A localization ID |
|
50
55
|
**target_language** | **String**| The type of templating language to compile as. Should only be used for visual templates. |
|
56
|
+
**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\" |
|
51
57
|
|
52
58
|
### Return type
|
53
59
|
|
@@ -59,8 +65,64 @@ Name | Type | Description | Notes
|
|
59
65
|
|
60
66
|
### HTTP request headers
|
61
67
|
|
62
|
-
|
63
|
-
|
68
|
+
- **Content-Type**: Not defined
|
69
|
+
- **Accept**: application/vnd.dyspatch.2020.11+json, */*
|
70
|
+
|
71
|
+
|
72
|
+
## get_published_localization_by_id
|
73
|
+
|
74
|
+
> LocalizationRead get_published_localization_by_id(localization_id, target_language, accept)
|
75
|
+
|
76
|
+
Get Localization Object by ID
|
77
|
+
|
78
|
+
Returns the published content associated with the localization of the matching ID
|
79
|
+
|
80
|
+
### Example
|
81
|
+
|
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::LocalizationsApi.new
|
94
|
+
localization_id = 'localization_id_example' # String | A localization ID
|
95
|
+
target_language = 'target_language_example' # String | The type of templating language to compile as. Should only be used for visual templates.
|
96
|
+
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\"
|
97
|
+
|
98
|
+
begin
|
99
|
+
#Get Localization Object by ID
|
100
|
+
result = api_instance.get_published_localization_by_id(localization_id, target_language, accept)
|
101
|
+
p result
|
102
|
+
rescue DyspatchClient::ApiError => e
|
103
|
+
puts "Exception when calling LocalizationsApi->get_published_localization_by_id: #{e}"
|
104
|
+
end
|
105
|
+
```
|
106
|
+
|
107
|
+
### Parameters
|
108
|
+
|
64
109
|
|
110
|
+
Name | Type | Description | Notes
|
111
|
+
------------- | ------------- | ------------- | -------------
|
112
|
+
**localization_id** | **String**| A localization ID |
|
113
|
+
**target_language** | **String**| The type of templating language to compile as. Should only be used for visual templates. |
|
114
|
+
**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\" |
|
115
|
+
|
116
|
+
### Return type
|
117
|
+
|
118
|
+
[**LocalizationRead**](LocalizationRead.md)
|
119
|
+
|
120
|
+
### Authorization
|
121
|
+
|
122
|
+
[Bearer](../README.md#Bearer)
|
123
|
+
|
124
|
+
### HTTP request headers
|
65
125
|
|
126
|
+
- **Content-Type**: Not defined
|
127
|
+
- **Accept**: application/vnd.dyspatch.2020.11+json, */*
|
66
128
|
|
data/docs/TemplateMetaRead.md
CHANGED
@@ -1,14 +1,29 @@
|
|
1
1
|
# DyspatchClient::TemplateMetaRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**id** | **String** | An opaque, unique identifier for a template | [optional]
|
7
8
|
**name** | **String** | The name of a template | [optional]
|
8
9
|
**description** | **String** | A description of the template | [optional]
|
9
10
|
**url** | **String** | The API url for a specific template | [optional]
|
10
|
-
**localizations** | [**Array
|
11
|
+
**localizations** | [**Array<LocalizationMetaRead>**](LocalizationMetaRead.md) | A list of the template's available localization objects | [optional]
|
11
12
|
**created_at** | **DateTime** | The time of initial creation | [optional]
|
12
13
|
**updated_at** | **DateTime** | The time of last update | [optional]
|
13
14
|
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'DyspatchClient'
|
19
|
+
|
20
|
+
instance = DyspatchClient::TemplateMetaRead.new(id: tem_g3L7Cw6Hp5wU,
|
21
|
+
name: null,
|
22
|
+
description: null,
|
23
|
+
url: /templates/tem_g3L7Cw6Hp5wUaf395LehwK,
|
24
|
+
localizations: null,
|
25
|
+
created_at: null,
|
26
|
+
updated_at: null)
|
27
|
+
```
|
28
|
+
|
14
29
|
|
data/docs/TemplateRead.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# DyspatchClient::TemplateRead
|
2
2
|
|
3
3
|
## Properties
|
4
|
+
|
4
5
|
Name | Type | Description | Notes
|
5
6
|
------------ | ------------- | ------------- | -------------
|
6
7
|
**id** | **String** | An opaque, unique identifier for a template | [optional]
|
@@ -10,6 +11,21 @@ Name | Type | Description | Notes
|
|
10
11
|
**compiled** | [**CompiledRead**](CompiledRead.md) | | [optional]
|
11
12
|
**created_at** | **DateTime** | The time of initial creation | [optional]
|
12
13
|
**updated_at** | **DateTime** | The time of last update | [optional]
|
13
|
-
**localizations** | [**Array
|
14
|
+
**localizations** | [**Array<LocalizationMetaRead>**](LocalizationMetaRead.md) | A list of the Template's available localizations | [optional]
|
15
|
+
|
16
|
+
## Code Sample
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
require 'DyspatchClient'
|
20
|
+
|
21
|
+
instance = DyspatchClient::TemplateRead.new(id: tem_g3L7Cw6Hp5wU,
|
22
|
+
name: null,
|
23
|
+
description: null,
|
24
|
+
url: /templates/tem_g3L7Cw6Hp5wUaf395LehwK,
|
25
|
+
compiled: null,
|
26
|
+
created_at: null,
|
27
|
+
updated_at: null,
|
28
|
+
localizations: null)
|
29
|
+
```
|
14
30
|
|
15
31
|
|
data/docs/TemplatesApi.md
CHANGED
@@ -4,18 +4,21 @@ All URIs are relative to *https://api.dyspatch.io*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
-
[**
|
8
|
-
[**
|
7
|
+
[**get_template_by_id**](TemplatesApi.md#get_template_by_id) | **GET** /templates/{templateId} | Get Template by ID
|
8
|
+
[**get_templates**](TemplatesApi.md#get_templates) | **GET** /templates | List Templates
|
9
9
|
|
10
10
|
|
11
|
-
# **templates_get**
|
12
|
-
> TemplatesRead templates_get(opts)
|
13
11
|
|
14
|
-
|
12
|
+
## get_template_by_id
|
15
13
|
|
16
|
-
|
14
|
+
> TemplateRead get_template_by_id(template_id, target_language, accept)
|
15
|
+
|
16
|
+
Get Template by ID
|
17
|
+
|
18
|
+
Gets a template object with the matching ID. If the template has published content the \"compiled\" field will contain the template .
|
17
19
|
|
18
20
|
### Example
|
21
|
+
|
19
22
|
```ruby
|
20
23
|
# load the gem
|
21
24
|
require 'dyspatch_client'
|
@@ -28,29 +31,31 @@ DyspatchClient.configure do |config|
|
|
28
31
|
end
|
29
32
|
|
30
33
|
api_instance = DyspatchClient::TemplatesApi.new
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
34
|
+
template_id = 'template_id_example' # String | A template ID
|
35
|
+
target_language = 'target_language_example' # String | The type of templating language to compile as. Should only be used for visual templates.
|
36
|
+
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\"
|
35
37
|
|
36
38
|
begin
|
37
|
-
#
|
38
|
-
result = api_instance.
|
39
|
+
#Get Template by ID
|
40
|
+
result = api_instance.get_template_by_id(template_id, target_language, accept)
|
39
41
|
p result
|
40
42
|
rescue DyspatchClient::ApiError => e
|
41
|
-
puts "Exception when calling TemplatesApi->
|
43
|
+
puts "Exception when calling TemplatesApi->get_template_by_id: #{e}"
|
42
44
|
end
|
43
45
|
```
|
44
46
|
|
45
47
|
### Parameters
|
46
48
|
|
49
|
+
|
47
50
|
Name | Type | Description | Notes
|
48
51
|
------------- | ------------- | ------------- | -------------
|
49
|
-
**
|
52
|
+
**template_id** | **String**| A template ID |
|
53
|
+
**target_language** | **String**| The type of templating language to compile as. Should only be used for visual templates. |
|
54
|
+
**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\" |
|
50
55
|
|
51
56
|
### Return type
|
52
57
|
|
53
|
-
[**
|
58
|
+
[**TemplateRead**](TemplateRead.md)
|
54
59
|
|
55
60
|
### Authorization
|
56
61
|
|
@@ -58,19 +63,20 @@ Name | Type | Description | Notes
|
|
58
63
|
|
59
64
|
### HTTP request headers
|
60
65
|
|
61
|
-
|
62
|
-
|
66
|
+
- **Content-Type**: Not defined
|
67
|
+
- **Accept**: application/vnd.dyspatch.2020.11+json, */*
|
63
68
|
|
64
69
|
|
70
|
+
## get_templates
|
65
71
|
|
66
|
-
|
67
|
-
> TemplateRead templates_template_id_get(template_id, target_language)
|
72
|
+
> TemplatesRead get_templates(accept, opts)
|
68
73
|
|
69
|
-
|
74
|
+
List Templates
|
70
75
|
|
71
|
-
Gets a
|
76
|
+
Gets a list of Template Metadata objects for all templates. Up to 25 results returned before results are paginated.
|
72
77
|
|
73
78
|
### Example
|
79
|
+
|
74
80
|
```ruby
|
75
81
|
# load the gem
|
76
82
|
require 'dyspatch_client'
|
@@ -83,31 +89,31 @@ DyspatchClient.configure do |config|
|
|
83
89
|
end
|
84
90
|
|
85
91
|
api_instance = DyspatchClient::TemplatesApi.new
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
92
|
+
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\"
|
93
|
+
opts = {
|
94
|
+
cursor: 'cursor_example' # String | A cursor value used to retrieve a specific page from a paginated result set.
|
95
|
+
}
|
91
96
|
|
92
97
|
begin
|
93
|
-
#
|
94
|
-
result = api_instance.
|
98
|
+
#List Templates
|
99
|
+
result = api_instance.get_templates(accept, opts)
|
95
100
|
p result
|
96
101
|
rescue DyspatchClient::ApiError => e
|
97
|
-
puts "Exception when calling TemplatesApi->
|
102
|
+
puts "Exception when calling TemplatesApi->get_templates: #{e}"
|
98
103
|
end
|
99
104
|
```
|
100
105
|
|
101
106
|
### Parameters
|
102
107
|
|
108
|
+
|
103
109
|
Name | Type | Description | Notes
|
104
110
|
------------- | ------------- | ------------- | -------------
|
105
|
-
**
|
106
|
-
**
|
111
|
+
**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\" |
|
112
|
+
**cursor** | **String**| A cursor value used to retrieve a specific page from a paginated result set. | [optional]
|
107
113
|
|
108
114
|
### Return type
|
109
115
|
|
110
|
-
[**
|
116
|
+
[**TemplatesRead**](TemplatesRead.md)
|
111
117
|
|
112
118
|
### Authorization
|
113
119
|
|
@@ -115,8 +121,6 @@ Name | Type | Description | Notes
|
|
115
121
|
|
116
122
|
### HTTP request headers
|
117
123
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
124
|
+
- **Content-Type**: Not defined
|
125
|
+
- **Accept**: application/vnd.dyspatch.2020.11+json, */*
|
122
126
|
|