KeenenCharles / AndroidUnplash

An unofficial Unsplash API library for Android
MIT License
85 stars 22 forks source link

Search Functionality #1

Closed jeetdholakia closed 7 years ago

jeetdholakia commented 7 years ago

Hi,

First of all, thanks for the library, I've been looking for a painless way to integrate unsplash in my apps, I cannot see the search feature though? Do you have it in the library?

KeenenCharles commented 7 years ago

Hey, glad you find it useful and yes you can search using the searchPhotos() function. Example:

unsplash.searchPhotos("ocean", 1 /*page number*/, 10 /*number of photos per page*/, new Unsplash.OnPhotosLoadedListener() {
            @Override
            public void onComplete(List<Photo> photos) {

            }

            @Override
            public void onError(String error) {

            }
        });

I'll add some more examples to the readme.

KeenenCharles commented 7 years ago

Hey, there was a bug in the search functionality that I just fixed and uploaded a new version of the library. Just update your version to 0.1.1 and take a look at the example for searching in the readme.