webflow_sync 6.1.1 → 6.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/webflow_sync/api.rb +1 -10
- data/lib/webflow_sync/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: acaae64b1e573657f4983a9dc387f22da9be1f4c03a3d3475179cf9dcb288ab9
|
4
|
+
data.tar.gz: f169ae62d45a2136607438bd7c329939f3459126a7e27fd62ff26bbfd713ee74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 752e7ad6219a4f5062bf7ef970cf48117aa33a1ab8beb25df0630154f3e3cfc8bd997430753f4ea2731545072254e8c1e20ac73539246e00e4038709a23faae8
|
7
|
+
data.tar.gz: ac6ac22d798f4dca3ac516be03a2877d9da52f0c3e4256fafa09b544a74ba7327ef183b17cf18a7e607f4ad8ff95c754ed659ea0d90f37504e6cc689da4e4473
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module WebflowSync
|
4
|
-
class Api
|
4
|
+
class Api
|
5
5
|
attr_reader :site_id
|
6
6
|
|
7
7
|
def initialize(site_id = nil)
|
@@ -30,14 +30,11 @@ module WebflowSync
|
|
30
30
|
items
|
31
31
|
end
|
32
32
|
|
33
|
-
def self.get_all_items(collection_slug:, page_limit: 100) = new.get_all_items(collection_slug:, page_limit:)
|
34
|
-
|
35
33
|
def get_item(collection_slug, webflow_item_id)
|
36
34
|
collection = find_webflow_collection(collection_slug)
|
37
35
|
|
38
36
|
make_request(:item, collection['_id'], webflow_item_id)
|
39
37
|
end
|
40
|
-
def self.get_item(collection_slug, webflow_item_id) = new.get_item(collection_slug, webflow_item_id)
|
41
38
|
|
42
39
|
def create_item(record, collection_slug)
|
43
40
|
collection = find_webflow_collection(collection_slug)
|
@@ -53,8 +50,6 @@ module WebflowSync
|
|
53
50
|
end
|
54
51
|
end
|
55
52
|
|
56
|
-
def self.create_item(record, collection_slug) = new.create_item(record, collection_slug)
|
57
|
-
|
58
53
|
def update_item(record, collection_slug)
|
59
54
|
collection = find_webflow_collection(collection_slug)
|
60
55
|
response = make_request(:update_item, { '_cid' => collection['_id'], '_id' => record.webflow_item_id },
|
@@ -64,8 +59,6 @@ module WebflowSync
|
|
64
59
|
response
|
65
60
|
end
|
66
61
|
|
67
|
-
def self.update_item(record, collection_slug) = new.update_item(record, collection_slug)
|
68
|
-
|
69
62
|
def delete_item(collection_slug, webflow_item_id)
|
70
63
|
collection = find_webflow_collection(collection_slug)
|
71
64
|
# deleting items from Webflow doesn't work as expected.
|
@@ -79,8 +72,6 @@ module WebflowSync
|
|
79
72
|
response
|
80
73
|
end
|
81
74
|
|
82
|
-
def self.delete_item(collection_slug, webflow_item_id) = new.delete_item(collection_slug, webflow_item_id)
|
83
|
-
|
84
75
|
def publish
|
85
76
|
response = make_request(:publish, site_id, domain_names:)
|
86
77
|
|
data/lib/webflow_sync/version.rb
CHANGED