PromiseWrapper
public struct PromiseWrapper : WebcomWrapper, Equatable, CustomStringConvertible, CustomDebugStringConvertible
The type that wraps AuthenticationDetails in order to enrich it with a PromiseKit-based API.
See also the documentation section of WebcomWrapper for the corresponding wrapped type.
To use this type, import the following dependency in your code:
import WebcomPromises
-
Declaration
Swift
public let wrapped: AuthenticationDetails
-
Downloads the avatar representing the user.
This method downloads the content from
avatarURL.Declaration
Swift
public func downloadAvatar(session: URLSession? = nil) -> Promise<UIImage>Parameters
sessionThe session to use to download the avatar. When
nil,Webcom.defaultSessionis used.Return Value
A promise that represents the avatar.
PromiseWrapper Structure