airtable_sync 1.2.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/services/airtable_sync/api.rb +5 -4
- data/lib/airtable_sync/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a480b8076e6b47d0ed15470f989bafe1e2adee95647d99207e137f1d97bf622b
|
4
|
+
data.tar.gz: e76d47b26b82fee48b17cc622270f63e1e35bf5926a34d0d410e2a8461bc6306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d9cd9a364a82df47734c6585b48043e6d9a4968696a56b5b9e885f54315fde8fdca25c6e2e3c0c36c896adb2138056c12f538387fdd795a2899fc79d781503b
|
7
|
+
data.tar.gz: 4f4e5643c99577806ea6c59895aa3ec6da9914453e6ccce35ae28859a2fa2bed0bc25bf8f25565dd482d133837b6bf3ebe23509087703689e2d21a224a2791a9
|
@@ -4,10 +4,13 @@ module AirtableSync
|
|
4
4
|
class Api
|
5
5
|
attr_reader :base_id
|
6
6
|
|
7
|
-
def initialize(base_id)
|
7
|
+
def initialize(base_id = nil)
|
8
8
|
@base_id = base_id
|
9
9
|
end
|
10
10
|
|
11
|
+
def bases = JSON[Airrecord::Client.new(ENV.fetch('AIRTABLE_PERSONAL_ACCESS_TOKEN')).connection.get('/v0/meta/bases').body]['bases']
|
12
|
+
def self.bases = new.bases
|
13
|
+
|
11
14
|
def get_all_items(table_name:) = table(table_name).all
|
12
15
|
|
13
16
|
def get_item(table_name, airtable_id) = table(table_name).find(airtable_id)
|
@@ -25,8 +28,6 @@ module AirtableSync
|
|
25
28
|
|
26
29
|
def delete_record(table_name, airtable_id) = table(table_name).find(airtable_id).destroy
|
27
30
|
|
28
|
-
|
29
|
-
|
30
|
-
def table(table_name) = Airrecord.table(AirtableSync.configuration.api_key, base_id, table_name)
|
31
|
+
def table(table_name) = Airrecord.table(AirtableSync.configuration.api_key, base_id, table_name)
|
31
32
|
end
|
32
33
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airtable_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Viktor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: airrecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.0.12
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.0.12
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|