Object subclass: #Painting instanceVariableNames: 'title painter imageUrl' classVariableNames: '' poolDictionaries: '' category: 'Paintings'! !Painting methodsFor: 'accessing' stamp: 'RoelofWobben 2/25/2019 20:09'! painter ^ painter! ! !Painting methodsFor: 'accessing' stamp: 'RoelofWobben 2/25/2019 20:09'! title: anObject title := anObject! ! !Painting methodsFor: 'accessing' stamp: 'RoelofWobben 2/25/2019 20:17'! imageUrl: anObject imageUrl := anObject! ! !Painting methodsFor: 'accessing' stamp: 'RoelofWobben 2/25/2019 20:17'! imageUrl ^ imageUrl! ! !Painting methodsFor: 'accessing' stamp: 'RoelofWobben 2/25/2019 20:09'! title ^ title! ! !Painting methodsFor: 'accessing' stamp: 'RoelofWobben 2/25/2019 20:09'! painter: anObject painter := anObject! ! !Painting methodsFor: 'instance creation' stamp: 'RoelofWobben 2/25/2019 20:10'! fromJSON: json | instance | instance := self new. instance title: (json at: 'title'); painter: (json at: 'principalOrFirstMaker'); imageUrl: ((json at: 'webImage') at: 'url'). ^ instance ! ! Object subclass: #Paintings instanceVariableNames: 'paintings' classVariableNames: '' poolDictionaries: '' category: 'Paintings'! !Paintings methodsFor: 'instance creation' stamp: 'RoelofWobben 2/25/2019 20:29'! addPainting: aPainting paintings add: aPainting. ! ! !Paintings methodsFor: 'instance creation' stamp: 'RoelofWobben 2/25/2019 20:12'! fromJSON: json | instance artObjects | instance := self new. artObjects := json at: #artObjects. artObjects do: [ :eachArtObject | instance addPainting: (Painting fromJSON: eachArtObject) ]. ^ instance! ! !Paintings methodsFor: 'instance creation' stamp: 'RoelofWobben 2/25/2019 20:15'! initialize super initialize. paintings := OrderedCollection new. ! !