23 lines
706 B
Smalltalk
23 lines
706 B
Smalltalk
accessing
|
|
getMessages
|
|
| lastTweetsRaw customQuery lastTweets |
|
|
lastTweetsRaw := self rssFeed xmlDocument xpath: '//item'.
|
|
lastTweets := TweetsCollection new.
|
|
customQuery := Dictionary new
|
|
at: 'parameters' put: self userNameLink;
|
|
at: 'date' put: DateAndTime now;
|
|
yourself.
|
|
lastTweets query: customQuery.
|
|
lastTweetsRaw doWithIndex: [ :rssTweet :i | | current previous |
|
|
current := Tweet new fromNitterRssItem: rssTweet.
|
|
i < lastTweetsRaw size ifTrue: [
|
|
previous := Tweet new fromNitterRssItem: (lastTweetsRaw at: i + 1).
|
|
current timelines
|
|
at: self userName put: previous id;
|
|
yourself.
|
|
].
|
|
current queries add: customQuery.
|
|
lastTweets add: current.
|
|
].
|
|
^ lastTweets
|
|
|