dyspatch_client 1.0.0 → 2.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 +23 -27
- data/docs/LocalizationsApi.md +9 -6
- data/docs/TemplatesApi.md +16 -14
- data/dyspatch_client.gemspec +4 -4
- data/lib/dyspatch_client.rb +2 -12
- data/lib/dyspatch_client/api/localizations_api.rb +14 -12
- data/lib/dyspatch_client/api/templates_api.rb +23 -25
- data/lib/dyspatch_client/api_client.rb +2 -2
- data/lib/dyspatch_client/api_error.rb +2 -2
- data/lib/dyspatch_client/configuration.rb +2 -2
- data/lib/dyspatch_client/models/api_error.rb +2 -2
- data/lib/dyspatch_client/models/compiled_read.rb +2 -2
- data/lib/dyspatch_client/models/cursor.rb +2 -2
- data/lib/dyspatch_client/models/localization_meta_read.rb +2 -2
- data/lib/dyspatch_client/models/localization_read.rb +2 -2
- data/lib/dyspatch_client/models/template_meta_read.rb +2 -2
- data/lib/dyspatch_client/models/template_read.rb +2 -2
- data/lib/dyspatch_client/models/templates_read.rb +2 -2
- data/lib/dyspatch_client/version.rb +3 -3
- data/spec/api/localizations_api_spec.rb +4 -3
- data/spec/api/templates_api_spec.rb +6 -5
- data/spec/api_client_spec.rb +2 -2
- data/spec/configuration_spec.rb +2 -2
- data/spec/models/api_error_spec.rb +2 -2
- data/spec/models/compiled_read_spec.rb +2 -2
- data/spec/models/cursor_spec.rb +2 -2
- data/spec/models/localization_meta_read_spec.rb +2 -2
- data/spec/models/localization_read_spec.rb +2 -2
- data/spec/models/template_meta_read_spec.rb +2 -2
- data/spec/models/template_read_spec.rb +2 -2
- data/spec/models/templates_read_spec.rb +2 -2
- data/spec/spec_helper.rb +2 -2
- metadata +21 -60
- data/docs/CreatedAt.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/lib/dyspatch_client/models/created_at.rb +0 -179
- data/lib/dyspatch_client/models/language_id.rb +0 -179
- data/lib/dyspatch_client/models/localization_id.rb +0 -179
- data/lib/dyspatch_client/models/localization_name.rb +0 -179
- data/lib/dyspatch_client/models/localization_url.rb +0 -179
- data/lib/dyspatch_client/models/template_description.rb +0 -179
- data/lib/dyspatch_client/models/template_id.rb +0 -179
- data/lib/dyspatch_client/models/template_name.rb +0 -179
- data/lib/dyspatch_client/models/template_url.rb +0 -179
- data/lib/dyspatch_client/models/updated_at.rb +0 -179
- data/spec/models/created_at_spec.rb +0 -36
- data/spec/models/language_id_spec.rb +0 -36
- data/spec/models/localization_id_spec.rb +0 -36
- data/spec/models/localization_name_spec.rb +0 -36
- data/spec/models/localization_url_spec.rb +0 -36
- data/spec/models/template_description_spec.rb +0 -36
- data/spec/models/template_id_spec.rb +0 -36
- data/spec/models/template_name_spec.rb +0 -36
- data/spec/models/template_url_spec.rb +0 -36
- data/spec/models/updated_at_spec.rb +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 186daaf94c5a9a3dff6c571280a8502175c39bb6f12714e0d8da88c949a4c6fa
|
4
|
+
data.tar.gz: a5c5e4b3e944805de6d407c4fbabe41dacc40fb13348db01b6d1adde04316a79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f2c2ae41235ff6e3ff5fcd11a79e1daa75ee28469ac7cffe386c57df601eb0b1222db67908d73273d8dbf66fb0ae993bf0052c027ddf470b596bd99fa9f8ae
|
7
|
+
data.tar.gz: 7671fa4aa1642199e9750c109a7045823cddc6755349dfff2d42044a234eb17020d3a56ea88dd854d99d42b8b9b548710e12aad29d860b42b1a413da0e320d7b
|
data/README.md
CHANGED
@@ -1,11 +1,23 @@
|
|
1
|
+
# dyspatch_client
|
2
|
+
|
3
|
+
DyspatchClient - the Ruby gem for the Dyspatch API
|
4
|
+
|
1
5
|
# Introduction
|
2
6
|
|
3
|
-
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.
|
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
|
+
|
9
|
+
## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks.
|
10
|
+
- [Java](https://github.com/getdyspatch/dyspatch-java)
|
11
|
+
- [Javascript](https://github.com/getdyspatch/dyspatch-javascript)
|
12
|
+
- [Python](https://github.com/getdyspatch/dyspatch-python)
|
13
|
+
- [C#](https://github.com/getdyspatch/dyspatch-dotnet)
|
14
|
+
- [Go](https://github.com/getdyspatch/dyspatch-golang)
|
15
|
+
- [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
|
4
16
|
|
5
17
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
6
18
|
|
7
|
-
- API version:
|
8
|
-
- Package version:
|
19
|
+
- API version: 2019.03
|
20
|
+
- Package version: 2.0.0
|
9
21
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
10
22
|
For more information, please visit [https://docs.dyspatch.io](https://docs.dyspatch.io)
|
11
23
|
|
@@ -22,23 +34,15 @@ gem build dyspatch_client.gemspec
|
|
22
34
|
Then either install the gem locally:
|
23
35
|
|
24
36
|
```shell
|
25
|
-
gem install ./dyspatch_client-
|
37
|
+
gem install ./dyspatch_client-2.0.0.gem
|
26
38
|
```
|
27
|
-
(for development, run `gem install --dev ./dyspatch_client-
|
39
|
+
(for development, run `gem install --dev ./dyspatch_client-2.0.0.gem` to install the development dependencies)
|
28
40
|
|
29
41
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
30
42
|
|
31
43
|
Finally add this to the Gemfile:
|
32
44
|
|
33
|
-
gem 'dyspatch_client', '~>
|
34
|
-
|
35
|
-
### Install from Ruby Gem
|
36
|
-
|
37
|
-
This is the preferred method to install the Dyspatch API Client.
|
38
|
-
|
39
|
-
```shell
|
40
|
-
gem install dyspatch-ruby
|
41
|
-
```
|
45
|
+
gem 'dyspatch_client', '~> 2.0.0'
|
42
46
|
|
43
47
|
### Install from Git
|
44
48
|
|
@@ -73,12 +77,14 @@ api_instance = DyspatchClient::LocalizationsApi.new
|
|
73
77
|
|
74
78
|
localization_id = "localization_id_example" # String | A localization ID
|
75
79
|
|
76
|
-
|
77
|
-
|
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
|
+
}
|
78
84
|
|
79
85
|
begin
|
80
86
|
#Get Localization Object by ID
|
81
|
-
result = api_instance.localizations_localization_id_get(localization_id,
|
87
|
+
result = api_instance.localizations_localization_id_get(localization_id, opts)
|
82
88
|
p result
|
83
89
|
rescue DyspatchClient::ApiError => e
|
84
90
|
puts "Exception when calling LocalizationsApi->localizations_localization_id_get: #{e}"
|
@@ -101,22 +107,12 @@ Class | Method | HTTP request | Description
|
|
101
107
|
|
102
108
|
- [DyspatchClient::APIError](docs/APIError.md)
|
103
109
|
- [DyspatchClient::CompiledRead](docs/CompiledRead.md)
|
104
|
-
- [DyspatchClient::CreatedAt](docs/CreatedAt.md)
|
105
110
|
- [DyspatchClient::Cursor](docs/Cursor.md)
|
106
|
-
- [DyspatchClient::LanguageId](docs/LanguageId.md)
|
107
|
-
- [DyspatchClient::LocalizationId](docs/LocalizationId.md)
|
108
111
|
- [DyspatchClient::LocalizationMetaRead](docs/LocalizationMetaRead.md)
|
109
|
-
- [DyspatchClient::LocalizationName](docs/LocalizationName.md)
|
110
112
|
- [DyspatchClient::LocalizationRead](docs/LocalizationRead.md)
|
111
|
-
- [DyspatchClient::LocalizationUrl](docs/LocalizationUrl.md)
|
112
|
-
- [DyspatchClient::TemplateDescription](docs/TemplateDescription.md)
|
113
|
-
- [DyspatchClient::TemplateId](docs/TemplateId.md)
|
114
113
|
- [DyspatchClient::TemplateMetaRead](docs/TemplateMetaRead.md)
|
115
|
-
- [DyspatchClient::TemplateName](docs/TemplateName.md)
|
116
114
|
- [DyspatchClient::TemplateRead](docs/TemplateRead.md)
|
117
|
-
- [DyspatchClient::TemplateUrl](docs/TemplateUrl.md)
|
118
115
|
- [DyspatchClient::TemplatesRead](docs/TemplatesRead.md)
|
119
|
-
- [DyspatchClient::UpdatedAt](docs/UpdatedAt.md)
|
120
116
|
|
121
117
|
|
122
118
|
## Documentation for Authorization
|
data/docs/LocalizationsApi.md
CHANGED
@@ -8,7 +8,7 @@ Method | HTTP request | Description
|
|
8
8
|
|
9
9
|
|
10
10
|
# **localizations_localization_id_get**
|
11
|
-
> LocalizationRead localizations_localization_id_get(localization_id,
|
11
|
+
> LocalizationRead localizations_localization_id_get(localization_id, opts)
|
12
12
|
|
13
13
|
Get Localization Object by ID
|
14
14
|
|
@@ -30,12 +30,14 @@ api_instance = DyspatchClient::LocalizationsApi.new
|
|
30
30
|
|
31
31
|
localization_id = "localization_id_example" # String | A localization ID
|
32
32
|
|
33
|
-
|
34
|
-
|
33
|
+
opts = {
|
34
|
+
target_language: "target_language_example", # String | The type of templating language to compile as. Should only be used for visual templates.
|
35
|
+
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"
|
36
|
+
}
|
35
37
|
|
36
38
|
begin
|
37
39
|
#Get Localization Object by ID
|
38
|
-
result = api_instance.localizations_localization_id_get(localization_id,
|
40
|
+
result = api_instance.localizations_localization_id_get(localization_id, opts)
|
39
41
|
p result
|
40
42
|
rescue DyspatchClient::ApiError => e
|
41
43
|
puts "Exception when calling LocalizationsApi->localizations_localization_id_get: #{e}"
|
@@ -47,7 +49,8 @@ end
|
|
47
49
|
Name | Type | Description | Notes
|
48
50
|
------------- | ------------- | ------------- | -------------
|
49
51
|
**localization_id** | **String**| A localization ID |
|
50
|
-
**
|
52
|
+
**target_language** | **String**| The type of templating language to compile as. Should only be used for visual templates. | [optional]
|
53
|
+
**accept** | **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" | [optional]
|
51
54
|
|
52
55
|
### Return type
|
53
56
|
|
@@ -60,7 +63,7 @@ Name | Type | Description | Notes
|
|
60
63
|
### HTTP request headers
|
61
64
|
|
62
65
|
- **Content-Type**: Not defined
|
63
|
-
- **Accept**: application/vnd.dyspatch.
|
66
|
+
- **Accept**: application/vnd.dyspatch.2019.03+json
|
64
67
|
|
65
68
|
|
66
69
|
|
data/docs/TemplatesApi.md
CHANGED
@@ -9,7 +9,7 @@ Method | HTTP request | Description
|
|
9
9
|
|
10
10
|
|
11
11
|
# **templates_get**
|
12
|
-
> TemplatesRead templates_get(
|
12
|
+
> TemplatesRead templates_get(opts)
|
13
13
|
|
14
14
|
List Templates
|
15
15
|
|
@@ -29,15 +29,14 @@ end
|
|
29
29
|
|
30
30
|
api_instance = DyspatchClient::TemplatesApi.new
|
31
31
|
|
32
|
-
accept = "accept_example" # String | A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"
|
33
|
-
|
34
32
|
opts = {
|
35
|
-
cursor: "cursor_example" # String | A cursor value used to retrieve a specific page from a paginated result set.
|
33
|
+
cursor: "cursor_example", # String | A cursor value used to retrieve a specific page from a paginated result set.
|
34
|
+
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"
|
36
35
|
}
|
37
36
|
|
38
37
|
begin
|
39
38
|
#List Templates
|
40
|
-
result = api_instance.templates_get(
|
39
|
+
result = api_instance.templates_get(opts)
|
41
40
|
p result
|
42
41
|
rescue DyspatchClient::ApiError => e
|
43
42
|
puts "Exception when calling TemplatesApi->templates_get: #{e}"
|
@@ -48,8 +47,8 @@ end
|
|
48
47
|
|
49
48
|
Name | Type | Description | Notes
|
50
49
|
------------- | ------------- | ------------- | -------------
|
51
|
-
**accept** | **String**| A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\" |
|
52
50
|
**cursor** | **String**| A cursor value used to retrieve a specific page from a paginated result set. | [optional]
|
51
|
+
**accept** | **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" | [optional]
|
53
52
|
|
54
53
|
### Return type
|
55
54
|
|
@@ -62,16 +61,16 @@ Name | Type | Description | Notes
|
|
62
61
|
### HTTP request headers
|
63
62
|
|
64
63
|
- **Content-Type**: Not defined
|
65
|
-
- **Accept**: application/vnd.dyspatch.
|
64
|
+
- **Accept**: application/vnd.dyspatch.2019.03+json
|
66
65
|
|
67
66
|
|
68
67
|
|
69
68
|
# **templates_template_id_get**
|
70
|
-
> TemplateRead templates_template_id_get(template_id,
|
69
|
+
> TemplateRead templates_template_id_get(template_id, opts)
|
71
70
|
|
72
71
|
Get Template by ID
|
73
72
|
|
74
|
-
Gets a template object with the matching ID. If the template has published content the
|
73
|
+
Gets a template object with the matching ID. If the template has published content the "compiled" field will contain the template .
|
75
74
|
|
76
75
|
### Example
|
77
76
|
```ruby
|
@@ -89,12 +88,14 @@ api_instance = DyspatchClient::TemplatesApi.new
|
|
89
88
|
|
90
89
|
template_id = "template_id_example" # String | A template ID
|
91
90
|
|
92
|
-
|
93
|
-
|
91
|
+
opts = {
|
92
|
+
target_language: "target_language_example", # String | The type of templating language to compile as. Should only be used for visual templates.
|
93
|
+
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"
|
94
|
+
}
|
94
95
|
|
95
96
|
begin
|
96
97
|
#Get Template by ID
|
97
|
-
result = api_instance.templates_template_id_get(template_id,
|
98
|
+
result = api_instance.templates_template_id_get(template_id, opts)
|
98
99
|
p result
|
99
100
|
rescue DyspatchClient::ApiError => e
|
100
101
|
puts "Exception when calling TemplatesApi->templates_template_id_get: #{e}"
|
@@ -106,7 +107,8 @@ end
|
|
106
107
|
Name | Type | Description | Notes
|
107
108
|
------------- | ------------- | ------------- | -------------
|
108
109
|
**template_id** | **String**| A template ID |
|
109
|
-
**
|
110
|
+
**target_language** | **String**| The type of templating language to compile as. Should only be used for visual templates. | [optional]
|
111
|
+
**accept** | **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" | [optional]
|
110
112
|
|
111
113
|
### Return type
|
112
114
|
|
@@ -119,7 +121,7 @@ Name | Type | Description | Notes
|
|
119
121
|
### HTTP request headers
|
120
122
|
|
121
123
|
- **Content-Type**: Not defined
|
122
|
-
- **Accept**: application/vnd.dyspatch.
|
124
|
+
- **Accept**: application/vnd.dyspatch.2019.03+json
|
123
125
|
|
124
126
|
|
125
127
|
|
data/dyspatch_client.gemspec
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
=begin
|
4
4
|
#Dyspatch API
|
5
5
|
|
6
|
-
## Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python)
|
6
|
+
## Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
|
7
7
|
|
8
|
-
OpenAPI spec version:
|
8
|
+
OpenAPI spec version: 2019.03
|
9
9
|
Contact: support@dyspatch.io
|
10
10
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
11
|
Swagger Codegen version: 2.3.1
|
@@ -22,8 +22,8 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.authors = ["Dyspatch"]
|
23
23
|
s.email = ["support@dyspatch.io"]
|
24
24
|
s.homepage = "https://www.dyspatch.io"
|
25
|
-
s.summary = "Dyspatch is an email production platform that helps
|
26
|
-
s.description = "# Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) "
|
25
|
+
s.summary = "Dyspatch is an email production platform that helps teams create and change transactional and triggered emails faster. See https://www.dyspatch.io for more information."
|
26
|
+
s.description = "# Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby) "
|
27
27
|
s.license = "Apache-2.0"
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
29
29
|
|
data/lib/dyspatch_client.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Dyspatch API
|
3
3
|
|
4
|
-
## Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python)
|
4
|
+
## Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 2019.03
|
7
7
|
Contact: support@dyspatch.io
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.1
|
@@ -19,22 +19,12 @@ require 'dyspatch_client/configuration'
|
|
19
19
|
# Models
|
20
20
|
require 'dyspatch_client/models/api_error'
|
21
21
|
require 'dyspatch_client/models/compiled_read'
|
22
|
-
require 'dyspatch_client/models/created_at'
|
23
22
|
require 'dyspatch_client/models/cursor'
|
24
|
-
require 'dyspatch_client/models/language_id'
|
25
|
-
require 'dyspatch_client/models/localization_id'
|
26
23
|
require 'dyspatch_client/models/localization_meta_read'
|
27
|
-
require 'dyspatch_client/models/localization_name'
|
28
24
|
require 'dyspatch_client/models/localization_read'
|
29
|
-
require 'dyspatch_client/models/localization_url'
|
30
|
-
require 'dyspatch_client/models/template_description'
|
31
|
-
require 'dyspatch_client/models/template_id'
|
32
25
|
require 'dyspatch_client/models/template_meta_read'
|
33
|
-
require 'dyspatch_client/models/template_name'
|
34
26
|
require 'dyspatch_client/models/template_read'
|
35
|
-
require 'dyspatch_client/models/template_url'
|
36
27
|
require 'dyspatch_client/models/templates_read'
|
37
|
-
require 'dyspatch_client/models/updated_at'
|
38
28
|
|
39
29
|
# APIs
|
40
30
|
require 'dyspatch_client/api/localizations_api'
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Dyspatch API
|
3
3
|
|
4
|
-
## Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python)
|
4
|
+
## Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 2019.03
|
7
7
|
Contact: support@dyspatch.io
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.1
|
@@ -23,21 +23,23 @@ module DyspatchClient
|
|
23
23
|
# Get Localization Object by ID
|
24
24
|
# Returns a specific localization object with a matching ID
|
25
25
|
# @param localization_id A localization ID
|
26
|
-
# @param accept A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"
|
27
26
|
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [String] :target_language The type of templating language to compile as. Should only be used for visual templates.
|
28
|
+
# @option opts [String] :accept 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"
|
28
29
|
# @return [LocalizationRead]
|
29
|
-
def localizations_localization_id_get(localization_id,
|
30
|
-
data, _status_code, _headers = localizations_localization_id_get_with_http_info(localization_id,
|
30
|
+
def localizations_localization_id_get(localization_id, opts = {})
|
31
|
+
data, _status_code, _headers = localizations_localization_id_get_with_http_info(localization_id, opts)
|
31
32
|
return data
|
32
33
|
end
|
33
34
|
|
34
35
|
# Get Localization Object by ID
|
35
36
|
# Returns a specific localization object with a matching ID
|
36
37
|
# @param localization_id A localization ID
|
37
|
-
# @param accept A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"
|
38
38
|
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :target_language The type of templating language to compile as. Should only be used for visual templates.
|
40
|
+
# @option opts [String] :accept 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"
|
39
41
|
# @return [Array<(LocalizationRead, Fixnum, Hash)>] LocalizationRead data, response status code and response headers
|
40
|
-
def localizations_localization_id_get_with_http_info(localization_id,
|
42
|
+
def localizations_localization_id_get_with_http_info(localization_id, opts = {})
|
41
43
|
if @api_client.config.debugging
|
42
44
|
@api_client.config.logger.debug "Calling API: LocalizationsApi.localizations_localization_id_get ..."
|
43
45
|
end
|
@@ -45,21 +47,21 @@ module DyspatchClient
|
|
45
47
|
if @api_client.config.client_side_validation && localization_id.nil?
|
46
48
|
fail ArgumentError, "Missing the required parameter 'localization_id' when calling LocalizationsApi.localizations_localization_id_get"
|
47
49
|
end
|
48
|
-
|
49
|
-
|
50
|
-
fail ArgumentError, "Missing the required parameter 'accept' when calling LocalizationsApi.localizations_localization_id_get"
|
50
|
+
if @api_client.config.client_side_validation && opts[:'target_language'] && !['html', 'jinja', 'handlebars', 'ampscript', 'freemarker', 'cheetah'].include?(opts[:'target_language'])
|
51
|
+
fail ArgumentError, 'invalid value for "target_language", must be one of html, jinja, handlebars, ampscript, freemarker, cheetah'
|
51
52
|
end
|
52
53
|
# resource path
|
53
54
|
local_var_path = "/localizations/{localizationId}".sub('{' + 'localizationId' + '}', localization_id.to_s)
|
54
55
|
|
55
56
|
# query parameters
|
56
57
|
query_params = {}
|
58
|
+
query_params[:'targetLanguage'] = opts[:'target_language'] if !opts[:'target_language'].nil?
|
57
59
|
|
58
60
|
# header parameters
|
59
61
|
header_params = {}
|
60
62
|
# HTTP header 'Accept' (if needed)
|
61
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.
|
62
|
-
header_params[:'Accept'] = accept
|
63
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2019.03+json'])
|
64
|
+
header_params[:'Accept'] = opts[:'accept'] if !opts[:'accept'].nil?
|
63
65
|
|
64
66
|
# form parameters
|
65
67
|
form_params = {}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
=begin
|
2
2
|
#Dyspatch API
|
3
3
|
|
4
|
-
## Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python)
|
4
|
+
## Introduction 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. ## API Client Libraries Dyspatch provides API Clients for popular languages and web frameworks. - [Java](https://github.com/getdyspatch/dyspatch-java) - [Javascript](https://github.com/getdyspatch/dyspatch-javascript) - [Python](https://github.com/getdyspatch/dyspatch-python) - [C#](https://github.com/getdyspatch/dyspatch-dotnet) - [Go](https://github.com/getdyspatch/dyspatch-golang) - [Ruby](https://github.com/getdyspatch/dyspatch-ruby)
|
5
5
|
|
6
|
-
OpenAPI spec version:
|
6
|
+
OpenAPI spec version: 2019.03
|
7
7
|
Contact: support@dyspatch.io
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.3.1
|
@@ -22,29 +22,25 @@ module DyspatchClient
|
|
22
22
|
|
23
23
|
# List Templates
|
24
24
|
# Gets a list of Template Metadata objects for all templates. Up to 25 results returned before results are paginated.
|
25
|
-
# @param accept A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"
|
26
25
|
# @param [Hash] opts the optional parameters
|
27
26
|
# @option opts [String] :cursor A cursor value used to retrieve a specific page from a paginated result set.
|
27
|
+
# @option opts [String] :accept 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"
|
28
28
|
# @return [TemplatesRead]
|
29
|
-
def templates_get(
|
30
|
-
data, _status_code, _headers = templates_get_with_http_info(
|
29
|
+
def templates_get(opts = {})
|
30
|
+
data, _status_code, _headers = templates_get_with_http_info(opts)
|
31
31
|
return data
|
32
32
|
end
|
33
33
|
|
34
34
|
# List Templates
|
35
35
|
# Gets a list of Template Metadata objects for all templates. Up to 25 results returned before results are paginated.
|
36
|
-
# @param accept A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"
|
37
36
|
# @param [Hash] opts the optional parameters
|
38
37
|
# @option opts [String] :cursor A cursor value used to retrieve a specific page from a paginated result set.
|
38
|
+
# @option opts [String] :accept 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"
|
39
39
|
# @return [Array<(TemplatesRead, Fixnum, Hash)>] TemplatesRead data, response status code and response headers
|
40
|
-
def templates_get_with_http_info(
|
40
|
+
def templates_get_with_http_info(opts = {})
|
41
41
|
if @api_client.config.debugging
|
42
42
|
@api_client.config.logger.debug "Calling API: TemplatesApi.templates_get ..."
|
43
43
|
end
|
44
|
-
# verify the required parameter 'accept' is set
|
45
|
-
if @api_client.config.client_side_validation && accept.nil?
|
46
|
-
fail ArgumentError, "Missing the required parameter 'accept' when calling TemplatesApi.templates_get"
|
47
|
-
end
|
48
44
|
# resource path
|
49
45
|
local_var_path = "/templates"
|
50
46
|
|
@@ -55,8 +51,8 @@ module DyspatchClient
|
|
55
51
|
# header parameters
|
56
52
|
header_params = {}
|
57
53
|
# HTTP header 'Accept' (if needed)
|
58
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.
|
59
|
-
header_params[:'Accept'] = accept
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2019.03+json'])
|
55
|
+
header_params[:'Accept'] = opts[:'accept'] if !opts[:'accept'].nil?
|
60
56
|
|
61
57
|
# form parameters
|
62
58
|
form_params = {}
|
@@ -78,23 +74,25 @@ module DyspatchClient
|
|
78
74
|
end
|
79
75
|
|
80
76
|
# Get Template by ID
|
81
|
-
# Gets a template object with the matching ID. If the template has published content the
|
77
|
+
# Gets a template object with the matching ID. If the template has published content the "compiled" field will contain the template .
|
82
78
|
# @param template_id A template ID
|
83
|
-
# @param accept A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"
|
84
79
|
# @param [Hash] opts the optional parameters
|
80
|
+
# @option opts [String] :target_language The type of templating language to compile as. Should only be used for visual templates.
|
81
|
+
# @option opts [String] :accept 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"
|
85
82
|
# @return [TemplateRead]
|
86
|
-
def templates_template_id_get(template_id,
|
87
|
-
data, _status_code, _headers = templates_template_id_get_with_http_info(template_id,
|
83
|
+
def templates_template_id_get(template_id, opts = {})
|
84
|
+
data, _status_code, _headers = templates_template_id_get_with_http_info(template_id, opts)
|
88
85
|
return data
|
89
86
|
end
|
90
87
|
|
91
88
|
# Get Template by ID
|
92
|
-
# Gets a template object with the matching ID. If the template has published content the
|
89
|
+
# Gets a template object with the matching ID. If the template has published content the "compiled" field will contain the template .
|
93
90
|
# @param template_id A template ID
|
94
|
-
# @param accept A version of the API that should be used for the request. For example, to use version \"2018.08\", set the value to \"application/vnd.dyspatch.2018.08+json\"
|
95
91
|
# @param [Hash] opts the optional parameters
|
92
|
+
# @option opts [String] :target_language The type of templating language to compile as. Should only be used for visual templates.
|
93
|
+
# @option opts [String] :accept 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"
|
96
94
|
# @return [Array<(TemplateRead, Fixnum, Hash)>] TemplateRead data, response status code and response headers
|
97
|
-
def templates_template_id_get_with_http_info(template_id,
|
95
|
+
def templates_template_id_get_with_http_info(template_id, opts = {})
|
98
96
|
if @api_client.config.debugging
|
99
97
|
@api_client.config.logger.debug "Calling API: TemplatesApi.templates_template_id_get ..."
|
100
98
|
end
|
@@ -102,21 +100,21 @@ module DyspatchClient
|
|
102
100
|
if @api_client.config.client_side_validation && template_id.nil?
|
103
101
|
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.templates_template_id_get"
|
104
102
|
end
|
105
|
-
|
106
|
-
|
107
|
-
fail ArgumentError, "Missing the required parameter 'accept' when calling TemplatesApi.templates_template_id_get"
|
103
|
+
if @api_client.config.client_side_validation && opts[:'target_language'] && !['html', 'jinja', 'handlebars', 'ampscript', 'freemarker', 'cheetah'].include?(opts[:'target_language'])
|
104
|
+
fail ArgumentError, 'invalid value for "target_language", must be one of html, jinja, handlebars, ampscript, freemarker, cheetah'
|
108
105
|
end
|
109
106
|
# resource path
|
110
107
|
local_var_path = "/templates/{templateId}".sub('{' + 'templateId' + '}', template_id.to_s)
|
111
108
|
|
112
109
|
# query parameters
|
113
110
|
query_params = {}
|
111
|
+
query_params[:'targetLanguage'] = opts[:'target_language'] if !opts[:'target_language'].nil?
|
114
112
|
|
115
113
|
# header parameters
|
116
114
|
header_params = {}
|
117
115
|
# HTTP header 'Accept' (if needed)
|
118
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.
|
119
|
-
header_params[:'Accept'] = accept
|
116
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/vnd.dyspatch.2019.03+json'])
|
117
|
+
header_params[:'Accept'] = opts[:'accept'] if !opts[:'accept'].nil?
|
120
118
|
|
121
119
|
# form parameters
|
122
120
|
form_params = {}
|