Package com.onfido
Class LivePhotoManager
- java.lang.Object
-
- com.onfido.api.ResourceManager
-
- com.onfido.LivePhotoManager
-
public class LivePhotoManager extends ResourceManager
Manager class for the Live photo resource type. Contains resource-specific methods for interacting with the API.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLivePhotoManager(Config config, okhttp3.OkHttpClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileDownloaddownload(String livePhotoId)Downloads a live photo.LivePhotofind(String livePhotoId)Retrieves a single live photo.List<LivePhoto>list(String applicantId)Lists the live photos that belong to an applicant.LivePhotoupload(InputStream inputStream, String fileName, LivePhoto.Request request)Uploads a live photo as part of a multipart request.-
Methods inherited from class com.onfido.api.ResourceManager
addFormDataParam, deleteRequest, downloadRequest, get, post, put, readInputStream, uploadRequest
-
-
-
-
Constructor Detail
-
LivePhotoManager
protected LivePhotoManager(Config config, okhttp3.OkHttpClient client)
-
-
Method Detail
-
upload
public LivePhoto upload(InputStream inputStream, String fileName, LivePhoto.Request request) throws IOException, OnfidoException
Uploads a live photo as part of a multipart request.- Parameters:
inputStream- the content from the desired file as an InputStreamfileName- the file name, including the file extensionrequest- the request body- Returns:
- the live photo
- Throws:
IOException- the io exceptionOnfidoException- the onfido exception
-
download
public FileDownload download(String livePhotoId) throws OnfidoException
Downloads a live photo.- Parameters:
livePhotoId- the live photo id- Returns:
- the downloaded file as a FileDownload
- Throws:
OnfidoException- the onfido exception
-
find
public LivePhoto find(String livePhotoId) throws OnfidoException
Retrieves a single live photo.- Parameters:
livePhotoId- the live photo id- Returns:
- the LivePhoto
- Throws:
OnfidoException- the onfido exception
-
list
public List<LivePhoto> list(String applicantId) throws OnfidoException
Lists the live photos that belong to an applicant.- Parameters:
applicantId- the applicant id- Returns:
- the list of LivePhotos
- Throws:
OnfidoException- the onfido exception
-
-