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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3874cf42b829542c647a91935f17fe61d04072b8ad3f30ac8a483e8a019bb6ab
4
- data.tar.gz: 32af885137c5c68b1720e6ec816adf584b4215540cc004fac9824fe71bcea3d4
3
+ metadata.gz: acaae64b1e573657f4983a9dc387f22da9be1f4c03a3d3475179cf9dcb288ab9
4
+ data.tar.gz: f169ae62d45a2136607438bd7c329939f3459126a7e27fd62ff26bbfd713ee74
5
5
  SHA512:
6
- metadata.gz: 32209b9c2500d2ba13f229fc4826296ead24d002fd2ee429f2c4c71076c70f8a23fb3bad1b4386cf4253120a958bfef10bd832ab4c2496b3914a542282d3beca
7
- data.tar.gz: d447ac378e5c6ceb3ee19e400e2e337baefbc152146a58b5a64a371fe49d18c1fc72f4e9e9328a924a37749e22608faadf1d449847ef55b32296f56902b4384e
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 # rubocop:disable Metrics/ClassLength
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WebflowSync
4
- VERSION = '6.1.1'
4
+ VERSION = '6.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webflow_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.1
4
+ version: 6.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Viktor