Socialmetrica/Socialmetrica.package/NitterUser.class/instance/messages.st

12 lines
475 B
Smalltalk

accessing
messages
messages ifNil: [ messages := TweetsCollection new ].
messages ifEmpty: [ self getRemoteMessagesFromHtml ].
[ config at: 'reportingPeriod' ]
onErrorDo: [ self config
at: 'reportingPeriod'
put: (Timespan
starting: (messages oldest created asDateAndTime)
ending: (messages newest created asDateAndTime + 1 minute)) ].
^ messages select: [ :message | message created between: self reportingPeriod start and: self reportingPeriod end ]