templatefox 1.10.0 → 1.12.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/lib/templatefox/api/account_api.rb +1 -1
- data/lib/templatefox/api/image_api.rb +90 -0
- data/lib/templatefox/api/integrations_api.rb +1 -1
- data/lib/templatefox/api/pdf_api.rb +1 -1
- data/lib/templatefox/api/pdf_async_api.rb +1 -1
- data/lib/templatefox/api/pdf_tools_api.rb +1 -1
- data/lib/templatefox/api/templates_api.rb +72 -1
- data/lib/templatefox/api_client.rb +1 -1
- data/lib/templatefox/api_error.rb +1 -1
- data/lib/templatefox/api_model_base.rb +1 -1
- data/lib/templatefox/configuration.rb +1 -1
- data/lib/templatefox/models/account_info_response.rb +1 -1
- data/lib/templatefox/models/{app_routers_v1_pdf_export_type.rb → app_routers_v1_delivery_export_type.rb} +4 -4
- data/lib/templatefox/models/app_routers_v1_pdf_async_export_type.rb +1 -1
- data/lib/templatefox/models/app_routers_v1_pdf_tools_export_type.rb +1 -1
- data/lib/templatefox/models/create_async_pdf_request.rb +1 -1
- data/lib/templatefox/models/create_async_pdf_response.rb +1 -1
- data/lib/templatefox/models/create_image_request.rb +533 -0
- data/lib/templatefox/models/create_image_response.rb +259 -0
- data/lib/templatefox/models/create_pdf_request.rb +2 -2
- data/lib/templatefox/models/create_pdf_response.rb +1 -1
- data/lib/templatefox/models/create_version_request.rb +1 -1
- data/lib/templatefox/models/extract_pdf_pages_request.rb +1 -1
- data/lib/templatefox/models/http_validation_error.rb +1 -1
- data/lib/templatefox/models/image_format.rb +41 -0
- data/lib/templatefox/models/job_list_response.rb +1 -1
- data/lib/templatefox/models/job_status.rb +1 -1
- data/lib/templatefox/models/job_status_response.rb +1 -1
- data/lib/templatefox/models/location_inner.rb +1 -1
- data/lib/templatefox/models/merge_pdf_request.rb +1 -1
- data/lib/templatefox/models/modification.rb +305 -0
- data/lib/templatefox/models/pdf_input.rb +1 -1
- data/lib/templatefox/models/pdf_tools_response.rb +1 -1
- data/lib/templatefox/models/pdf_variant.rb +1 -1
- data/lib/templatefox/models/rotate_pdf_request.rb +1 -1
- data/lib/templatefox/models/s3_config_request.rb +1 -1
- data/lib/templatefox/models/s3_config_response.rb +1 -1
- data/lib/templatefox/models/s3_success_response.rb +1 -1
- data/lib/templatefox/models/s3_test_response.rb +1 -1
- data/lib/templatefox/models/template_field.rb +1 -1
- data/lib/templatefox/models/template_field_spec.rb +1 -1
- data/lib/templatefox/models/template_layer.rb +259 -0
- data/lib/templatefox/models/template_layers_response.rb +179 -0
- data/lib/templatefox/models/template_list_item.rb +14 -2
- data/lib/templatefox/models/templates_list_response.rb +1 -1
- data/lib/templatefox/models/transaction.rb +1 -1
- data/lib/templatefox/models/transactions_response.rb +1 -1
- data/lib/templatefox/models/update_version_request.rb +1 -1
- data/lib/templatefox/models/validation_error.rb +1 -1
- data/lib/templatefox/models/version_item.rb +1 -1
- data/lib/templatefox/models/versions_list_response.rb +1 -1
- data/lib/templatefox/version.rb +2 -2
- data/lib/templatefox.rb +9 -2
- data/spec/api/account_api_spec.rb +1 -1
- data/spec/api/image_api_spec.rb +47 -0
- data/spec/api/integrations_api_spec.rb +1 -1
- data/spec/api/pdf_api_spec.rb +1 -1
- data/spec/api/pdf_async_api_spec.rb +1 -1
- data/spec/api/pdf_tools_api_spec.rb +1 -1
- data/spec/api/templates_api_spec.rb +14 -1
- data/spec/models/account_info_response_spec.rb +1 -1
- data/spec/models/{app_routers_v1_pdf_export_type_spec.rb → app_routers_v1_delivery_export_type_spec.rb} +7 -7
- data/spec/models/app_routers_v1_pdf_async_export_type_spec.rb +1 -1
- data/spec/models/app_routers_v1_pdf_tools_export_type_spec.rb +1 -1
- data/spec/models/create_async_pdf_request_spec.rb +1 -1
- data/spec/models/create_async_pdf_response_spec.rb +1 -1
- data/spec/models/create_image_request_spec.rb +108 -0
- data/spec/models/create_image_response_spec.rb +60 -0
- data/spec/models/create_pdf_request_spec.rb +1 -1
- data/spec/models/create_pdf_response_spec.rb +1 -1
- data/spec/models/create_version_request_spec.rb +1 -1
- data/spec/models/extract_pdf_pages_request_spec.rb +1 -1
- data/spec/models/http_validation_error_spec.rb +1 -1
- data/spec/models/image_format_spec.rb +30 -0
- data/spec/models/job_list_response_spec.rb +1 -1
- data/spec/models/job_status_response_spec.rb +1 -1
- data/spec/models/job_status_spec.rb +1 -1
- data/spec/models/location_inner_spec.rb +1 -1
- data/spec/models/merge_pdf_request_spec.rb +1 -1
- data/spec/models/modification_spec.rb +66 -0
- data/spec/models/pdf_input_spec.rb +1 -1
- data/spec/models/pdf_tools_response_spec.rb +1 -1
- data/spec/models/pdf_variant_spec.rb +1 -1
- data/spec/models/rotate_pdf_request_spec.rb +1 -1
- data/spec/models/s3_config_request_spec.rb +1 -1
- data/spec/models/s3_config_response_spec.rb +1 -1
- data/spec/models/s3_success_response_spec.rb +1 -1
- data/spec/models/s3_test_response_spec.rb +1 -1
- data/spec/models/template_field_spec.rb +1 -1
- data/spec/models/template_field_spec_spec.rb +1 -1
- data/spec/models/template_layer_spec.rb +60 -0
- data/spec/models/template_layers_response_spec.rb +42 -0
- data/spec/models/template_list_item_spec.rb +7 -1
- data/spec/models/templates_list_response_spec.rb +1 -1
- data/spec/models/transaction_spec.rb +1 -1
- data/spec/models/transactions_response_spec.rb +1 -1
- data/spec/models/update_version_request_spec.rb +1 -1
- data/spec/models/validation_error_spec.rb +1 -1
- data/spec/models/version_item_spec.rb +1 -1
- data/spec/models/versions_list_response_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/templatefox.gemspec +1 -1
- metadata +53 -32
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 42dc0ce544bf90f71ac18d64a94339a35bcd59431c27e56de46c898824ed932d
|
|
4
|
+
data.tar.gz: 7dcfea9371304d68c5f6ba5c1d86fe0bb11ffd973cb2dc092daa9ca1602d7dd9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eff5e1fe81c002c3149f57ac3290adeb41da7a942faa64c9bce10c32de28968b36641947672c8d1814a0bd6d2478d47a913ba825ef256c720ec8108f6311fe05
|
|
7
|
+
data.tar.gz: 3162b8287e54db1c45d0291dee035c730b9dbad048bb10c699f261753d6309ca96a6f1da7d34aaa5619c2deb661b42d6083d2e3f4809263f6ad11ca515f70738
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#TemplateFox API
|
|
3
|
+
|
|
4
|
+
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module TemplateFox
|
|
16
|
+
class ImageApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Generate image from template
|
|
23
|
+
# Generate an image (PNG, JPEG or WebP) from an image template. **Authentication:** API Key required (`x-api-key` header) ## Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | `template_id` | string | ✅ Yes | Template short ID (12 characters) | | `modifications` | array | No | Modify elements by layer name (see below) | | `format` | string | No | `png` (default), `jpeg` or `webp` | | `width` | integer | No | Output width in pixels (defaults to the template's native width) | | `export_type` | string | No | `url` (default) or `binary` | ## Modifications Each modification targets a layer by the `name` you set in the editor's Layers panel: | Property | Description | |----------|-------------| | `name` | Layer name to modify (required) | | `text` | Replace the layer's text | | `image_url` | Set the layer's image (`src` for images, `background-image` otherwise) | | `color` | Text color | | `background` | Background color | | `hidden` | Hide (`true`) or show (`false`) the layer | Unknown layer names are skipped and listed in the response `warnings`. A name that matches several layers is applied to all of them. ## Export Types - `url` (default): image is uploaded to CDN, returns JSON with URL - `binary`: returns raw image bytes directly **Note:** This endpoint only accepts image templates. Use `/v1/pdf/create` for PDF templates. **Credits:** 1 credit deducted per successful generation. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
24
|
+
# @param create_image_request [CreateImageRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CreateImageResponse]
|
|
27
|
+
def create_image(create_image_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_image_with_http_info(create_image_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Generate image from template
|
|
33
|
+
# Generate an image (PNG, JPEG or WebP) from an image template. **Authentication:** API Key required (`x-api-key` header) ## Request Body | Field | Type | Required | Description | |-------|------|----------|-------------| | `template_id` | string | ✅ Yes | Template short ID (12 characters) | | `modifications` | array | No | Modify elements by layer name (see below) | | `format` | string | No | `png` (default), `jpeg` or `webp` | | `width` | integer | No | Output width in pixels (defaults to the template's native width) | | `export_type` | string | No | `url` (default) or `binary` | ## Modifications Each modification targets a layer by the `name` you set in the editor's Layers panel: | Property | Description | |----------|-------------| | `name` | Layer name to modify (required) | | `text` | Replace the layer's text | | `image_url` | Set the layer's image (`src` for images, `background-image` otherwise) | | `color` | Text color | | `background` | Background color | | `hidden` | Hide (`true`) or show (`false`) the layer | Unknown layer names are skipped and listed in the response `warnings`. A name that matches several layers is applied to all of them. ## Export Types - `url` (default): image is uploaded to CDN, returns JSON with URL - `binary`: returns raw image bytes directly **Note:** This endpoint only accepts image templates. Use `/v1/pdf/create` for PDF templates. **Credits:** 1 credit deducted per successful generation. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
34
|
+
# @param create_image_request [CreateImageRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CreateImageResponse, Integer, Hash)>] CreateImageResponse data, response status code and response headers
|
|
37
|
+
def create_image_with_http_info(create_image_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ImageApi.create_image ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_image_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_image_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_image_request' when calling ImageApi.create_image"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/v1/image/create'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'image/png']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_image_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'CreateImageResponse'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"ImageApi.create_image",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: ImageApi#create_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -225,6 +225,69 @@ module TemplateFox
|
|
|
225
225
|
return data, status_code, headers
|
|
226
226
|
end
|
|
227
227
|
|
|
228
|
+
# Get template layers
|
|
229
|
+
# List the addressable layers of a template. **Authentication:** API Key required (`x-api-key` header) or JWT token **Usage:** The image API (`/v1/image/create`) targets elements by layer name via its `modifications` array. This endpoint returns every named layer of the template — the counterpart of `/fields` for `{{ }}` variables — so a caller (or an agent) can discover what is modifiable without opening the editor. **The reserved `background` layer** is always present: every image template has a background slot, whether it is an explicit element or the page itself. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
230
|
+
# @param template_id [String] Template short ID (12 characters)
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @return [TemplateLayersResponse]
|
|
233
|
+
def get_template_layers(template_id, opts = {})
|
|
234
|
+
data, _status_code, _headers = get_template_layers_with_http_info(template_id, opts)
|
|
235
|
+
data
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Get template layers
|
|
239
|
+
# List the addressable layers of a template. **Authentication:** API Key required (`x-api-key` header) or JWT token **Usage:** The image API (`/v1/image/create`) targets elements by layer name via its `modifications` array. This endpoint returns every named layer of the template — the counterpart of `/fields` for `{{ }}` variables — so a caller (or an agent) can discover what is modifiable without opening the editor. **The reserved `background` layer** is always present: every image template has a background slot, whether it is an explicit element or the page itself. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
240
|
+
# @param template_id [String] Template short ID (12 characters)
|
|
241
|
+
# @param [Hash] opts the optional parameters
|
|
242
|
+
# @return [Array<(TemplateLayersResponse, Integer, Hash)>] TemplateLayersResponse data, response status code and response headers
|
|
243
|
+
def get_template_layers_with_http_info(template_id, opts = {})
|
|
244
|
+
if @api_client.config.debugging
|
|
245
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.get_template_layers ...'
|
|
246
|
+
end
|
|
247
|
+
# verify the required parameter 'template_id' is set
|
|
248
|
+
if @api_client.config.client_side_validation && template_id.nil?
|
|
249
|
+
fail ArgumentError, "Missing the required parameter 'template_id' when calling TemplatesApi.get_template_layers"
|
|
250
|
+
end
|
|
251
|
+
# resource path
|
|
252
|
+
local_var_path = '/v1/templates/{template_id}/layers'.sub('{' + 'template_id' + '}', CGI.escape(template_id.to_s))
|
|
253
|
+
|
|
254
|
+
# query parameters
|
|
255
|
+
query_params = opts[:query_params] || {}
|
|
256
|
+
|
|
257
|
+
# header parameters
|
|
258
|
+
header_params = opts[:header_params] || {}
|
|
259
|
+
# HTTP header 'Accept' (if needed)
|
|
260
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
261
|
+
|
|
262
|
+
# form parameters
|
|
263
|
+
form_params = opts[:form_params] || {}
|
|
264
|
+
|
|
265
|
+
# http body (model)
|
|
266
|
+
post_body = opts[:debug_body]
|
|
267
|
+
|
|
268
|
+
# return_type
|
|
269
|
+
return_type = opts[:debug_return_type] || 'TemplateLayersResponse'
|
|
270
|
+
|
|
271
|
+
# auth_names
|
|
272
|
+
auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']
|
|
273
|
+
|
|
274
|
+
new_options = opts.merge(
|
|
275
|
+
:operation => :"TemplatesApi.get_template_layers",
|
|
276
|
+
:header_params => header_params,
|
|
277
|
+
:query_params => query_params,
|
|
278
|
+
:form_params => form_params,
|
|
279
|
+
:body => post_body,
|
|
280
|
+
:auth_names => auth_names,
|
|
281
|
+
:return_type => return_type
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
285
|
+
if @api_client.config.debugging
|
|
286
|
+
@api_client.config.logger.debug "API called: TemplatesApi#get_template_layers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
287
|
+
end
|
|
288
|
+
return data, status_code, headers
|
|
289
|
+
end
|
|
290
|
+
|
|
228
291
|
# List template versions
|
|
229
292
|
# List all snapshot versions for a template (excludes the working draft).
|
|
230
293
|
# @param template_id [String] Template short ID (12 characters)
|
|
@@ -291,6 +354,7 @@ module TemplateFox
|
|
|
291
354
|
# List templates
|
|
292
355
|
# List all templates for the authenticated user. **Authentication:** API Key required (`x-api-key` header) or JWT token **Usage:** This endpoint is designed for no-code tools (Zapier, Make, n8n) to populate template selection dropdowns. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
293
356
|
# @param [Hash] opts the optional parameters
|
|
357
|
+
# @option opts [String] :kind Filter by product kind: `pdf` or `image`
|
|
294
358
|
# @return [TemplatesListResponse]
|
|
295
359
|
def list_templates(opts = {})
|
|
296
360
|
data, _status_code, _headers = list_templates_with_http_info(opts)
|
|
@@ -300,16 +364,23 @@ module TemplateFox
|
|
|
300
364
|
# List templates
|
|
301
365
|
# List all templates for the authenticated user. **Authentication:** API Key required (`x-api-key` header) or JWT token **Usage:** This endpoint is designed for no-code tools (Zapier, Make, n8n) to populate template selection dropdowns. **No credits consumed:** This is a read-only endpoint. **Rate Limits:** 60 requests/min (free), 120 requests/min (paid). Headers included in response.
|
|
302
366
|
# @param [Hash] opts the optional parameters
|
|
367
|
+
# @option opts [String] :kind Filter by product kind: `pdf` or `image`
|
|
303
368
|
# @return [Array<(TemplatesListResponse, Integer, Hash)>] TemplatesListResponse data, response status code and response headers
|
|
304
369
|
def list_templates_with_http_info(opts = {})
|
|
305
370
|
if @api_client.config.debugging
|
|
306
371
|
@api_client.config.logger.debug 'Calling API: TemplatesApi.list_templates ...'
|
|
307
372
|
end
|
|
373
|
+
pattern = Regexp.new(/^(pdf|image)$/)
|
|
374
|
+
if @api_client.config.client_side_validation && !opts[:'kind'].nil? && opts[:'kind'] !~ pattern
|
|
375
|
+
fail ArgumentError, "invalid value for 'opts[:\"kind\"]' when calling TemplatesApi.list_templates, must conform to the pattern #{pattern}."
|
|
376
|
+
end
|
|
377
|
+
|
|
308
378
|
# resource path
|
|
309
379
|
local_var_path = '/v1/templates'
|
|
310
380
|
|
|
311
381
|
# query parameters
|
|
312
382
|
query_params = opts[:query_params] || {}
|
|
383
|
+
query_params[:'kind'] = opts[:'kind'] if !opts[:'kind'].nil?
|
|
313
384
|
|
|
314
385
|
# header parameters
|
|
315
386
|
header_params = opts[:header_params] || {}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module TemplateFox
|
|
17
|
-
class
|
|
17
|
+
class AppRoutersV1DeliveryExportType
|
|
18
18
|
URL = "url".freeze
|
|
19
19
|
BINARY = "binary".freeze
|
|
20
20
|
|
|
@@ -33,8 +33,8 @@ module TemplateFox
|
|
|
33
33
|
# @param [String] The enum value in the form of the string
|
|
34
34
|
# @return [String] The enum value
|
|
35
35
|
def build_from_hash(value)
|
|
36
|
-
return value if
|
|
37
|
-
raise "Invalid ENUM value #{value} for class #
|
|
36
|
+
return value if AppRoutersV1DeliveryExportType.all_vars.include?(value)
|
|
37
|
+
raise "Invalid ENUM value #{value} for class #AppRoutersV1DeliveryExportType"
|
|
38
38
|
end
|
|
39
39
|
end
|
|
40
40
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Generate beautiful PDFs from HTML/CSS templates with Jinja2 via API. Design once, generate thousands.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 1.
|
|
6
|
+
The version of the OpenAPI document: 1.12.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.21.0
|