DXImageClient
This class is responsible for making requests to the DX image API.
The primary use case for this class is making requests for a user's profile pic and cover photo using the profilePic
and coverPhoto
properties on a DXProfile
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.
Properties
Singleton instance of DXImageClient
. You will access all the available DXImageClient
methods through this instance.
Methods
getImage
Request a base 64 representation of an image by its id.
Parameter
Type
Description
forImageId
String
The unique id of the image.
completion
(Error?, Data?) -> Void
The closure invoked when the request finishes.
error
Error?
The error returned for an unsuccessful request.
data
Data?
Base 64 image returned for a successful request.
Last updated