nymeria 2.0.8 → 2.1.1
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/README.md +20 -10
- data/lib/nymeria/company.rb +1 -1
- data/lib/nymeria/person.rb +1 -21
- data/lib/nymeria.rb +2 -3
- data/nymeria.gemspec +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b2ad235f1798e579af91a04387b8191f77f9e173f393293dd50a7af5242c55d5
|
|
4
|
+
data.tar.gz: ada577876db0f4ac9f991e546184f85bd7cd8e8a867505c9931889d1d975e44c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35807d3143892dbde1ad9b6b114ef0a6450053a744680c4207d8982763830cf07cd7779c77565e9ff6097438b7d9e60d5781eddadb29e5d9d04d037c3aa51907
|
|
7
|
+
data.tar.gz: 2ad33da7ac13cff2986a0d8cc8757be777ae0f5ab26621a7b7b9c79fd30dc7f43ec19cd15fbb7628afd5623aa3a091845a9fbaa494e9ce8513377cae8201526c
|
data/README.md
CHANGED
|
@@ -13,7 +13,7 @@ Nymeria's [public API](https://www.nymeria.io/developers) so you don't have to.
|
|
|
13
13
|
#### Installation
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
gem install nymeria
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
#### Setting and Checking an API Key
|
|
@@ -21,7 +21,7 @@ $ gem install nymeria
|
|
|
21
21
|
```ruby
|
|
22
22
|
require 'nymeria'
|
|
23
23
|
|
|
24
|
-
Nymeria
|
|
24
|
+
Nymeria::API_KEY = 'YOUR API KEY GOES HERE'
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
All actions that interact with the Nymeria service assume an API key has been
|
|
@@ -33,7 +33,7 @@ can be set at the start of your program.
|
|
|
33
33
|
```ruby
|
|
34
34
|
require 'nymeria'
|
|
35
35
|
|
|
36
|
-
Nymeria
|
|
36
|
+
Nymeria::API_KEY = 'YOUR API KEY GOES HERE'
|
|
37
37
|
|
|
38
38
|
resp = Nymeria::Email.verify('dev@nymeria.io')
|
|
39
39
|
|
|
@@ -55,12 +55,12 @@ are set up to send and receive email, etc.
|
|
|
55
55
|
```ruby
|
|
56
56
|
require 'nymeria'
|
|
57
57
|
|
|
58
|
-
Nymeria
|
|
58
|
+
Nymeria::API_KEY = 'YOUR API KEY GOES HERE'
|
|
59
59
|
|
|
60
60
|
# You can enrich a single record like this.
|
|
61
|
-
resp = Nymeria::Person.enrich({ profile: '
|
|
61
|
+
resp = Nymeria::Person.enrich({ profile: 'linkedin.com/in/prophittcorey' })
|
|
62
62
|
|
|
63
|
-
puts "#{
|
|
63
|
+
puts "#{resp.data['id']} #{resp.data['first_name']} #{resp.data['emails']}" if resp.status == 200
|
|
64
64
|
|
|
65
65
|
# You can also pass multiple records as an array to do a bulk enrichment.
|
|
66
66
|
resp = Nymeria::Person.bulk_enrich({ params: { email: 'foo@bar.com'} }, { params: { profile: 'linkedin.com/in/wozniaksteve' }})
|
|
@@ -109,16 +109,26 @@ as the require parameter.
|
|
|
109
109
|
|
|
110
110
|
### Searching for People
|
|
111
111
|
|
|
112
|
+
You can search for people based on:
|
|
113
|
+
|
|
114
|
+
1. first_name
|
|
115
|
+
2. last_name
|
|
116
|
+
3. title
|
|
117
|
+
4. company
|
|
118
|
+
5. industry
|
|
119
|
+
6. location
|
|
120
|
+
7. country
|
|
121
|
+
|
|
112
122
|
```ruby
|
|
113
123
|
require 'nymeria'
|
|
114
124
|
|
|
115
|
-
Nymeria
|
|
125
|
+
Nymeria::API_KEY = 'YOUR API KEY GOES HERE'
|
|
116
126
|
|
|
117
|
-
people = Nymeria::Person.search({
|
|
127
|
+
people = Nymeria::Person.search({ first_name: 'corey', company: 'nymeria' })
|
|
118
128
|
|
|
119
129
|
if people.status == 200
|
|
120
130
|
people.each do |p|
|
|
121
|
-
puts p.dig('
|
|
131
|
+
puts p.dig('emails')
|
|
122
132
|
end
|
|
123
133
|
end
|
|
124
134
|
```
|
|
@@ -127,7 +137,7 @@ end
|
|
|
127
137
|
|
|
128
138
|
MIT License
|
|
129
139
|
|
|
130
|
-
Copyright (c)
|
|
140
|
+
Copyright (c) 2025, Nymeria LLC.
|
|
131
141
|
|
|
132
142
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
133
143
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/nymeria/company.rb
CHANGED
data/lib/nymeria/person.rb
CHANGED
|
@@ -60,27 +60,7 @@ module Nymeria
|
|
|
60
60
|
)
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
-
# args: {
|
|
64
|
-
def self.identify(args={})
|
|
65
|
-
uri = URI("#{BASE_URL}/person/identify")
|
|
66
|
-
|
|
67
|
-
uri.query = URI.encode_www_form(args)
|
|
68
|
-
|
|
69
|
-
req = Nymeria::request(Net::HTTP::Get.new(uri))
|
|
70
|
-
|
|
71
|
-
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
|
|
72
|
-
http.request(req)
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
return JSON.parse(res.body)
|
|
76
|
-
rescue => e
|
|
77
|
-
OpenStruct.new(
|
|
78
|
-
success?: false,
|
|
79
|
-
error: "#{e}"
|
|
80
|
-
)
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# args: { query: 'first_name:john & last_name:danner', size: 10, from: 0 }
|
|
63
|
+
# args: { first_name: '', last_name: '', title: '', company: '', limit: 10, offset: 0 }
|
|
84
64
|
def self.search(args={})
|
|
85
65
|
uri = URI("#{BASE_URL}/person/search")
|
|
86
66
|
|
data/lib/nymeria.rb
CHANGED
|
@@ -9,13 +9,12 @@ require 'net/http'
|
|
|
9
9
|
|
|
10
10
|
# Nymeria is our primary module namespace.
|
|
11
11
|
module Nymeria
|
|
12
|
-
API_KEY = ''
|
|
13
12
|
BASE_URL = 'https://www.nymeria.io/api/v4'
|
|
14
|
-
USER_AGENT = 'nymeria.rb/2.
|
|
13
|
+
USER_AGENT = 'nymeria.rb/2.2.1'
|
|
15
14
|
|
|
16
15
|
class << self
|
|
17
16
|
def request(req)
|
|
18
|
-
req['X-Api-Key'] = API_KEY
|
|
17
|
+
req['X-Api-Key'] = defined?(API_KEY) ? API_KEY : ''
|
|
19
18
|
req['User-Agent'] = USER_AGENT
|
|
20
19
|
req
|
|
21
20
|
end
|
data/nymeria.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = 'nymeria'
|
|
5
|
-
s.version = '2.
|
|
5
|
+
s.version = '2.1.1'
|
|
6
6
|
s.summary = 'Easily interact with Nymeria\'s API to find and verify people\'s contact information.'
|
|
7
7
|
s.description = 'Nymeria enables people to easily discover and connect with people. This gem is a light weight wrapper around Nymeria\'s API. With this gem you can easily interact with the API to find and verify people\'s contact information.'
|
|
8
8
|
s.authors = ['Nymeria, LLC']
|
|
@@ -10,6 +10,6 @@ Gem::Specification.new do |s|
|
|
|
10
10
|
s.files = `git ls-files -z`.split("\x0")
|
|
11
11
|
s.require_paths = ['lib']
|
|
12
12
|
s.homepage = 'https://www.nymeria.io'
|
|
13
|
-
s.metadata = { "source_code_uri" => "https://
|
|
13
|
+
s.metadata = { "source_code_uri" => "https://github.com/nymeria-io/nymeria.rb" }
|
|
14
14
|
s.license = 'MIT'
|
|
15
15
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nymeria
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nymeria, LLC
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-02-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: Nymeria enables people to easily discover and connect with people. This
|
|
14
14
|
gem is a light weight wrapper around Nymeria's API. With this gem you can easily
|
|
@@ -30,7 +30,7 @@ homepage: https://www.nymeria.io
|
|
|
30
30
|
licenses:
|
|
31
31
|
- MIT
|
|
32
32
|
metadata:
|
|
33
|
-
source_code_uri: https://
|
|
33
|
+
source_code_uri: https://github.com/nymeria-io/nymeria.rb
|
|
34
34
|
post_install_message:
|
|
35
35
|
rdoc_options: []
|
|
36
36
|
require_paths:
|