webflow-ruby 0.3.1 → 0.4.0
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/lib/webflow/client.rb +9 -0
- data/lib/webflow/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c701be2da9f8559cd2f9b45398a29c1678217de
|
4
|
+
data.tar.gz: 3dc52b13786c938395a34a9cc7e92d07abb36cf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7accce76a13bb5ccd5ab53cb8edce6a5be4a12ef19dac34c7576e59f1e562619e03989497178c1c983718fbbae30e284220ba06f4681c63ac21be602ce367cdb
|
7
|
+
data.tar.gz: bb955ccc59fd1b00c812f9cb450d92cc0bb4f9dcb7b754650d914f6411a12f8c5312e408dfdc896ac2c6abd36b8ed50633f17422689f6f6b9d555e4e77daf155
|
data/lib/webflow/client.rb
CHANGED
@@ -44,11 +44,20 @@ module Webflow
|
|
44
44
|
get("/sites/#{site_id}/collections")
|
45
45
|
end
|
46
46
|
|
47
|
+
def collection(collection_id)
|
48
|
+
get("/collections/#{collection_id}")
|
49
|
+
end
|
50
|
+
|
47
51
|
def items(collection_id, limit: 100)
|
48
52
|
json = get("/collections/#{collection_id}/items", params: {limit: limit})
|
49
53
|
json['items']
|
50
54
|
end
|
51
55
|
|
56
|
+
def item(collection_id, item_id)
|
57
|
+
json = get("/collections/#{collection_id}/items/#{item_id}")
|
58
|
+
json['items'].first
|
59
|
+
end
|
60
|
+
|
52
61
|
def create_item(collection_id, data)
|
53
62
|
post("/collections/#{collection_id}/items", fields: data)
|
54
63
|
end
|
data/lib/webflow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webflow-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- phoet
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|