image_searcher 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9b37c36097201bf924265617d93989e99dd034e
4
- data.tar.gz: 9425194e475a1d8e3c203daf035f35c6ec4c9e11
3
+ metadata.gz: dc7c58b27c0f5d1216a260d972f7cfd8e3f95157
4
+ data.tar.gz: 13c260375760eacd5f260ae386ceb33e39a8dacb
5
5
  SHA512:
6
- metadata.gz: 2c462d11698bf0863b214b2383de5c14c015b7cc22773a356068a23784b4c8c3aadc067b66728ae2f8fd1ee2abc0a5f0127a2c9bca2b89eb307f81dec06ba6d6
7
- data.tar.gz: fb5bd4fe60c231f16ebed38882e90246783306a547c9d8bb03f8fedb8d4c0e6c65218b42e6baa29ca94dfabbe7dc27a7da96449274fe7efc460e3b0a686a6477
6
+ metadata.gz: 5497499a507122c0a4d049fc7abece9543f3b6379091584f0923459b8b03d2d00e9b04fd1ce078bb420e05841dc759f21dc154e1dc7d2d13043a3656ba52bc3d
7
+ data.tar.gz: 786ea529764fff72223e6444c6b2c0cfb80e3b5fba33f29682a8d5511c9e848941e09223283a524d6465ea55efa737d35462d1d3f5b78333eabf54db646f1a70
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Image Searcher
2
2
 
3
- A ruby wrapper for the [Ababeen](http://api.ababeen.com) images search API v1.0 - analogue of deprecated Google Images Search API.
3
+ A ruby wrapper for the [Ababeen](http://api.ababeen.com) Image Search API v1.0 - a modest analogue of deprecated Google Image Search API.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'images_searcher', git: 'https://github.com/Frylock13/images_searcher.git'
10
+ gem 'image_searcher', '~> 0.1.1'
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -24,16 +24,15 @@ Or install it yourself as:
24
24
  @result = ImageSearcher.search(query: "New York")
25
25
  ```
26
26
 
27
- And you'll have a nested array with results. By default the array has `10` values.
27
+ And you'll have a nested array with results. By default the result has `10` images.
28
28
 
29
29
  **Available options**:
30
30
  ```
31
31
  query(String)
32
- count(Integer) - maximum 100
33
- preview(Boolean) - false by default(full size)
34
-
35
- For example: `http://api.ababeen.com/api/images.php?q=America&preview=true&count=100`
32
+ count(Integer) - maximum 100(10 by default)
33
+ preview(Boolean) - show all images in preview(false by default)
36
34
  ```
35
+ For example: `ImageSearcher.search(query: "New York", count: 66, preview: true)`
37
36
 
38
37
  ## Contributing
39
38
 
@@ -1,7 +1,8 @@
1
1
  module ImageSearcher
2
2
  def self.search(options = {})
3
- base_uri = ImageSearcher::API::BASE_URI
3
+ raise "Missing query" unless options[:query]
4
4
 
5
+ base_uri = ImageSearcher::API::BASE_URI
5
6
  url = "#{base_uri}?q=#{options[:query]}"
6
7
  url += "&count=#{options[:count]}" if options[:count]
7
8
  url += "&page=#{options[:preview]}" if options[:preview]
@@ -1,3 +1,3 @@
1
1
  module ImageSearcher
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_searcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaliy