amplify_syndication 0.2.2 → 0.3.2
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/CHANGELOG.md +48 -0
- data/lib/amplify_syndication/api.rb +24 -9
- data/lib/amplify_syndication/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7574dd18cfcb664982bd58bac580c86a3a0414da03f6e969ea707fa13f44be9b
|
|
4
|
+
data.tar.gz: 05317e7cf3994f09d27b2e1cfecc7775d400bb4222a64281da3540e84c2fbcdc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99d5d0b34d293b5c32a088bc0d54fb46dbd860af70b58b30b5e4646aa3c5bc4d30f42e8514b0f7589aa72285a2df250218502840b52afb1fac3fdfcc0217785c
|
|
7
|
+
data.tar.gz: d10722a79d7fc28cbb3c91e1224e6ff85b43544f34ba22b2dd8ddc123c85b6435fd80013d8fd38174812f03b6d839d23b17d38a0c25bc56b2ee38cedd0bdbde1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
## 0.3.2 (2025-11-19)
|
|
2
|
+
|
|
3
|
+
### Improved
|
|
4
|
+
- Internal request logging now clearly displays the final AMPRE request path for easier debugging.
|
|
5
|
+
- Media filter logic now mirrors the stable pattern used in Property replication filters.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- Corrected Media API $filter construction to comply with AMPRE OData requirements.
|
|
9
|
+
- Removed incorrect manual URI-encoding that caused 400 The URI is malformed errors.
|
|
10
|
+
- Resolved issues where HTTPClient encoding differed from curl behavior, ensuring valid query formation.
|
|
11
|
+
- Restored full pagination functionality for media fetching via:
|
|
12
|
+
- `fetch_all_media_for_resource`
|
|
13
|
+
|
|
14
|
+
## 0.3.1 (2025-11-18)
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Full media pagination support:
|
|
18
|
+
- `fetch_media_batch`
|
|
19
|
+
- `each_media_batch`
|
|
20
|
+
- `fetch_all_media_for_listing`
|
|
21
|
+
- Media batching now matches the Property replication architecture.
|
|
22
|
+
- Support for listing-level media syncs with ordered pagination (`Order asc, MediaKey`).
|
|
23
|
+
|
|
24
|
+
### Improved
|
|
25
|
+
- Internal consistency updates across API helper layers.
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- Minor documentation improvements around Media calls.
|
|
29
|
+
|
|
30
|
+
## 0.2.2
|
|
31
|
+
|
|
32
|
+
#### Enhancements
|
|
33
|
+
|
|
34
|
+
- Added lookup helpers:
|
|
35
|
+
- `fetch_lookup_batch`
|
|
36
|
+
- `each_lookup_batch`
|
|
37
|
+
- `fetch_all_lookups`
|
|
38
|
+
- `lookup(lookup_name, batch_size:, sleep_seconds:)`
|
|
39
|
+
These support optional filters and configurable sleep intervals for safer long-running syncs.
|
|
40
|
+
|
|
41
|
+
- Added replication helpers:
|
|
42
|
+
- `fetch_initial_download_batch`
|
|
43
|
+
- `each_initial_download_batch`
|
|
44
|
+
- Improved `perform_initial_download` and `fetch_updates` to support batch-style processing and resumable checkpoints.
|
|
45
|
+
|
|
46
|
+
- Improved internal filter construction for replication queries to better combine user-provided filters with checkpoint-based ranges.
|
|
47
|
+
|
|
48
|
+
|
|
1
49
|
## 0.1.0
|
|
2
50
|
|
|
3
51
|
API Client for use with Amplify Syndication API
|
|
@@ -326,17 +326,32 @@ module AmplifySyndication
|
|
|
326
326
|
fetch_with_options("Media", query_options)
|
|
327
327
|
end
|
|
328
328
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
filter = "ResourceRecordKey eq '#{resource_key}' and ResourceName eq '#{resource_name}'"
|
|
329
|
+
def fetch_all_media_for_resource(resource_name, resource_key, batch_size: 100, sleep_seconds: 1)
|
|
330
|
+
filter = "(ResourceRecordKey eq '#{resource_key}' and ResourceName eq '#{resource_name}')"
|
|
332
331
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
"$orderby" => "ModificationTimestamp,MediaKey",
|
|
336
|
-
"$top" => batch_size
|
|
337
|
-
}
|
|
332
|
+
results = []
|
|
333
|
+
skip = 0
|
|
338
334
|
|
|
339
|
-
|
|
335
|
+
loop do
|
|
336
|
+
query_options = {
|
|
337
|
+
"$filter" => filter,
|
|
338
|
+
"$orderby" => "ModificationTimestamp,MediaKey",
|
|
339
|
+
"$top" => batch_size,
|
|
340
|
+
"$skip" => skip
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
response = fetch_with_options("Media", query_options)
|
|
344
|
+
batch = response["value"] || []
|
|
345
|
+
break if batch.empty?
|
|
346
|
+
|
|
347
|
+
results.concat(batch)
|
|
348
|
+
|
|
349
|
+
break if batch.size < batch_size
|
|
350
|
+
skip += batch_size
|
|
351
|
+
sleep(sleep_seconds)
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
results
|
|
340
355
|
end
|
|
341
356
|
end
|
|
342
357
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: amplify_syndication
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephen Higgins
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httpclient
|