unsplash 1.5.3 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/unsplash/photo.rb +5 -3
- data/lib/unsplash/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50b843a78c7238ade899b63778c570fabc74639a
|
4
|
+
data.tar.gz: d7ef0721cdf37d1b9af1d6b33582276838ffbf42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af9a300311bf7c8609822a1e0147c24cec48c0d3f371bea6e8e1bec28520df4fa0d6491c7e300e9fd3b9af2147aef4397cc3d87967659ece40b4f1df6edb7c9c
|
7
|
+
data.tar.gz: 20616d069b2991aa0b2df43f0f2298de60967cb25ab95eee0a83e45f54544f9340ef3797e7916aad039d70d90c7949d886bdaa667d5b3b0e161e4aa534767b7c
|
data/.gitignore
CHANGED
data/lib/unsplash/photo.rb
CHANGED
@@ -54,7 +54,7 @@ module Unsplash # :nodoc:
|
|
54
54
|
# @param orientation [String] Filter by orientation of the photo. Valid values are landscape, portrait, and squarish.
|
55
55
|
# @return [Unsplash::Photo] An Unsplash Photo if count parameter is omitted
|
56
56
|
# @return [Array] An array of Unsplash Photos if the count parameter is specified. An array is returned even if count is 1
|
57
|
-
def random(count: nil,categories: nil, collections: nil, featured: nil, user: nil, query: nil, width: nil, height: nil, orientation: nil)
|
57
|
+
def random(count: nil, categories: nil, collections: nil, featured: nil, user: nil, query: nil, width: nil, height: nil, orientation: nil)
|
58
58
|
params = {
|
59
59
|
category: (categories && categories.join(",")),
|
60
60
|
collections: (collections && collections.join(",")),
|
@@ -83,12 +83,14 @@ module Unsplash # :nodoc:
|
|
83
83
|
# @param query [String] Keywords to search for.
|
84
84
|
# @param page [Integer] Which page of search results to return.
|
85
85
|
# @param per_page [Integer] The number of users search result per page. (default: 10, maximum: 30)
|
86
|
+
# @param orientation [String] Filter by orientation of the photo. Valid values are landscape, portrait, and squarish.
|
86
87
|
# @return [SearchResult] a list of +Unsplash::Photo+ objects.
|
87
|
-
def search(query, page = 1, per_page = 10)
|
88
|
+
def search(query, page = 1, per_page = 10, orientation = nil)
|
88
89
|
params = {
|
89
90
|
query: query,
|
90
91
|
page: page,
|
91
|
-
per_page: per_page
|
92
|
+
per_page: per_page,
|
93
|
+
orientation: orientation
|
92
94
|
}
|
93
95
|
Unsplash::Search.search("/search/photos", self, params)
|
94
96
|
end
|
data/lib/unsplash/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unsplash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Klaassen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|