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

22 lines
769 B
Smalltalk
Raw Permalink Normal View History

accessing
2022-04-11 17:11:10 +00:00
getRemoteMessagesFromRss
| customQuery lastTweetsRaw 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-14 22:40:41 +00:00
self messages: lastTweets