Adding airtable records management.
This commit is contained in:
parent
2b751b60ed
commit
4d0c56f10b
@ -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')
|
||||
]
|
||||
|
||||
]
|
||||
|
54
repository/Grafoscopio-Utils/AirtableRecord.class.st
Normal file
54
repository/Grafoscopio-Utils/AirtableRecord.class.st
Normal 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, ')'
|
||||
|
||||
]
|
Loading…
Reference in New Issue
Block a user