Adding airtable records management.

This commit is contained in:
Ruidajo 2021-10-18 20:23:18 -05:00
parent 2b751b60ed
commit 4d0c56f10b
2 changed files with 63 additions and 1 deletions

View File

@ -38,5 +38,13 @@ Airtable >> rawRecords [
{ #category : #accessing }
Airtable >> records [
^ (NeoJSONReader fromString: self rawRecords contents) at: 'records'
| recordsTemp |
recordsTemp := (NeoJSONReader fromString: self rawRecords contents) at: 'records'.
^ recordsTemp collect: [ :recordsDict |
AirtableRecord new
id: (recordsDict at: 'id');
createdTime: (recordsDict at: 'createdTime');
fields: (recordsDict at: 'fields')
]
]

View File

@ -0,0 +1,54 @@
Class {
#name : #AirtableRecord,
#superclass : #Object,
#instVars : [
'id',
'fields',
'createdTime'
],
#category : #'Grafoscopio-Utils-Grafoscopio-Utils'
}
{ #category : #accessing }
AirtableRecord >> createdTime [
^ createdTime
]
{ #category : #accessing }
AirtableRecord >> createdTime: anObject [
createdTime := anObject
]
{ #category : #accessing }
AirtableRecord >> fields [
^ fields
]
{ #category : #accessing }
AirtableRecord >> fields: anObject [
fields := anObject
]
{ #category : #accessing }
AirtableRecord >> id [
^ id
]
{ #category : #accessing }
AirtableRecord >> id: anObject [
id := anObject
]
{ #category : #accessing }
AirtableRecord >> printOn: aStream [
super printOn:aStream.
aStream
nextPutAll: '(', self id, ')'
]