22 lines
671 B
Smalltalk
22 lines
671 B
Smalltalk
accessing
|
|
getMessages
|
|
| lastTweetsRaw customQuery lastTweets |
|
|
lastTweetsRaw := self rssFeed xmlDocument xpath: '//item'.
|
|
lastTweets := TweetsCollection new.
|
|
customQuery := Dictionary new
|
|
at: 'parameters' put: self;
|
|
at: 'date' put: DateAndTime now;
|
|
yourself.
|
|
lastTweets query: customQuery.
|
|
lastTweetsRaw doWithIndex: [ :rssTweet :i | | tempTweet |
|
|
tempTweet := Tweet new fromNitterRssItem: rssTweet.
|
|
tempTweet metadata
|
|
at: 'queryDate' put: (customQuery at: 'date');
|
|
at: 'order' put: i;
|
|
yourself.
|
|
tempTweet user userName = self userName
|
|
ifFalse: [ tempTweet retweetedBy add: self userName ].
|
|
lastTweets add: tempTweet
|
|
].
|
|
^ lastTweets
|
|
|