contact-data 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/contact-data/contact.rb +13 -4
- data/lib/contact-data/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: 20a5203c8c8e4effff38a60d841f0b505efc0d87
|
4
|
+
data.tar.gz: 294fb4d913e6f1a5d208bfd5ae2beb9a2beb9a85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f617c198c55a469d87ec66492d4dd76b5ef220187ea3177a51447cf3f85cf7753b21e41d5d56e475bda83776d9ad67f9c3c6ff55f68985c488fa741007ad79a
|
7
|
+
data.tar.gz: b91f817e52960d236e6571d9d1aedfe7e4a0c5fed430488045ad289c9d4497da9ec6686aaffbd622a015b4e2d349f5e85bc774c0271b0bbf1014fce268bcd694
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
![Gem Version](http://img.shields.io/gem/v/contact-data.svg?style=flat) [![Code Climate](http://img.shields.io/codeclimate/github/Xenapto/contact-data.svg?style=flat)](https://codeclimate.com/github/Xenapto/contact-data) [![Coverage Status](https://img.shields.io/coveralls/Xenapto/contact-data.svg?style=flat)](https://coveralls.io/r/Xenapto/contact-data?branch=master)
|
4
4
|
[![security](https://hakiri.io/github/Xenapto/contact-data/develop.svg)](https://hakiri.io/github/Xenapto/contact-data/develop)
|
5
5
|
![build status](https://circleci.com/gh/Xenapto/contact-data.png?style=shield&circle-token=4c6f3dcc1912d30c8d903ae767f0beee94d9b4e2)
|
6
|
-
[![Developer status](http://img.shields.io/badge/developer-awesome-brightgreen.svg)](http://xenapto.com)
|
6
|
+
[![Developer status](http://img.shields.io/badge/developer-awesome-brightgreen.svg)](http://xenapto.com) [![Join the chat at https://gitter.im/Xenapto/contact-data](https://badges.gitter.im/Xenapto/contact-data.svg)](https://gitter.im/Xenapto/contact-data?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
7
7
|
|
8
8
|
Retrieves information about people and organizations from http://public.xenapto.com
|
9
9
|
|
data/lib/contact-data/contact.rb
CHANGED
@@ -5,16 +5,25 @@ module ContactData
|
|
5
5
|
|
6
6
|
class << self
|
7
7
|
def search(name, options = {})
|
8
|
-
options[:base]
|
9
|
-
options[:params]
|
8
|
+
options[:base] ||= BASE
|
9
|
+
options[:params] ||= { name: name }
|
10
10
|
Fetcher.get(:search, options)
|
11
11
|
end
|
12
12
|
|
13
13
|
def from(source, slug, options = {})
|
14
|
-
options[:base]
|
15
|
-
options[:params]
|
14
|
+
options[:base] ||= BASE
|
15
|
+
options[:params] ||= { source: source, slug: slug }
|
16
16
|
Fetcher.get(:from, options)
|
17
17
|
end
|
18
|
+
|
19
|
+
def from_domain(domain, options = {})
|
20
|
+
options[:base] ||= BASE
|
21
|
+
options[:api_base] ||= 'api/v3'
|
22
|
+
options[:url_base] ||= 'http://localhost:5000' # debug
|
23
|
+
options[:params] ||= { domain: domain }
|
24
|
+
options[:params][:contact_type] ||= options.delete(:contact_type)
|
25
|
+
Fetcher.get(:from_domain, options)
|
26
|
+
end
|
18
27
|
end
|
19
28
|
end
|
20
29
|
end
|
data/lib/contact-data/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contact-data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xenapto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|