public final class PlayPortalImageClient
The primary use case for this class is making requests for a user's profile pic and cover photo using the
coverPhoto properties on a
PlayPortalProfile instance. The SDK provides helper methods as an extension on UIImageView to simplify displaying a user's images, which means in most cases you won't need to use this class; however, if you'd like to manually do so, this class allows you to request a base 64 representation of an image.
public static let shared: PlayPortalImageClient
Singleton instance of
PlayPortalImageClient. You will access all the available
PlayPortalImageClient methods through this instance.
public func getImage(forImageId imageId: String, _ completion: @escaping (_ error: Error?, _ data: Data?) -> Void) -> Void
Request a base 64 representation of an image by its id.
The unique id of the image.
The closure invoked when the request finishes.
The error returned for an unsuccessful request.
Base 64 image returned for a successful request.