From f0dfea31b5671a421f6ea10eb7b3dd8573e1751d Mon Sep 17 00:00:00 2001 From: Offray Date: Sun, 10 Dec 2023 13:44:11 -0500 Subject: [PATCH] Testing future collections. --- repository/Brea/Airtable.class.st | 51 ------------------------------- repository/Brea/BreaPage.class.st | 2 +- 2 files changed, 1 insertion(+), 52 deletions(-) delete mode 100644 repository/Brea/Airtable.class.st diff --git a/repository/Brea/Airtable.class.st b/repository/Brea/Airtable.class.st deleted file mode 100644 index c3f8896..0000000 --- a/repository/Brea/Airtable.class.st +++ /dev/null @@ -1,51 +0,0 @@ -" -I model an Airtable (https://airtable.com/) database (or Base as they call it). -" -Class { - #name : #Airtable, - #superclass : #Object, - #instVars : [ - 'id', - 'apiKey' - ], - #category : #Brea -} - -{ #category : #accessing } -Airtable >> apiKey [ - ^ apiKey -] - -{ #category : #accessing } -Airtable >> apiKey: aString [ - apiKey := aString -] - -{ #category : #accessing } -Airtable >> id [ - ^ id -] - -{ #category : #accessing } -Airtable >> id: aString [ - id := aString -] - -{ #category : #'as yet unclassified' } -Airtable >> rawRecords [ - - (self id isNil or: [ self apiKey isNil ]) ifTrue: [ ^ self ]. - ^ ZnClient new - url: (self id); - headerAt: 'Authorization' put: 'Bearer ', (self apiKey); - get. - -] - -{ #category : #'as yet unclassified' } -Airtable >> records [ - - ^ ((NeoJSONReader fromString: (self rawRecords)) at: 'records') - select: [ :each | (each at: 'fields') isNotEmpty ] - -] diff --git a/repository/Brea/BreaPage.class.st b/repository/Brea/BreaPage.class.st index 7b2b08a..afb2bd3 100644 --- a/repository/Brea/BreaPage.class.st +++ b/repository/Brea/BreaPage.class.st @@ -83,7 +83,7 @@ BreaPage >> exportAsHTML [ self splitters ifNotEmpty: [ actionsArray := actionsArray copyWith: [ self split ] future ]. self bodyTag ifNotNil: [ actionsArray := actionsArray copyWith: [ self populateBodyAs: self bodyTag ] future ]. - allActions := TKTFuture all: actionsArray. + allActions := TKTFuture fromCollectionOfFutures: actionsArray. semaphore := Semaphore new. allActions onSuccessDo: [ :values | result := values last.