data-com-api 0.1.3 → 0.1.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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NGE1ZjUxNDYxYTEzMjg4MmZlMWMyOWM2Nzk2ZWE1ZjViNTE2MzFiMQ==
4
+ YTE1ZTQ2N2ZjN2NmZWIwNjEzMDE5YzcyZGMwZWFjOWNjMDZkY2UyMA==
5
5
  data.tar.gz: !binary |-
6
- NWZmYzUzMTE3YTdlOGE0MDc1MDczZWY1OWVhMzRkNzA0N2I1NzYwYQ==
6
+ YjVkZGQ2NjEyZmNjOTY5NjI5Nzk0NTIxOWFmYzY1ZmE2OGFkODQxMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDY4OTJiMWMzMjU5ZWFkZjhmZTJlYmRkN2E5N2UyNWQ3NDM4YThhNGQwMjQx
10
- YzE1NjM5NDkxY2M1YzdkMjI2MWY1MzJkN2E3MDNiNzI2YWM0ZGJlOTAwYzg4
11
- MjJkNzJkY2FmODI5MDI5YmNjNjQzMmI0MjlkYjc4MTFjODFlZjc=
9
+ OWIwMTQyZTE5YmFmOTViMDQ2OTBmMTZmOGZlMWUyNjc2OWEwNDQ3MmM0N2Vi
10
+ YWRlNmU0NDQyMGZhNTA1NGIzODVjMTAxMmY0ZTYxMzRjNzhiMmE2ODE4YjA2
11
+ Y2U5ZGQyZTVjNmE3OTIzYTFjZjhhMjZlMDA1NTliNzEyNjZjZDk=
12
12
  data.tar.gz: !binary |-
13
- YTllOWFlMWI1OGFkMjg0ZDU5NDdhY2RmMmFhNTQ3YmVjMWE3MTVmZGViZGE1
14
- ZDhlNjE0ZjkzODA5MDMyZmNhMWM5OTIyNTYxMTYwYTUyZDliMDYxYWE5NDJk
15
- N2U3ZWRkNDE4ZjIyM2VmMWJlNjIyZjAyNzY5YTBmNDYxN2E1YTA=
13
+ ODIzNzMxNWVhZThlNzgzZTcyNGI4NDdmZjhlMWY2YTI4OWEwM2FkYzQwZGJm
14
+ MjgyN2I0NmYxN2NkNTBjODEzNDY3ODgzOGFjZTg5NDQzMjRmMGEwZjM0NTE4
15
+ ZDcyOWYyZDhmM2FjNTNiZmZiZmRlMDIxOGNiODNhOTQ2MzEyYTY=
data/README.md CHANGED
@@ -27,7 +27,9 @@ client = DataComApi::Client.new('your-api-token')
27
27
  You can then configure the client in the following way:
28
28
 
29
29
  ```ruby
30
- client.page_size = 100 # Value must be between 1 and 100
30
+ # Value must be between 1 and 500, 100 will be used if search_company is used
31
+ # and supplied value is greater than 100
32
+ client.page_size = 100
31
33
  ```
32
34
 
33
35
  You can also get the totals API calls performed on the client with:
@@ -20,7 +20,7 @@ module DataComApi
20
20
  SIZE_ONLY_PAGE_SIZE = 0
21
21
  # We start at 1, 0 is a special case
22
22
  MIN_PAGE_SIZE = 1
23
- MAX_PAGE_SIZE = 100
23
+ MAX_PAGE_SIZE = 500
24
24
  MAX_OFFSET = 100_000
25
25
 
26
26
  attr_reader :api_calls_count
@@ -6,6 +6,14 @@ module DataComApi
6
6
  module Responses
7
7
  class SearchCompany < SearchBase
8
8
 
9
+ MAX_PAGE_SIZE = 100
10
+
11
+ def initialize(api_client, received_options)
12
+ super
13
+
14
+ @page_size = MAX_PAGE_SIZE if @page_size > MAX_PAGE_SIZE
15
+ end
16
+
9
17
  protected
10
18
 
11
19
  def transform_request(request)
@@ -1,3 +1,3 @@
1
1
  module DataComApi
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -36,12 +36,12 @@ describe DataComApi::Client do
36
36
 
37
37
  describe "#page_size=" do
38
38
 
39
- it "accepts values between 1 and 100" do
40
- expect{client.page_size = Random.rand(100) + 1}.not_to raise_error
39
+ it "accepts values between 1 and 500" do
40
+ expect{client.page_size = Random.rand(500) + 1}.not_to raise_error
41
41
  end
42
42
 
43
- it "doesn't accept values > 100" do
44
- expect{client.page_size = 101}.to raise_error DataComApi::ParamError
43
+ it "doesn't accept values > 500" do
44
+ expect{client.page_size = 501}.to raise_error DataComApi::ParamError
45
45
  end
46
46
 
47
47
  it "doesn't accept values < 1" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data-com-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fire-Dragon-DoL
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-10 00:00:00.000000000 Z
11
+ date: 2014-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty