plate_api 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/plate_api/connector.rb +2 -1
- data/lib/plate_api/object_handler.rb +2 -2
- data/lib/plate_api/plate_object/base.rb +2 -2
- data/lib/plate_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d6286414ebf7faeb04ee3886b71b11b367cbb1d39138e06a96960bd73aa9012
|
4
|
+
data.tar.gz: c7cf1783b9491e1dfc41399c1b93133997573723aaee8c5df04e96298a7998b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dea1b06ec0c8ae3bbfb718f87e4bcb13bd9e2fd822d78ca51ebbf91a8fa3eceafc247174a72d9368b41b78b6f935a60363f1a67823186afe0167776077ad2ff
|
7
|
+
data.tar.gz: af44af8cf34d342fe1650c137d754d57ad1323ee5f6fbc4b542706eb4b867545aba385b245e50369701cbdd5d3246458c5fca30dd604233c6a1c587ea0596dcc
|
data/Gemfile.lock
CHANGED
data/lib/plate_api/connector.rb
CHANGED
@@ -43,7 +43,8 @@ module PlateApi
|
|
43
43
|
sections: PlateApi::PlateObject::Section,
|
44
44
|
rows: PlateApi::PlateObject::Row,
|
45
45
|
columns: PlateApi::PlateObject::Column,
|
46
|
-
elements: PlateApi::PlateObject::Element
|
46
|
+
elements: PlateApi::PlateObject::Element,
|
47
|
+
attachments: PlateApi::PlateObject::Attachment
|
47
48
|
}
|
48
49
|
end
|
49
50
|
|
@@ -66,11 +66,11 @@ module PlateApi
|
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
-
def index(parent_class, parent_id)
|
69
|
+
def index(parent_class, parent_id, extra_params={})
|
70
70
|
raise ArgumentError.new("`parent_id` given for #index is not valid") unless parent_id
|
71
71
|
raise ArgumentError.new("`parent_class` given for #index is not valid") unless parent_class
|
72
72
|
|
73
|
-
result = @api_connector.get(collection_path(parent_class, parent_id))
|
73
|
+
result = @api_connector.get(collection_path(parent_class, parent_id), extra_params)
|
74
74
|
if result["data"]
|
75
75
|
return result["data"].map{|x| new_object(x)}
|
76
76
|
else
|
@@ -93,8 +93,8 @@ module PlateApi::PlateObject
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def self.define_has_many_method(plural_name, klass)
|
96
|
-
define_method(plural_name.to_s) do
|
97
|
-
@object_handler.api_connector.handler(Object.const_get(klass)).index(self.class, @id)
|
96
|
+
define_method(plural_name.to_s) do |params={}|
|
97
|
+
@object_handler.api_connector.handler(Object.const_get(klass)).index(self.class, @id, params)
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
data/lib/plate_api/version.rb
CHANGED