apihub 0.0.5 → 0.0.6

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: 968c7728de504c70dd18e6e8a07ede0c86208eea
4
- data.tar.gz: ebf452723ba3193ef318d7173c5489f4f2ee385d
3
+ metadata.gz: f46e43039cf939ec87ba05bf40e8463c50ee4cc1
4
+ data.tar.gz: 327268a75c4cf167f9003fbadd7cfd2cfc8f5e85
5
5
  SHA512:
6
- metadata.gz: 4f439d4701289989682fc21f06f4b3b9312709d744d213d0a7babfbf2294877c28cda23101faa53b40085d26235548e56623700788f4afdcff965349cc1f2115
7
- data.tar.gz: 23c14c0544c262886bb8c32774b0557cff0a4404dc880d56c07c35e6cf01a2200e92df6d56e56e655308d0ca61df73cc184c87fb828cfc070f50124bfc805286
6
+ metadata.gz: 356bc33eb9e7dc5c4439bb4b5c3a37329f7d8c5c57f9eea19c9afe4cb69cc1ea8f474e4242859bbafac77854c5094f270351e0c06928645ea9a28d713f84f6a0
7
+ data.tar.gz: 6131b41824469cca13098fe062f3a715f229165ff3366c111246b116a0cefc0037effcd71969088c503c4c44e4f54dac86bd3544874d00fb74f45c4dfd49de57
@@ -19,4 +19,5 @@ module APIHub
19
19
  autoload :Person, 'apihub/person'
20
20
  autoload :Resource, 'apihub/resource'
21
21
  autoload :Streaming, 'apihub/streaming'
22
+ autoload :Watchlist, 'apihub/watchlist'
22
23
  end
@@ -1,3 +1,3 @@
1
1
  module APIHub
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -0,0 +1,28 @@
1
+ module APIHub
2
+ class Watchlist < Base
3
+ endpoint 'https://watchlist.apihub.co'
4
+ path '/v1/search/all'
5
+
6
+ def self.search(name, options = {})
7
+ options = options.dup
8
+ params = options.delete(:params) || {}
9
+
10
+ params = {
11
+ name: name,
12
+ threshold: options.delete(:threshold) || 1.0
13
+ }.merge(params)
14
+
15
+ response = post('', params, options)
16
+
17
+ self.new(response)
18
+ end
19
+
20
+ class Individual < Watchlist
21
+ path '/v1/search/individuals'
22
+ end
23
+
24
+ class Entity < Watchlist
25
+ path '/v1/search/entities'
26
+ end
27
+ end
28
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apihub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex MacCaw
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-16 00:00:00.000000000 Z
11
+ date: 2014-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,6 +78,7 @@ files:
78
78
  - lib/apihub/streaming/company.rb
79
79
  - lib/apihub/streaming/person.rb
80
80
  - lib/apihub/version.rb
81
+ - lib/apihub/watchlist.rb
81
82
  homepage: https://github.com/maccman/apihub-ruby
82
83
  licenses:
83
84
  - MIT