airtable_sync 1.1.0 → 1.3.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/README.md +0 -3
- data/app/services/airtable_sync/api.rb +4 -1
- data/lib/airtable_sync/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a80340a61e6cecaca43a74f847d55852e43f8884be9ece29d9c72a172b79b2bc
|
4
|
+
data.tar.gz: 1258f6f96dee49db24c686f6b9447296bf9abc9d52800d8c06b973bbe898ffd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efc4f40770bf39d04bac271873d3f696b9327b999f86b30dfde7846becacea7d8a1c73f27d8efd2d9f8ece579044873c9c01923727ae3059f0d528d6acfcde2f
|
7
|
+
data.tar.gz: 197b5a504046f0c3803e4dac85e86d7a94a5b0a48207cfd9c96dc3a12eab40602ec3af48500d661e38eee5a6fe96ce06d3b63d168afcfd3c77c266069656baf8
|
data/README.md
CHANGED
@@ -13,12 +13,9 @@ For the latest changes, see the [CHANGELOG.md](CHANGELOG.md).
|
|
13
13
|
Add this line to your application's Gemfile:
|
14
14
|
|
15
15
|
```ruby
|
16
|
-
gem 'airrecord', github: 'vfonic/airrecord'
|
17
16
|
gem 'airtable_sync'
|
18
17
|
```
|
19
18
|
|
20
|
-
We need to use airrecord fork because the original gem is unfortunately poorly maintained by AirTable and community and I don't have the resources to maintain it myself.
|
21
|
-
|
22
19
|
And then execute:
|
23
20
|
|
24
21
|
```bash
|
@@ -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)
|
metadata
CHANGED
@@ -1,15 +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.3.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-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: airrecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.0.12
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.0.12
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rails
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|