Skip to content

Commit

Permalink
Update readme with new download photo functions
Browse files Browse the repository at this point in the history
  • Loading branch information
kev-le committed Jan 30, 2024
1 parent 7b9bdee commit 6338a95
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 6338a95

Please sign in to comment.