method getPhotos