I have the following code:
twitterAPI?.verifyCredentialsWithUserSuccessBlock({ (userName, password) -> Void in
twitterAPI?.getUserTimelin
Here is the simple example. But better to make an implementation through monad.
...
guard let api = twitterAPI else { return }
api.verifyCredentialsWithUserSuccessBlock({ userName, password in
api.getUserTimelineWithScreenName(
userName,
count: 100,
successBlock: { value in
// success
}) { error in
print("get user error: \(error)")
}
}) { error in
print("verify error: \(error)")
}