reso_transport 1.5.8 → 1.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -2
- data/lib/reso_transport/query.rb +6 -0
- data/lib/reso_transport/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: 49e97dc43976dfe814ab0bdc7ce7aea16ae5f03e00c94d10d60de3319cb4d388
|
4
|
+
data.tar.gz: f15dd31a948a33dbd8008447be68828ba953114214b7633ff8a4628afa2bdfeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 375f0962243d54dd27b80da550281fbc1a3b2e9a92affc6cb3a00e94104f5be0fddf6b3e1e5e636fc77a557d2a21438427867af8a66b1b18ae4a897c1027d5f1
|
7
|
+
data.tar.gz: 272dedeb65d29749ff3abeacb955c900a9e7e7dcf2449b53ab1bf9c6f7b996e84b78773f635868e603cc86eb34812a7e3b88f7e981ae41ce671055ddc9fd02a2
|
data/README.md
CHANGED
@@ -93,8 +93,13 @@ If the connection requires requesting a new token periodically, it's easy to pro
|
|
93
93
|
|
94
94
|
This will pre-fetch a token from the provided endpoint when the current token is either non-existent or has expired.
|
95
95
|
|
96
|
-
The `use_replication_endpoint` flag will append `/replication` to all resource queries if set to `true`. This is required
|
97
|
-
|
96
|
+
The `use_replication_endpoint` flag will append `/replication` to all resource queries if set to `true`. This is required by some data sources to query resources beyond 10,000 records.
|
97
|
+
|
98
|
+
When using this feature, you can retrieve the next link by accessing `next_link` after gettings results:
|
99
|
+
```
|
100
|
+
results = @client.resources["Property"].query.results
|
101
|
+
next_link = @client.resources["Property"].query.next_link
|
102
|
+
```
|
98
103
|
|
99
104
|
### Caching Metadata
|
100
105
|
|
data/lib/reso_transport/query.rb
CHANGED
@@ -66,10 +66,16 @@ module ResoTransport
|
|
66
66
|
def results
|
67
67
|
parsed = handle_response response
|
68
68
|
|
69
|
+
@next_link = parsed.fetch('@odata.nextLink')
|
69
70
|
results = Array(parsed.delete('value'))
|
70
71
|
resource.parse(results)
|
71
72
|
end
|
72
73
|
|
74
|
+
# Can only be accessed after results call
|
75
|
+
def next_link
|
76
|
+
@next_link
|
77
|
+
end
|
78
|
+
|
73
79
|
def response
|
74
80
|
resource.get(compile_params)
|
75
81
|
rescue Faraday::ConnectionFailed
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reso_transport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Druse
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05
|
11
|
+
date: 2021-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|