Method: Unsplash::Photo.search
- Defined in:
- lib/unsplash/photo.rb
.search(query, page = 1, per_page = 10, orientation = nil, content_filter = "low") ⇒ SearchResult
Search for photos by keyword.
90 91 92 93 94 95 96 97 98 99 |
# File 'lib/unsplash/photo.rb', line 90 def search(query, page = 1, per_page = 10, orientation = nil, content_filter = "low") params = { query: query, page: page, per_page: per_page, orientation: orientation, content_filter: content_filter }.select { |_k, v| v } Unsplash::Search.search("/search/photos", self, params) end |