timelogic-api 1.0.0 → 1.0.1
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/README.md +16 -16
- data/docs/TimeApi.md +60 -60
- data/lib/timelogic-api/api/time_api.rb +58 -58
- data/lib/timelogic-api/api/utility_api.rb +1 -1
- data/lib/timelogic-api/api_client.rb +8 -8
- data/lib/timelogic-api/api_error.rb +1 -1
- data/lib/timelogic-api/configuration.rb +5 -5
- data/lib/timelogic-api/models/api_error.rb +1 -1
- data/lib/timelogic-api/models/bulk_error.rb +1 -1
- data/lib/timelogic-api/models/calendar_response.rb +1 -1
- data/lib/timelogic-api/models/diff_endpoint_ref.rb +1 -1
- data/lib/timelogic-api/models/diff_response.rb +1 -1
- data/lib/timelogic-api/models/dst_response.rb +1 -1
- data/lib/timelogic-api/models/elapsed_response.rb +1 -1
- data/lib/timelogic-api/models/error_response.rb +1 -1
- data/lib/timelogic-api/models/get_current_time200_response.rb +1 -1
- data/lib/timelogic-api/models/get_timezone200_response.rb +1 -1
- data/lib/timelogic-api/models/jwk_key.rb +1 -1
- data/lib/timelogic-api/models/jwks_response.rb +1 -1
- data/lib/timelogic-api/models/time_payload.rb +1 -1
- data/lib/timelogic-api/models/time_payload_bulk_item.rb +1 -1
- data/lib/timelogic-api/models/time_payload_bulk_response.rb +1 -1
- data/lib/timelogic-api/models/timezone_match.rb +1 -1
- data/lib/timelogic-api/models/timezone_offset_response.rb +1 -1
- data/lib/timelogic-api/models/timezone_resolved_response.rb +1 -1
- data/lib/timelogic-api/version.rb +1 -1
- data/lib/timelogic-api.rb +1 -1
- metadata +3 -3
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
|
|
8
|
-
Generated by: https://
|
|
8
|
+
Generated by: https://github.com/TimeLogic-API-LLC/timelogic-api-sdks.git
|
|
9
9
|
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
@@ -20,20 +20,20 @@ module TimeLogic::Api
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Add modifiers to a timestamp
|
|
23
|
-
# Adds `seconds`, `minutes`, `hours`, and `days` to an optional base timestamp. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the base timestamp defaults to the request time Modifiers: - `seconds=30` - `minutes=15` - `hours=2` - `days=7` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/add?iso=2026-04-16T09:00:00&source_tz=America/New_York&days=1&tz=Europe/London` - `/v1/time/add?minutes=30&utc=true`
|
|
23
|
+
# Adds `seconds`, `minutes`, `hours`, and `days` to an optional base timestamp. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the base timestamp defaults to the request time Modifiers: - `seconds=30` - `minutes=15` - `hours=2` - `days=7` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/add?iso=2026-04-16T09:00:00&source_tz=America/New_York&days=1&tz=Europe/London` - `/v1/time/add?minutes=30&utc=true`
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
|
-
# @option opts [Integer] :unix
|
|
26
|
-
# @option opts [Integer] :unix_ms
|
|
25
|
+
# @option opts [Integer] :unix
|
|
26
|
+
# @option opts [Integer] :unix_ms
|
|
27
27
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
28
28
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
29
29
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
30
30
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
31
31
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
32
32
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
33
|
-
# @option opts [Integer] :seconds
|
|
34
|
-
# @option opts [Integer] :minutes
|
|
35
|
-
# @option opts [Integer] :hours
|
|
36
|
-
# @option opts [Integer] :days
|
|
33
|
+
# @option opts [Integer] :seconds
|
|
34
|
+
# @option opts [Integer] :minutes
|
|
35
|
+
# @option opts [Integer] :hours
|
|
36
|
+
# @option opts [Integer] :days
|
|
37
37
|
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
38
38
|
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
39
39
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
@@ -50,20 +50,20 @@ module TimeLogic::Api
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
# Add modifiers to a timestamp
|
|
53
|
-
# Adds `seconds`, `minutes`, `hours`, and `days` to an optional base timestamp. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the base timestamp defaults to the request time Modifiers: - `seconds=30` - `minutes=15` - `hours=2` - `days=7` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/add?iso=2026-04-16T09:00:00&source_tz=America/New_York&days=1&tz=Europe/London` - `/v1/time/add?minutes=30&utc=true`
|
|
53
|
+
# Adds `seconds`, `minutes`, `hours`, and `days` to an optional base timestamp. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the base timestamp defaults to the request time Modifiers: - `seconds=30` - `minutes=15` - `hours=2` - `days=7` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/add?iso=2026-04-16T09:00:00&source_tz=America/New_York&days=1&tz=Europe/London` - `/v1/time/add?minutes=30&utc=true`
|
|
54
54
|
# @param [Hash] opts the optional parameters
|
|
55
|
-
# @option opts [Integer] :unix
|
|
56
|
-
# @option opts [Integer] :unix_ms
|
|
55
|
+
# @option opts [Integer] :unix
|
|
56
|
+
# @option opts [Integer] :unix_ms
|
|
57
57
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
58
58
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
59
59
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
60
60
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
61
61
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
62
62
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
63
|
-
# @option opts [Integer] :seconds
|
|
64
|
-
# @option opts [Integer] :minutes
|
|
65
|
-
# @option opts [Integer] :hours
|
|
66
|
-
# @option opts [Integer] :days
|
|
63
|
+
# @option opts [Integer] :seconds
|
|
64
|
+
# @option opts [Integer] :minutes
|
|
65
|
+
# @option opts [Integer] :hours
|
|
66
|
+
# @option opts [Integer] :days
|
|
67
67
|
# @option opts [String] :tz IANA timezone name. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
68
68
|
# @option opts [String] :ip IP address. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
69
69
|
# @option opts [Float] :lat Latitude. Must be provided together with `lon`.
|
|
@@ -166,7 +166,7 @@ module TimeLogic::Api
|
|
|
166
166
|
return_type = opts[:debug_return_type] || 'TimePayload'
|
|
167
167
|
|
|
168
168
|
# auth_names
|
|
169
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
169
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
170
170
|
|
|
171
171
|
new_options = opts.merge(
|
|
172
172
|
:operation => :"TimeApi.add_time",
|
|
@@ -186,10 +186,10 @@ module TimeLogic::Api
|
|
|
186
186
|
end
|
|
187
187
|
|
|
188
188
|
# Convert a timestamp into a target timezone or offset
|
|
189
|
-
# Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is allowed only through one comma-separated `tz`, `ip`, or `offset` selector Examples: - Single target: `/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Bulk target set: `/v1/time/convert?unix=1711300000&offset=-04:00,+00:00,+09:00`
|
|
189
|
+
# Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is allowed only through one comma-separated `tz`, `ip`, or `offset` selector Examples: - Single target: `/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Bulk target set: `/v1/time/convert?unix=1711300000&offset=-04:00,+00:00,+09:00`
|
|
190
190
|
# @param [Hash] opts the optional parameters
|
|
191
|
-
# @option opts [Integer] :unix
|
|
192
|
-
# @option opts [Integer] :unix_ms
|
|
191
|
+
# @option opts [Integer] :unix
|
|
192
|
+
# @option opts [Integer] :unix_ms
|
|
193
193
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
194
194
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
195
195
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
@@ -212,10 +212,10 @@ module TimeLogic::Api
|
|
|
212
212
|
end
|
|
213
213
|
|
|
214
214
|
# Convert a timestamp into a target timezone or offset
|
|
215
|
-
# Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is allowed only through one comma-separated `tz`, `ip`, or `offset` selector Examples: - Single target: `/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Bulk target set: `/v1/time/convert?unix=1711300000&offset=-04:00,+00:00,+09:00`
|
|
215
|
+
# Converts one required input timestamp into a single target or a bulk array. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` - `utc=true` Incompatible combinations: - exactly one input timestamp form - exactly one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is allowed only through one comma-separated `tz`, `ip`, or `offset` selector Examples: - Single target: `/v1/time/convert?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Bulk target set: `/v1/time/convert?unix=1711300000&offset=-04:00,+00:00,+09:00`
|
|
216
216
|
# @param [Hash] opts the optional parameters
|
|
217
|
-
# @option opts [Integer] :unix
|
|
218
|
-
# @option opts [Integer] :unix_ms
|
|
217
|
+
# @option opts [Integer] :unix
|
|
218
|
+
# @option opts [Integer] :unix_ms
|
|
219
219
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
220
220
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
221
221
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
@@ -320,7 +320,7 @@ module TimeLogic::Api
|
|
|
320
320
|
return_type = opts[:debug_return_type] || 'GetCurrentTime200Response'
|
|
321
321
|
|
|
322
322
|
# auth_names
|
|
323
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
323
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
324
324
|
|
|
325
325
|
new_options = opts.merge(
|
|
326
326
|
:operation => :"TimeApi.convert_time",
|
|
@@ -340,7 +340,7 @@ module TimeLogic::Api
|
|
|
340
340
|
end
|
|
341
341
|
|
|
342
342
|
# Difference between two instants
|
|
343
|
-
# Computes the duration between `from` and `to`. Required query fields: `from` and `to` only. Do not send every optional companion field. For each side, choose one supported specifier form. A `from_*` or `to_*` companion is allowed only when that side uses `iso=...` with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. `from` and `to` are embedded specifier strings. Accepted specifier forms: - `from=now` - `from=unix=1711300000` - `from=unix_ms=1711300000000` - `from=iso=2026-04-16T09:00:00` - `from=tz=America/New_York` - `from=ip=8.8.8.8` - `from=offset=-05:00` - the same forms are accepted for `to` Timezone hint pairings: - `from_tz` only with `from=iso=...` that has no explicit offset - `from_ip`, `from_lat`/`from_lon`, and `from_offset` only with `from=iso=...` that has no explicit offset - `to_tz` only with `to=iso=...` that has no explicit offset - `to_ip`, `to_lat`/`to_lon`, and `to_offset` only with `to=iso=...` that has no explicit offset Selector semantics: - `tz=...`, `ip=...`, and `offset=...` inside `from` or `to` mean the current request-time instant resolved through that selector - those selector forms do not represent an arbitrary local wall-clock time - returned duration magnitudes are absolute; use `direction` to see whether `to` is after, before, or the same instant as `from` Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Selector-current instant: `/v1/time/diff?from=unix=1711300000&to=tz=America/New_York` - Wall-clock pairing: `/v1/time/diff?from=iso=2026-04-16T09:00:00&from_tz=America/New_York&to=iso=2026-04-16T09:00:00&to_tz=Europe/London` - Wall-clock via selector: `/v1/time/diff?from=iso=2026-01-01T12:00:00&from_ip=8.8.8.8&to=iso=2026-01-01T12:00:00&to_offset=-05:00`
|
|
343
|
+
# Computes the duration between `from` and `to`. Required query fields: `from` and `to` only. Do not send every optional companion field. For each side, choose one supported specifier form. A `from_*` or `to_*` companion is allowed only when that side uses `iso=...` with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. `from` and `to` are embedded specifier strings. Accepted specifier forms: - `from=now` - `from=unix=1711300000` - `from=unix_ms=1711300000000` - `from=iso=2026-04-16T09:00:00` - `from=tz=America/New_York` - `from=ip=8.8.8.8` - `from=offset=-05:00` - the same forms are accepted for `to` Timezone hint pairings: - `from_tz` only with `from=iso=...` that has no explicit offset - `from_ip`, `from_lat`/`from_lon`, and `from_offset` only with `from=iso=...` that has no explicit offset - `to_tz` only with `to=iso=...` that has no explicit offset - `to_ip`, `to_lat`/`to_lon`, and `to_offset` only with `to=iso=...` that has no explicit offset Selector semantics: - `tz=...`, `ip=...`, and `offset=...` inside `from` or `to` mean the current request-time instant resolved through that selector - those selector forms do not represent an arbitrary local wall-clock time - returned duration magnitudes are absolute; use `direction` to see whether `to` is after, before, or the same instant as `from` Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Selector-current instant: `/v1/time/diff?from=unix=1711300000&to=tz=America/New_York` - Wall-clock pairing: `/v1/time/diff?from=iso=2026-04-16T09:00:00&from_tz=America/New_York&to=iso=2026-04-16T09:00:00&to_tz=Europe/London` - Wall-clock via selector: `/v1/time/diff?from=iso=2026-01-01T12:00:00&from_ip=8.8.8.8&to=iso=2026-01-01T12:00:00&to_offset=-05:00`
|
|
344
344
|
# @param from [String] Time specifier. Supported forms are `now`, `unix=<seconds>`, `unix_ms=<milliseconds>`, `iso=<ISO-8601>`, `offset=±HH:MM`, `tz=<IANA timezone>`, and `ip=<IP address>`. For `tz=...`, `ip=...`, and `offset=...`, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use `from=iso=...` together with one of `from_tz`, `from_ip`, `from_lat`+`from_lon`, or `from_offset`.
|
|
345
345
|
# @param to [String] Time specifier. Supported forms are `now`, `unix=<seconds>`, `unix_ms=<milliseconds>`, `iso=<ISO-8601>`, `offset=±HH:MM`, `tz=<IANA timezone>`, and `ip=<IP address>`. For `tz=...`, `ip=...`, and `offset=...`, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use `to=iso=...` together with one of `to_tz`, `to_ip`, `to_lat`+`to_lon`, or `to_offset`.
|
|
346
346
|
# @param [Hash] opts the optional parameters
|
|
@@ -366,7 +366,7 @@ module TimeLogic::Api
|
|
|
366
366
|
end
|
|
367
367
|
|
|
368
368
|
# Difference between two instants
|
|
369
|
-
# Computes the duration between `from` and `to`. Required query fields: `from` and `to` only. Do not send every optional companion field. For each side, choose one supported specifier form. A `from_*` or `to_*` companion is allowed only when that side uses `iso=...` with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. `from` and `to` are embedded specifier strings. Accepted specifier forms: - `from=now` - `from=unix=1711300000` - `from=unix_ms=1711300000000` - `from=iso=2026-04-16T09:00:00` - `from=tz=America/New_York` - `from=ip=8.8.8.8` - `from=offset=-05:00` - the same forms are accepted for `to` Timezone hint pairings: - `from_tz` only with `from=iso=...` that has no explicit offset - `from_ip`, `from_lat`/`from_lon`, and `from_offset` only with `from=iso=...` that has no explicit offset - `to_tz` only with `to=iso=...` that has no explicit offset - `to_ip`, `to_lat`/`to_lon`, and `to_offset` only with `to=iso=...` that has no explicit offset Selector semantics: - `tz=...`, `ip=...`, and `offset=...` inside `from` or `to` mean the current request-time instant resolved through that selector - those selector forms do not represent an arbitrary local wall-clock time - returned duration magnitudes are absolute; use `direction` to see whether `to` is after, before, or the same instant as `from` Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Selector-current instant: `/v1/time/diff?from=unix=1711300000&to=tz=America/New_York` - Wall-clock pairing: `/v1/time/diff?from=iso=2026-04-16T09:00:00&from_tz=America/New_York&to=iso=2026-04-16T09:00:00&to_tz=Europe/London` - Wall-clock via selector: `/v1/time/diff?from=iso=2026-01-01T12:00:00&from_ip=8.8.8.8&to=iso=2026-01-01T12:00:00&to_offset=-05:00`
|
|
369
|
+
# Computes the duration between `from` and `to`. Required query fields: `from` and `to` only. Do not send every optional companion field. For each side, choose one supported specifier form. A `from_*` or `to_*` companion is allowed only when that side uses `iso=...` with no explicit offset; use at most one companion selector, except that coordinate input requires its paired latitude and longitude. `from` and `to` are embedded specifier strings. Accepted specifier forms: - `from=now` - `from=unix=1711300000` - `from=unix_ms=1711300000000` - `from=iso=2026-04-16T09:00:00` - `from=tz=America/New_York` - `from=ip=8.8.8.8` - `from=offset=-05:00` - the same forms are accepted for `to` Timezone hint pairings: - `from_tz` only with `from=iso=...` that has no explicit offset - `from_ip`, `from_lat`/`from_lon`, and `from_offset` only with `from=iso=...` that has no explicit offset - `to_tz` only with `to=iso=...` that has no explicit offset - `to_ip`, `to_lat`/`to_lon`, and `to_offset` only with `to=iso=...` that has no explicit offset Selector semantics: - `tz=...`, `ip=...`, and `offset=...` inside `from` or `to` mean the current request-time instant resolved through that selector - those selector forms do not represent an arbitrary local wall-clock time - returned duration magnitudes are absolute; use `direction` to see whether `to` is after, before, or the same instant as `from` Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Selector-current instant: `/v1/time/diff?from=unix=1711300000&to=tz=America/New_York` - Wall-clock pairing: `/v1/time/diff?from=iso=2026-04-16T09:00:00&from_tz=America/New_York&to=iso=2026-04-16T09:00:00&to_tz=Europe/London` - Wall-clock via selector: `/v1/time/diff?from=iso=2026-01-01T12:00:00&from_ip=8.8.8.8&to=iso=2026-01-01T12:00:00&to_offset=-05:00`
|
|
370
370
|
# @param from [String] Time specifier. Supported forms are `now`, `unix=<seconds>`, `unix_ms=<milliseconds>`, `iso=<ISO-8601>`, `offset=±HH:MM`, `tz=<IANA timezone>`, and `ip=<IP address>`. For `tz=...`, `ip=...`, and `offset=...`, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use `from=iso=...` together with one of `from_tz`, `from_ip`, `from_lat`+`from_lon`, or `from_offset`.
|
|
371
371
|
# @param to [String] Time specifier. Supported forms are `now`, `unix=<seconds>`, `unix_ms=<milliseconds>`, `iso=<ISO-8601>`, `offset=±HH:MM`, `tz=<IANA timezone>`, and `ip=<IP address>`. For `tz=...`, `ip=...`, and `offset=...`, the specifier means the current request-time instant resolved through that selector. To express a local wall-clock time, use `to=iso=...` together with one of `to_tz`, `to_ip`, `to_lat`+`to_lon`, or `to_offset`.
|
|
372
372
|
# @param [Hash] opts the optional parameters
|
|
@@ -483,7 +483,7 @@ module TimeLogic::Api
|
|
|
483
483
|
return_type = opts[:debug_return_type] || 'DiffResponse'
|
|
484
484
|
|
|
485
485
|
# auth_names
|
|
486
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
486
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
487
487
|
|
|
488
488
|
new_options = opts.merge(
|
|
489
489
|
:operation => :"TimeApi.diff_time",
|
|
@@ -503,10 +503,10 @@ module TimeLogic::Api
|
|
|
503
503
|
end
|
|
504
504
|
|
|
505
505
|
# Calendar projection for a target instant
|
|
506
|
-
# Returns calendar fields for an optional timestamp and target. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the request time is used Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Additional flags: - `week=true` adds `week_number` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/calendar?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London&week=true` - `/v1/time/calendar?unix=1711300000&auto_tz=true`
|
|
506
|
+
# Returns calendar fields for an optional timestamp and target. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the request time is used Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Additional flags: - `week=true` adds `week_number` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/calendar?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London&week=true` - `/v1/time/calendar?unix=1711300000&auto_tz=true`
|
|
507
507
|
# @param [Hash] opts the optional parameters
|
|
508
|
-
# @option opts [Integer] :unix
|
|
509
|
-
# @option opts [Integer] :unix_ms
|
|
508
|
+
# @option opts [Integer] :unix
|
|
509
|
+
# @option opts [Integer] :unix_ms
|
|
510
510
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
511
511
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
512
512
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
@@ -520,7 +520,7 @@ module TimeLogic::Api
|
|
|
520
520
|
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
521
521
|
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
522
522
|
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Reference: [strftime](https://strftime.net/).
|
|
523
|
-
# @option opts [Boolean] :week
|
|
523
|
+
# @option opts [Boolean] :week
|
|
524
524
|
# @option opts [Boolean] :sign Set to exactly `true` to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
525
525
|
# @return [CalendarResponse]
|
|
526
526
|
def get_calendar(opts = {})
|
|
@@ -529,10 +529,10 @@ module TimeLogic::Api
|
|
|
529
529
|
end
|
|
530
530
|
|
|
531
531
|
# Calendar projection for a target instant
|
|
532
|
-
# Returns calendar fields for an optional timestamp and target. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the request time is used Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Additional flags: - `week=true` adds `week_number` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/calendar?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London&week=true` - `/v1/time/calendar?unix=1711300000&auto_tz=true`
|
|
532
|
+
# Returns calendar fields for an optional timestamp and target. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` - if no input timestamp is provided, the request time is used Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Additional flags: - `week=true` adds `week_number` Incompatible combinations: - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - bulk is not supported on this route Examples: - `/v1/time/calendar?iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London&week=true` - `/v1/time/calendar?unix=1711300000&auto_tz=true`
|
|
533
533
|
# @param [Hash] opts the optional parameters
|
|
534
|
-
# @option opts [Integer] :unix
|
|
535
|
-
# @option opts [Integer] :unix_ms
|
|
534
|
+
# @option opts [Integer] :unix
|
|
535
|
+
# @option opts [Integer] :unix_ms
|
|
536
536
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
537
537
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
538
538
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
@@ -546,7 +546,7 @@ module TimeLogic::Api
|
|
|
546
546
|
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
547
547
|
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
548
548
|
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Reference: [strftime](https://strftime.net/).
|
|
549
|
-
# @option opts [Boolean] :week
|
|
549
|
+
# @option opts [Boolean] :week
|
|
550
550
|
# @option opts [Boolean] :sign Set to exactly `true` to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
551
551
|
# @return [Array<(CalendarResponse, Integer, Hash)>] CalendarResponse data, response status code and response headers
|
|
552
552
|
def get_calendar_with_http_info(opts = {})
|
|
@@ -637,7 +637,7 @@ module TimeLogic::Api
|
|
|
637
637
|
return_type = opts[:debug_return_type] || 'CalendarResponse'
|
|
638
638
|
|
|
639
639
|
# auth_names
|
|
640
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
640
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
641
641
|
|
|
642
642
|
new_options = opts.merge(
|
|
643
643
|
:operation => :"TimeApi.get_calendar",
|
|
@@ -657,11 +657,11 @@ module TimeLogic::Api
|
|
|
657
657
|
end
|
|
658
658
|
|
|
659
659
|
# Render a live HTML clock
|
|
660
|
-
# Returns an embeddable HTML clock fragment. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` Incompatible combinations: - `style` is required and must be one of the 30 names in the `style` enum - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - this route is single-target only; comma-separated `tz`, `ip`, and `offset` values are rejected - `auto_tz` is not supported on this route - `sign` is not supported on this route Examples: - Digital: `/v1/time/clock?style=digital-dashboard&iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Analog: `/v1/time/clock?style=analog-station&offset=-04:00`
|
|
660
|
+
# Returns an embeddable HTML clock fragment. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` Incompatible combinations: - `style` is required and must be one of the 30 names in the `style` enum - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - this route is single-target only; comma-separated `tz`, `ip`, and `offset` values are rejected - `auto_tz` is not supported on this route - `sign` is not supported on this route Examples: - Digital: `/v1/time/clock?style=digital-dashboard&iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Analog: `/v1/time/clock?style=analog-station&offset=-04:00`
|
|
661
661
|
# @param style [String] Clock style name. Valid values are enumerated here; there is no separate style discovery endpoint.
|
|
662
662
|
# @param [Hash] opts the optional parameters
|
|
663
|
-
# @option opts [Integer] :unix
|
|
664
|
-
# @option opts [Integer] :unix_ms
|
|
663
|
+
# @option opts [Integer] :unix
|
|
664
|
+
# @option opts [Integer] :unix_ms
|
|
665
665
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
666
666
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
667
667
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
@@ -681,11 +681,11 @@ module TimeLogic::Api
|
|
|
681
681
|
end
|
|
682
682
|
|
|
683
683
|
# Render a live HTML clock
|
|
684
|
-
# Returns an embeddable HTML clock fragment. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` Incompatible combinations: - `style` is required and must be one of the 30 names in the `style` enum - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - this route is single-target only; comma-separated `tz`, `ip`, and `offset` values are rejected - `auto_tz` is not supported on this route - `sign` is not supported on this route Examples: - Digital: `/v1/time/clock?style=digital-dashboard&iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Analog: `/v1/time/clock?style=analog-station&offset=-04:00`
|
|
684
|
+
# Returns an embeddable HTML clock fragment. Input timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` Target selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` Incompatible combinations: - `style` is required and must be one of the 30 names in the `style` enum - at most one input timestamp form - at most one target selector family - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - this route is single-target only; comma-separated `tz`, `ip`, and `offset` values are rejected - `auto_tz` is not supported on this route - `sign` is not supported on this route Examples: - Digital: `/v1/time/clock?style=digital-dashboard&iso=2026-04-16T09:00:00&source_tz=America/New_York&tz=Europe/London` - Analog: `/v1/time/clock?style=analog-station&offset=-04:00`
|
|
685
685
|
# @param style [String] Clock style name. Valid values are enumerated here; there is no separate style discovery endpoint.
|
|
686
686
|
# @param [Hash] opts the optional parameters
|
|
687
|
-
# @option opts [Integer] :unix
|
|
688
|
-
# @option opts [Integer] :unix_ms
|
|
687
|
+
# @option opts [Integer] :unix
|
|
688
|
+
# @option opts [Integer] :unix_ms
|
|
689
689
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
690
690
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
691
691
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
@@ -794,7 +794,7 @@ module TimeLogic::Api
|
|
|
794
794
|
return_type = opts[:debug_return_type] || 'String'
|
|
795
795
|
|
|
796
796
|
# auth_names
|
|
797
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
797
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
798
798
|
|
|
799
799
|
new_options = opts.merge(
|
|
800
800
|
:operation => :"TimeApi.get_clock",
|
|
@@ -900,7 +900,7 @@ module TimeLogic::Api
|
|
|
900
900
|
return_type = opts[:debug_return_type] || 'GetCurrentTime200Response'
|
|
901
901
|
|
|
902
902
|
# auth_names
|
|
903
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
903
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
904
904
|
|
|
905
905
|
new_options = opts.merge(
|
|
906
906
|
:operation => :"TimeApi.get_current_time",
|
|
@@ -929,7 +929,7 @@ module TimeLogic::Api
|
|
|
929
929
|
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
930
930
|
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
931
931
|
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Reference: [strftime](https://strftime.net/).
|
|
932
|
-
# @option opts [Boolean] :_next
|
|
932
|
+
# @option opts [Boolean] :_next
|
|
933
933
|
# @option opts [Boolean] :sign Set to exactly `true` to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
934
934
|
# @return [DstResponse]
|
|
935
935
|
def get_dst(opts = {})
|
|
@@ -947,7 +947,7 @@ module TimeLogic::Api
|
|
|
947
947
|
# @option opts [String] :offset Fixed UTC offset in `+HH:MM` or `-HH:MM` format. On bulk-capable routes, a comma-separated list enables bulk mode.
|
|
948
948
|
# @option opts [Boolean] :auto_tz Set to `true` to resolve using the caller IP from Cloudflare headers.
|
|
949
949
|
# @option opts [String] :format Custom date/time format template using supported `strftime`-style directives such as `%Y-%m-%d %H:%M:%S`. Reference: [strftime](https://strftime.net/).
|
|
950
|
-
# @option opts [Boolean] :_next
|
|
950
|
+
# @option opts [Boolean] :_next
|
|
951
951
|
# @option opts [Boolean] :sign Set to exactly `true` to ask the gateway to sign the final JSON response. Every authenticated JSON response, including errors, then includes signing headers. Not supported on `/v1/time/clock`.
|
|
952
952
|
# @return [Array<(DstResponse, Integer, Hash)>] DstResponse data, response status code and response headers
|
|
953
953
|
def get_dst_with_http_info(opts = {})
|
|
@@ -1009,7 +1009,7 @@ module TimeLogic::Api
|
|
|
1009
1009
|
return_type = opts[:debug_return_type] || 'DstResponse'
|
|
1010
1010
|
|
|
1011
1011
|
# auth_names
|
|
1012
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
1012
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
1013
1013
|
|
|
1014
1014
|
new_options = opts.merge(
|
|
1015
1015
|
:operation => :"TimeApi.get_dst",
|
|
@@ -1029,18 +1029,18 @@ module TimeLogic::Api
|
|
|
1029
1029
|
end
|
|
1030
1030
|
|
|
1031
1031
|
# Time elapsed since or remaining until a reference instant
|
|
1032
|
-
# Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Compare timestamp forms: - `compare_unix=1711213600` - `compare_unix_ms=1711213600000` - `compare_iso=2026-04-16T09:00:00Z` - `compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - `compare_iso=2026-04-16T09:00:00&compare_source_ip=8.8.8.8` - `compare_iso=2026-04-16T09:00:00&compare_source_lat=40.7128&compare_source_lon=-74.0060` - `compare_iso=2026-04-16T09:00:00&compare_source_offset=-05:00` Compare selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Incompatible combinations: - exactly one reference timestamp form - use either one compare timestamp form or one compare selector family, not both - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - use at most one of `compare_source_tz`, `compare_source_ip`, `compare_source_lat`/`compare_source_lon`, or `compare_source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - compare local-ISO companion selectors are valid only with `compare_iso=...` that has no explicit offset - if no compare input is provided, the comparison defaults to the request time Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Timestamp-to-timestamp: `/v1/time/elapsed?iso=2026-04-16T09:00:00&source_tz=America/New_York&compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - Timestamp-to-selector: `/v1/time/elapsed?unix=1711300000&tz=America/New_York&business_days=true`
|
|
1032
|
+
# Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Compare timestamp forms: - `compare_unix=1711213600` - `compare_unix_ms=1711213600000` - `compare_iso=2026-04-16T09:00:00Z` - `compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - `compare_iso=2026-04-16T09:00:00&compare_source_ip=8.8.8.8` - `compare_iso=2026-04-16T09:00:00&compare_source_lat=40.7128&compare_source_lon=-74.0060` - `compare_iso=2026-04-16T09:00:00&compare_source_offset=-05:00` Compare selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Incompatible combinations: - exactly one reference timestamp form - use either one compare timestamp form or one compare selector family, not both - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - use at most one of `compare_source_tz`, `compare_source_ip`, `compare_source_lat`/`compare_source_lon`, or `compare_source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - compare local-ISO companion selectors are valid only with `compare_iso=...` that has no explicit offset - if no compare input is provided, the comparison defaults to the request time Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Timestamp-to-timestamp: `/v1/time/elapsed?iso=2026-04-16T09:00:00&source_tz=America/New_York&compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - Timestamp-to-selector: `/v1/time/elapsed?unix=1711300000&tz=America/New_York&business_days=true`
|
|
1033
1033
|
# @param [Hash] opts the optional parameters
|
|
1034
|
-
# @option opts [Integer] :unix
|
|
1035
|
-
# @option opts [Integer] :unix_ms
|
|
1034
|
+
# @option opts [Integer] :unix
|
|
1035
|
+
# @option opts [Integer] :unix_ms
|
|
1036
1036
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
1037
1037
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
1038
1038
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
1039
1039
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
1040
1040
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
1041
1041
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
1042
|
-
# @option opts [Integer] :compare_unix
|
|
1043
|
-
# @option opts [Integer] :compare_unix_ms
|
|
1042
|
+
# @option opts [Integer] :compare_unix
|
|
1043
|
+
# @option opts [Integer] :compare_unix_ms
|
|
1044
1044
|
# @option opts [String] :compare_iso ISO-8601 comparison timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `compare_source_tz=Area/City`, `compare_source_ip=...`, `compare_source_lat=...&compare_source_lon=...`, or `compare_source_offset=±HH:MM`.
|
|
1045
1045
|
# @option opts [String] :compare_source_tz Used only with `compare_iso=...` when the ISO value has no explicit offset.
|
|
1046
1046
|
# @option opts [String] :compare_source_ip Used only with `compare_iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
@@ -1065,18 +1065,18 @@ module TimeLogic::Api
|
|
|
1065
1065
|
end
|
|
1066
1066
|
|
|
1067
1067
|
# Time elapsed since or remaining until a reference instant
|
|
1068
|
-
# Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Compare timestamp forms: - `compare_unix=1711213600` - `compare_unix_ms=1711213600000` - `compare_iso=2026-04-16T09:00:00Z` - `compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - `compare_iso=2026-04-16T09:00:00&compare_source_ip=8.8.8.8` - `compare_iso=2026-04-16T09:00:00&compare_source_lat=40.7128&compare_source_lon=-74.0060` - `compare_iso=2026-04-16T09:00:00&compare_source_offset=-05:00` Compare selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Incompatible combinations: - exactly one reference timestamp form - use either one compare timestamp form or one compare selector family, not both - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - use at most one of `compare_source_tz`, `compare_source_ip`, `compare_source_lat`/`compare_source_lon`, or `compare_source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - compare local-ISO companion selectors are valid only with `compare_iso=...` that has no explicit offset - if no compare input is provided, the comparison defaults to the request time Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Timestamp-to-timestamp: `/v1/time/elapsed?iso=2026-04-16T09:00:00&source_tz=America/New_York&compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - Timestamp-to-selector: `/v1/time/elapsed?unix=1711300000&tz=America/New_York&business_days=true`
|
|
1068
|
+
# Computes elapsed or remaining duration relative to one required reference timestamp. Reference timestamp forms: - `unix=1711300000` - `unix_ms=1711300000000` - `iso=2026-04-16T09:00:00Z` - `iso=2026-04-16T09:00:00&source_tz=America/New_York` - `iso=2026-04-16T09:00:00&source_ip=8.8.8.8` - `iso=2026-04-16T09:00:00&source_lat=40.7128&source_lon=-74.0060` - `iso=2026-04-16T09:00:00&source_offset=-05:00` Compare timestamp forms: - `compare_unix=1711213600` - `compare_unix_ms=1711213600000` - `compare_iso=2026-04-16T09:00:00Z` - `compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - `compare_iso=2026-04-16T09:00:00&compare_source_ip=8.8.8.8` - `compare_iso=2026-04-16T09:00:00&compare_source_lat=40.7128&compare_source_lon=-74.0060` - `compare_iso=2026-04-16T09:00:00&compare_source_offset=-05:00` Compare selector forms: - `tz=America/New_York` - `ip=8.8.8.8` - `lat=40.7128&lon=-74.0060` - `offset=-04:00` - `auto_tz=true` Incompatible combinations: - exactly one reference timestamp form - use either one compare timestamp form or one compare selector family, not both - use at most one of `source_tz`, `source_ip`, `source_lat`/`source_lon`, or `source_offset` - use at most one of `compare_source_tz`, `compare_source_ip`, `compare_source_lat`/`compare_source_lon`, or `compare_source_offset` - local-ISO companion selectors are valid only with `iso=...` that has no explicit offset - compare local-ISO companion selectors are valid only with `compare_iso=...` that has no explicit offset - if no compare input is provided, the comparison defaults to the request time Business-day rules: - `holiday_country` and `holiday_subdivision` require `business_days=true` - `holiday_subdivision` also requires `holiday_country` Examples: - Timestamp-to-timestamp: `/v1/time/elapsed?iso=2026-04-16T09:00:00&source_tz=America/New_York&compare_iso=2026-04-16T09:00:00&compare_source_tz=Europe/London` - Timestamp-to-selector: `/v1/time/elapsed?unix=1711300000&tz=America/New_York&business_days=true`
|
|
1069
1069
|
# @param [Hash] opts the optional parameters
|
|
1070
|
-
# @option opts [Integer] :unix
|
|
1071
|
-
# @option opts [Integer] :unix_ms
|
|
1070
|
+
# @option opts [Integer] :unix
|
|
1071
|
+
# @option opts [Integer] :unix_ms
|
|
1072
1072
|
# @option opts [String] :iso ISO-8601 timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `source_tz=Area/City`, `source_ip=...`, `source_lat=...&source_lon=...`, or `source_offset=±HH:MM`.
|
|
1073
1073
|
# @option opts [String] :source_tz Used only with `iso=...` when the ISO value has no explicit offset.
|
|
1074
1074
|
# @option opts [String] :source_ip Used only with `iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
1075
1075
|
# @option opts [Float] :source_lat Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lon` to resolve that local wall-clock time through the timezone mapped from these coordinates.
|
|
1076
1076
|
# @option opts [Float] :source_lon Used only with `iso=...` when the ISO value has no explicit offset. Provide together with `source_lat`.
|
|
1077
1077
|
# @option opts [String] :source_offset Used only with `iso=...` when the ISO value has no explicit offset. Interprets that local wall-clock time at this fixed UTC offset.
|
|
1078
|
-
# @option opts [Integer] :compare_unix
|
|
1079
|
-
# @option opts [Integer] :compare_unix_ms
|
|
1078
|
+
# @option opts [Integer] :compare_unix
|
|
1079
|
+
# @option opts [Integer] :compare_unix_ms
|
|
1080
1080
|
# @option opts [String] :compare_iso ISO-8601 comparison timestamp. To supply a local wall-clock time without an explicit offset, pair it with one of `compare_source_tz=Area/City`, `compare_source_ip=...`, `compare_source_lat=...&compare_source_lon=...`, or `compare_source_offset=±HH:MM`.
|
|
1081
1081
|
# @option opts [String] :compare_source_tz Used only with `compare_iso=...` when the ISO value has no explicit offset.
|
|
1082
1082
|
# @option opts [String] :compare_source_ip Used only with `compare_iso=...` when the ISO value has no explicit offset. Resolves that local wall-clock time through the timezone mapped from this IP address.
|
|
@@ -1219,7 +1219,7 @@ module TimeLogic::Api
|
|
|
1219
1219
|
return_type = opts[:debug_return_type] || 'ElapsedResponse'
|
|
1220
1220
|
|
|
1221
1221
|
# auth_names
|
|
1222
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
1222
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
1223
1223
|
|
|
1224
1224
|
new_options = opts.merge(
|
|
1225
1225
|
:operation => :"TimeApi.get_elapsed",
|
|
@@ -1322,7 +1322,7 @@ module TimeLogic::Api
|
|
|
1322
1322
|
return_type = opts[:debug_return_type] || 'GetTimezone200Response'
|
|
1323
1323
|
|
|
1324
1324
|
# auth_names
|
|
1325
|
-
auth_names = opts[:debug_auth_names] || ['
|
|
1325
|
+
auth_names = opts[:debug_auth_names] || ['apiKeyHeader', 'bearerAuth', 'apiKeyQuery', 'rapidApiKey', 'rapidApiHost']
|
|
1326
1326
|
|
|
1327
1327
|
new_options = opts.merge(
|
|
1328
1328
|
:operation => :"TimeApi.get_timezone",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
|
|
8
|
-
Generated by: https://
|
|
8
|
+
Generated by: https://github.com/TimeLogic-API-LLC/timelogic-api-sdks.git
|
|
9
9
|
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
@@ -30,9 +30,9 @@ module TimeLogic::Api
|
|
|
30
30
|
|
|
31
31
|
# Initializes the ApiClient
|
|
32
32
|
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
|
33
|
-
def initialize(config =
|
|
34
|
-
@config = config
|
|
35
|
-
@user_agent = "
|
|
33
|
+
def initialize(config = nil)
|
|
34
|
+
@config = config || Configuration.new
|
|
35
|
+
@user_agent = "TimeLogicAPI/#{VERSION}/ruby"
|
|
36
36
|
@default_headers = {
|
|
37
37
|
'Content-Type' => 'application/json',
|
|
38
38
|
'User-Agent' => @user_agent
|
|
@@ -97,7 +97,7 @@ module TimeLogic::Api
|
|
|
97
97
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
|
98
98
|
query_params = opts[:query_params] || {}
|
|
99
99
|
form_params = opts[:form_params] || {}
|
|
100
|
-
follow_location = opts[:follow_location]
|
|
100
|
+
follow_location = opts.key?(:follow_location) ? opts[:follow_location] : false
|
|
101
101
|
|
|
102
102
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
|
103
103
|
|
|
@@ -114,7 +114,7 @@ module TimeLogic::Api
|
|
|
114
114
|
:ssl_verifyhost => _verify_ssl_host,
|
|
115
115
|
:sslcert => @config.cert_file,
|
|
116
116
|
:sslkey => @config.key_file,
|
|
117
|
-
:verbose =>
|
|
117
|
+
:verbose => false,
|
|
118
118
|
:followlocation => follow_location
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -197,7 +197,7 @@ module TimeLogic::Api
|
|
|
197
197
|
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
|
198
198
|
"explicitly with `tempfile.delete`"
|
|
199
199
|
else
|
|
200
|
-
fail ApiException.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
|
|
200
|
+
fail ApiException.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
|
|
201
201
|
end
|
|
202
202
|
|
|
203
203
|
tempfile
|
|
@@ -319,7 +319,7 @@ module TimeLogic::Api
|
|
|
319
319
|
|
|
320
320
|
# Sets user agent in HTTP header
|
|
321
321
|
#
|
|
322
|
-
# @param [String] user_agent User agent (e.g.
|
|
322
|
+
# @param [String] user_agent User agent (e.g. TimeLogicAPI/ruby/1.0.0)
|
|
323
323
|
def user_agent=(user_agent)
|
|
324
324
|
@user_agent = user_agent
|
|
325
325
|
@default_headers['User-Agent'] = @user_agent
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
|
|
8
|
-
Generated by: https://
|
|
8
|
+
Generated by: https://github.com/TimeLogic-API-LLC/timelogic-api-sdks.git
|
|
9
9
|
Generator version: 7.10.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
@@ -244,7 +244,7 @@ module TimeLogic::Api
|
|
|
244
244
|
# Returns Auth Settings hash for api client.
|
|
245
245
|
def auth_settings
|
|
246
246
|
{
|
|
247
|
-
'
|
|
247
|
+
'bearerAuth' =>
|
|
248
248
|
{
|
|
249
249
|
type: 'bearer',
|
|
250
250
|
in: 'header',
|
|
@@ -252,14 +252,14 @@ module TimeLogic::Api
|
|
|
252
252
|
key: 'Authorization',
|
|
253
253
|
value: "Bearer #{access_token_with_refresh}"
|
|
254
254
|
},
|
|
255
|
-
'
|
|
255
|
+
'apiKeyHeader' =>
|
|
256
256
|
{
|
|
257
257
|
type: 'api_key',
|
|
258
258
|
in: 'header',
|
|
259
259
|
key: 'X-API-Key',
|
|
260
260
|
value: api_key_with_prefix('X-API-Key')
|
|
261
261
|
},
|
|
262
|
-
'
|
|
262
|
+
'apiKeyQuery' =>
|
|
263
263
|
{
|
|
264
264
|
type: 'api_key',
|
|
265
265
|
in: 'query',
|
|
@@ -288,7 +288,7 @@ module TimeLogic::Api
|
|
|
288
288
|
[
|
|
289
289
|
{
|
|
290
290
|
url: "https://{host}",
|
|
291
|
-
description: "Default
|
|
291
|
+
description: "Default TimeLogic API host; override `host` for a customer-specific domain or subdomain.",
|
|
292
292
|
variables: {
|
|
293
293
|
host: {
|
|
294
294
|
description: "HTTPS hostname serving this API.",
|