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

12 lines
481 B
Smalltalk
Raw Normal View History

accessing
updatedTweets
| currentTweetsPage response nextPageCursor |
response := TweetsCollection new.
currentTweetsPage := self collectRawTweetsFrom: self userNameLinkWithReplies upToPage: 2.
[ (currentTweetsPage collect: [ :tweet | tweet id ]) includes: self newestTweet id ] whileFalse: [
response addAll: currentTweetsPage.
nextPageCursor := currentTweetsPage nextCursor.
currentTweetsPage := self collectRawTweetsFrom: nextPageCursor upToPage: 2.
].
^ response