Closed antaranyan closed 1 year ago
For example, capabilities of UserProfileView
, such as readBio
, make sense only for a successfully loaded profile view. Before it's loaded or if it can't be loaded, these would be different interfaces.
For this case, it seems like UserProfileView
is a result of an operation that might fail, so having open
as an instance method is not convenient. I imagine a better way will be having a top-level structure like TwitterBrowser
instance, which will call openUserProfile
yielding a UserProfileView
in event of success, and UserNotFoundView
when it fails.
Might affect the scope of #25 #32
As another example, capabilities of UsetTweetsView
, such as readNextTweet
, don't make much sense if it's not loaded, or the target user is private.
It gets more interesting as (unauthorized) user flow can be interrupted by login dialog.
Follow up on #35
_Originally posted by @antaranyan in https://github.com/despan/machina/pull/9#discussion_r985287182_