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

24 lines
733 B
Smalltalk
Raw Normal View History

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.
].
2022-04-05 20:30:52 +00:00
self tweets: lastTweets.
^ self tweets