From 6338a957cff4387321e16932ddf7e0f2589f9b66 Mon Sep 17 00:00:00 2001 From: kev-le Date: Tue, 30 Jan 2024 14:17:06 -0800 Subject: [PATCH] Update readme with new download photo functions --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c6f6973..2d81db9 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ dynamic queuedJob = await apiClient.QueueJob(job.id.Value, new { callback_url = dynamic completedJob = await apiClient.GetJob(queuedJob.id.Value); // DOWNLOAD COMPLETED JOB PHOTOS -JArray photosList = job.photos; -await apiClient.DownloadAllPhotos(photosList, job.profile, "photos/output/"); +JArray photosList = completedJob.photos; +await apiClient.DownloadAllPhotos(photosList, completedJob.profile, "photos/output/"); ``` ### Error Handling @@ -166,6 +166,22 @@ api.UploadProfilePhoto("/path/to/photo", profileId); If upload fails, the photo object is deleted for you. If upload succeeds and you later decide you no longer want to include that image, use api.DeletePhoto(photoId) to remove it. +#### Download photo(s) + +This function handles downloading the output photos to a specified directory. + +```dotnet +JArray photosList = completedJob.photos; + +api.DownloadAllPhotos(photosList, completedJob.profile, "/output/folder/"); +``` + +OR + +```dotnet +api.DownloadPhoto(photoId, "/path/to/photo"); +``` + #### Delete photo This will remove the photo from the job/profile's bucket. Useful for when you've accidentally uploaded an image that you'd like removed.