DMarby / picsum-photos

Lorem Ipsum... but for photos.
https://picsum.photos
MIT License
2.21k stars 153 forks source link

Enhancement to List images #17

Closed nasrulhazim closed 5 years ago

nasrulhazim commented 8 years ago

Hi there,

Is it possible to have the following features to the List Images?

  1. Pagination
  2. Limit
  3. Randomize List

Currently it's fetching all of photo list.

jskrzypek commented 8 years ago

This would be great. Also it would be nice if we could get the source.unsplash.com/{photo_id} url as well.

DMarby commented 8 years ago

@jskrzypek There's already way to get a specific photo, simply add the query parameter ?image={id} to the URL (https://unsplash.it/200/200?image=2)

jskrzypek commented 8 years ago

@DMarby, sure for one photo that works. But I want to get a list of photos where one of the fields is a direct link to a photo. I want to be able to pass the list to something that can use the metadata and grab the image from a download_url property or something without having to apply a transform on the url.

flo-sch commented 7 years ago

@DMarby where can I find the ID the photos ?

For instance, https://unsplash.com/photos/EeEx8zpOESA

Is the only possible way to go trough the entire list : https://unsplash.it/images and find the corresponding number?

I think it would be amazing to look by its slug aswell, once we find it on unsplash?

yusijs commented 7 years ago

@DMarby any chance for at least a limit?

Would be happy to send a PR, if you're open for that? :)

DMarby commented 6 years ago

Sorry for the super late response to this. It sounds like a great idea to add pagination + limits, as well as directly linking to the photo rather than needing to transform it. Will make sure that this gets into the API during the current rewrite.

DMarby commented 5 years ago

I've added a new list endpoint that has pagination, limits, and contains a field called download_url for getting a direct link to the full-sized image. It can be found on https://picsum.photos/v2/list. For more info on how to use it, see https://picsum.photos