airrecord 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/lib/airrecord/table.rb +9 -4
- data/lib/airrecord/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc85eb8f47b96d2d03f3c2d8ede44021184acce8
|
4
|
+
data.tar.gz: 3177b982ce62cbe58dbade3fd5e5e24dbe43bf9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25d59a038cbd3d619443274a9ddf415767d39f98c46a2f695bad07f60a2d4e4a941325f8957c0f4e938a5d8215c0f2f90578209ce35e24c18268ecd14c6673bd
|
7
|
+
data.tar.gz: cc387e3388f477a9dd538b3f6970486dbff04feed46644603ff17840225d6474b597a38c32fba69b9be779d0ba1dab2873f0817f907e1261fbb51cea6a6f8d21
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/lib/airrecord/table.rb
CHANGED
@@ -43,7 +43,7 @@ module Airrecord
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
def records(filter: nil, sort: nil, view: nil, offset: nil, paginate: true, fields: nil)
|
46
|
+
def records(filter: nil, sort: nil, view: nil, offset: nil, paginate: true, fields: nil, max_records: nil, page_size: nil)
|
47
47
|
options = {}
|
48
48
|
options[:filterByFormula] = filter if filter
|
49
49
|
|
@@ -56,6 +56,8 @@ module Airrecord
|
|
56
56
|
options[:view] = view if view
|
57
57
|
options[:offset] = offset if offset
|
58
58
|
options[:fields] = fields if fields
|
59
|
+
options[:maxRecords] = max_records if max_records
|
60
|
+
options[:pageSize] = page_size if page_size
|
59
61
|
|
60
62
|
path = "/v0/#{base_key}/#{client.escape(table_name)}"
|
61
63
|
response = client.connection.get(path, options)
|
@@ -75,6 +77,8 @@ module Airrecord
|
|
75
77
|
paginate: paginate,
|
76
78
|
fields: fields,
|
77
79
|
offset: parsed_response["offset"],
|
80
|
+
max_records: max_records,
|
81
|
+
page_size: page_size,
|
78
82
|
))
|
79
83
|
end
|
80
84
|
|
@@ -187,16 +191,17 @@ module Airrecord
|
|
187
191
|
def serializable_fields(fields = self.fields)
|
188
192
|
Hash[fields.map { |(key, value)|
|
189
193
|
if association(key)
|
194
|
+
value = [ value ] unless value.is_a?(Enumerable)
|
190
195
|
assocs = value.map { |assoc|
|
191
196
|
assoc.respond_to?(:id) ? assoc.id : assoc
|
192
|
-
}
|
197
|
+
}
|
193
198
|
[key, assocs]
|
194
199
|
else
|
195
200
|
[key, value]
|
196
201
|
end
|
197
|
-
|
202
|
+
}]
|
198
203
|
end
|
199
|
-
|
204
|
+
|
200
205
|
def ==(other)
|
201
206
|
self.class == other.class &&
|
202
207
|
serializable_fields == other.serializable_fields
|
data/lib/airrecord/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airrecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Eskildsen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.6.
|
138
|
+
rubygems_version: 2.6.14
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Airtable client
|