2022-04-01 22:22:33 +00:00
|
|
|
accessing
|
|
|
|
messagesAuthors
|
|
|
|
| groupedTweets |
|
|
|
|
self includes at: 'users' ifAbsent: [ ^ nil ].
|
|
|
|
groupedTweets := self data groupedBy: [:each | each at: 'author_id' ].
|
|
|
|
^ (self includes at: 'users') collect: [:userDict | | user |
|
|
|
|
user := TwitterUser new fromDictionary: userDict.
|
|
|
|
(groupedTweets at: (user id)) do: [:tweetDict | | currentTweet |
|
|
|
|
currentTweet := Tweet new fromDictionary: tweetDict.
|
|
|
|
currentTweet user: user.
|
2022-04-14 22:40:41 +00:00
|
|
|
user messages add: currentTweet.
|
2022-04-01 22:22:33 +00:00
|
|
|
].
|
|
|
|
user.
|
|
|
|
]
|