cufinder-ruby 1.0.0 → 1.1.0
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/CHANGELOG.md +11 -0
- data/README.md +367 -83
- data/cufinder-ruby.gemspec +1 -1
- data/lib/cufinder_ruby/client.rb +32 -0
- data/lib/cufinder_ruby/services.rb +64 -0
- data/lib/cufinder_ruby/types.rb +83 -0
- data/lib/cufinder_ruby/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 933505a753cc67ab4e2311cb44741da6ce2c89f186e2eaa36efad0adc2044a63
|
|
4
|
+
data.tar.gz: 8025f9c7eb01e26078c870967aba4d68af22ecab84242c93706279735620f555
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dcde541a1672ea1b08e82dade2fa76f5c7c5a2aecc81dff9900875b7acd15794e58ffc8b3bbea0aca6e71cafb23e230bd097c767b9665cd6da1c6f78115ded29
|
|
7
|
+
data.tar.gz: 2c6b4ff7797fe5b818d57673fcd06c9c3ea810f909ff1598763424bdb281d85c79ca44933f40a123ca20f35fce8870d5cfcbe6e670e63d198b025312ee433203
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Cufinder Ruby SDK Changelog
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## 1.1.0 (February 01, 2026)
|
|
5
|
+
|
|
6
|
+
#### Features
|
|
7
|
+
- **New V2 API services**: Add new V2 services including `BCD`, `CCP`, `ISC`, `CBC`, `CSC`, `CSN`, `NAO` and `NAA`
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
#### Documentation
|
|
11
|
+
- **Updated README.md**: Add API reference for all new services
|
data/README.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
# CUFinder Ruby
|
|
1
|
+
# CUFinder Ruby SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/cufinder/cufinder-ruby)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://rubygems.org/gems/cufinder-ruby)
|
|
6
|
+
|
|
7
|
+
A Ruby SDK for the CUFinder API that provides access to all company and person enrichment services.
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Installation](#installation)
|
|
12
|
+
- [Usage](#usage)
|
|
13
|
+
- [API Reference](#api-reference)
|
|
14
|
+
- [Error Handling](#error-handling)
|
|
15
|
+
- [Types](#types)
|
|
16
|
+
- [Support](#support)
|
|
4
17
|
|
|
5
18
|
## Installation
|
|
6
19
|
|
|
@@ -24,168 +37,439 @@ gem install cufinder-ruby
|
|
|
24
37
|
|
|
25
38
|
## Usage
|
|
26
39
|
|
|
27
|
-
### Basic Setup
|
|
28
|
-
|
|
29
40
|
```ruby
|
|
30
41
|
require 'cufinder_ruby'
|
|
31
42
|
|
|
32
|
-
# Initialize the client
|
|
43
|
+
# Initialize the client
|
|
33
44
|
client = Cufinder::Client.new(api_key: 'your-api-key-here')
|
|
45
|
+
|
|
46
|
+
# Initialize with more options
|
|
47
|
+
client = Cufinder::Client.new(
|
|
48
|
+
api_key: 'your-api-key-here',
|
|
49
|
+
timeout: 60,
|
|
50
|
+
max_retries: 3
|
|
51
|
+
)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## API Reference
|
|
55
|
+
|
|
56
|
+
This SDK covers all 28 Cufinder API (v2) endpoints:
|
|
57
|
+
|
|
58
|
+
- **CUF** - [Company Name to Domain](https://apidoc.cufinder.io/apis/company-name-to-domain)
|
|
59
|
+
- **LCUF** - [LinkedIn Company URL Finder](https://apidoc.cufinder.io/apis/company-linkedin-url-finder)
|
|
60
|
+
- **DTC** - [Domain to Company Name](https://apidoc.cufinder.io/apis/domain-to-company-name)
|
|
61
|
+
- **DTE** - [Company Email Finder](https://apidoc.cufinder.io/apis/company-email-finder)
|
|
62
|
+
- **NTP** - [Company Phone Finder](https://apidoc.cufinder.io/apis/company-phone-finder)
|
|
63
|
+
- **REL** - [Reverse Email Lookup](https://apidoc.cufinder.io/apis/reverse-email-lookup)
|
|
64
|
+
- **FCL** - [Company Lookalikes Finder](https://apidoc.cufinder.io/apis/company-lookalikes-finder)
|
|
65
|
+
- **ELF** - [Company Fundraising](https://apidoc.cufinder.io/apis/company-fundraising)
|
|
66
|
+
- **CAR** - [Company Revenue Finder](https://apidoc.cufinder.io/apis/company-revenue-finder)
|
|
67
|
+
- **FCC** - [Company Subsidiaries Finder](https://apidoc.cufinder.io/apis/company-subsidiaries-finder)
|
|
68
|
+
- **FTS** - [Company Tech Stack Finder](https://apidoc.cufinder.io/apis/company-tech-stack-finder)
|
|
69
|
+
- **EPP** - [LinkedIn Profile Enrichment](https://apidoc.cufinder.io/apis/linkedin-profile-enrichment)
|
|
70
|
+
- **FWE** - [LinkedIn Profile Email Finder](https://apidoc.cufinder.io/apis/linkedin-profile-email-finder)
|
|
71
|
+
- **TEP** - [Person Enrichment](https://apidoc.cufinder.io/apis/person-enrichment)
|
|
72
|
+
- **ENC** - [Company Enrichment](https://apidoc.cufinder.io/apis/company-enrichment)
|
|
73
|
+
- **CEC** - [Company Employee Count](https://apidoc.cufinder.io/apis/company-employee-count)
|
|
74
|
+
- **CLO** - [Company Locations](https://apidoc.cufinder.io/apis/company-locations)
|
|
75
|
+
- **CSE** - [Company Search](https://apidoc.cufinder.io/apis/company-search)
|
|
76
|
+
- **PSE** - [Person Search](https://apidoc.cufinder.io/apis/person-search)
|
|
77
|
+
- **LBS** - [Local Business Search (Google Maps Search API)](https://apidoc.cufinder.io/apis/local-business-search-google-maps-search-api)
|
|
78
|
+
- **BCD** - [B2B Customers Finder](https://apidoc.cufinder.io/apis/b2b-customers-finder)
|
|
79
|
+
- **CCP** - [Company Career Page Finder](https://apidoc.cufinder.io/apis/company-career-page-finder)
|
|
80
|
+
- **ISC** - [Company Saas Checker](https://apidoc.cufinder.io/apis/company-saas-checker)
|
|
81
|
+
- **CBC** - [Company B2B or B2C Checker](https://apidoc.cufinder.io/apis/company-b2b-or-b2c-checker)
|
|
82
|
+
- **CSC** - [Company Mission Statement](https://apidoc.cufinder.io/apis/company-mission-statement)
|
|
83
|
+
- **CSN** - [Company Snapshot](https://apidoc.cufinder.io/apis/company-snapshot)
|
|
84
|
+
- **NAO** - [Phone Number Normalizer](https://apidoc.cufinder.io/apis/phone-number-normalizer)
|
|
85
|
+
- **NAA** - [Address Normalizer](https://apidoc.cufinder.io/apis/address-normalizer)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
**CUF - Company Name to Domain**
|
|
89
|
+
|
|
90
|
+
Returns the official website URL of a company based on its name.
|
|
91
|
+
|
|
92
|
+
```ruby
|
|
93
|
+
result = client.cuf(company_name: 'cufinder', country_code: 'US')
|
|
94
|
+
puts result
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**LCUF - LinkedIn Company URL Finder**
|
|
98
|
+
|
|
99
|
+
Finds the official LinkedIn company profile URL from a company name.
|
|
100
|
+
|
|
101
|
+
```ruby
|
|
102
|
+
result = client.lcuf(company_name: 'cufinder')
|
|
103
|
+
puts result
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**DTC - Domain to Company Name**
|
|
107
|
+
|
|
108
|
+
Retrieves the registered company name associated with a given website domain.
|
|
109
|
+
|
|
110
|
+
```ruby
|
|
111
|
+
result = client.dtc(company_website: 'cufinder.io')
|
|
112
|
+
puts result
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**DTE - Company Email Finder**
|
|
116
|
+
|
|
117
|
+
Returns up to five general or role-based business email addresses for a company.
|
|
118
|
+
|
|
119
|
+
```ruby
|
|
120
|
+
result = client.dte(company_website: 'cufinder.io')
|
|
121
|
+
puts result
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**NTP - Company Phone Finder**
|
|
125
|
+
|
|
126
|
+
Returns up to two verified phone numbers for a company.
|
|
127
|
+
|
|
128
|
+
```ruby
|
|
129
|
+
result = client.ntp(company_name: 'apple')
|
|
130
|
+
puts result
|
|
34
131
|
```
|
|
35
132
|
|
|
36
|
-
|
|
133
|
+
**REL - Reverse Email Lookup**
|
|
37
134
|
|
|
38
|
-
|
|
135
|
+
Enriches an email address with detailed person and company information.
|
|
39
136
|
|
|
40
|
-
#### 1. CUF - Company URL Finder
|
|
41
137
|
```ruby
|
|
42
|
-
result = client.
|
|
43
|
-
puts result
|
|
138
|
+
result = client.rel(email: 'iain.mckenzie@stripe.com')
|
|
139
|
+
puts result
|
|
44
140
|
```
|
|
45
141
|
|
|
46
|
-
|
|
142
|
+
**FCL - Company Lookalikes Finder**
|
|
143
|
+
|
|
144
|
+
Provides a list of similar companies based on an input company's profile.
|
|
145
|
+
|
|
47
146
|
```ruby
|
|
48
|
-
result = client.
|
|
49
|
-
puts result
|
|
147
|
+
result = client.fcl(query: 'apple')
|
|
148
|
+
puts result
|
|
50
149
|
```
|
|
51
150
|
|
|
52
|
-
|
|
151
|
+
**ELF - Company Fundraising**
|
|
152
|
+
|
|
153
|
+
Returns detailed funding information about a company.
|
|
154
|
+
|
|
53
155
|
```ruby
|
|
54
|
-
result = client.
|
|
55
|
-
puts result
|
|
156
|
+
result = client.elf(query: 'cufinder')
|
|
157
|
+
puts result
|
|
56
158
|
```
|
|
57
159
|
|
|
58
|
-
|
|
160
|
+
**CAR - Company Revenue Finder**
|
|
161
|
+
|
|
162
|
+
Estimates a company's annual revenue based on name.
|
|
163
|
+
|
|
59
164
|
```ruby
|
|
60
|
-
result = client.
|
|
61
|
-
puts result
|
|
165
|
+
result = client.car(query: 'apple')
|
|
166
|
+
puts result
|
|
62
167
|
```
|
|
63
168
|
|
|
64
|
-
|
|
169
|
+
**FCC - Company Subsidiaries Finder**
|
|
170
|
+
|
|
171
|
+
Identifies known subsidiaries of a parent company.
|
|
172
|
+
|
|
65
173
|
```ruby
|
|
66
|
-
result = client.
|
|
67
|
-
puts result
|
|
174
|
+
result = client.fcc(query: 'amazon')
|
|
175
|
+
puts result
|
|
68
176
|
```
|
|
69
177
|
|
|
70
|
-
|
|
178
|
+
**FTS - Company Tech Stack Finder**
|
|
179
|
+
|
|
180
|
+
Detects the technologies a company uses.
|
|
181
|
+
|
|
71
182
|
```ruby
|
|
72
|
-
result = client.
|
|
73
|
-
puts result
|
|
183
|
+
result = client.fts(query: 'cufinder')
|
|
184
|
+
puts result
|
|
74
185
|
```
|
|
75
186
|
|
|
76
|
-
|
|
187
|
+
**EPP - LinkedIn Profile Enrichment**
|
|
188
|
+
|
|
189
|
+
Takes a LinkedIn profile URL and returns enriched person and company data.
|
|
190
|
+
|
|
77
191
|
```ruby
|
|
78
|
-
result = client.
|
|
79
|
-
puts result
|
|
192
|
+
result = client.epp(linkedin_url: 'linkedin.com/in/iain-mckenzie')
|
|
193
|
+
puts result
|
|
80
194
|
```
|
|
81
195
|
|
|
82
|
-
|
|
196
|
+
**FWE - LinkedIn Profile Email Finder**
|
|
197
|
+
|
|
198
|
+
Extracts a verified business email address from a LinkedIn profile URL.
|
|
199
|
+
|
|
200
|
+
```ruby
|
|
201
|
+
result = client.fwe(linkedin_url: 'linkedin.com/in/iain-mckenzie')
|
|
202
|
+
puts result
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**TEP - Person Enrichment**
|
|
206
|
+
|
|
207
|
+
Returns enriched person data based on full name and company name.
|
|
208
|
+
|
|
209
|
+
```ruby
|
|
210
|
+
result = client.tep(full_name: 'iain mckenzie', company: 'stripe')
|
|
211
|
+
puts result
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**ENC - Company Enrichment**
|
|
215
|
+
|
|
216
|
+
Provides a complete company profile from a company name.
|
|
217
|
+
|
|
218
|
+
```ruby
|
|
219
|
+
result = client.enc(query: 'cufinder')
|
|
220
|
+
puts result
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**CEC - Company Employee Count**
|
|
224
|
+
|
|
225
|
+
Returns an estimated number of employees for a company.
|
|
226
|
+
|
|
83
227
|
```ruby
|
|
84
|
-
result = client.
|
|
85
|
-
puts result
|
|
228
|
+
result = client.cec(query: 'cufinder')
|
|
229
|
+
puts result
|
|
86
230
|
```
|
|
87
231
|
|
|
88
|
-
|
|
232
|
+
**CLO - Company Locations**
|
|
233
|
+
|
|
234
|
+
Returns the known physical office locations of a company.
|
|
235
|
+
|
|
89
236
|
```ruby
|
|
90
|
-
result = client.
|
|
91
|
-
puts result
|
|
237
|
+
result = client.clo(query: 'apple')
|
|
238
|
+
puts result
|
|
92
239
|
```
|
|
93
240
|
|
|
94
|
-
|
|
241
|
+
**CSE - Company Search**
|
|
242
|
+
|
|
243
|
+
Search for companies by keyword, partial name, industry, location, or other filters.
|
|
244
|
+
|
|
95
245
|
```ruby
|
|
96
|
-
result = client.
|
|
97
|
-
|
|
246
|
+
result = client.cse(
|
|
247
|
+
name: 'cufinder',
|
|
248
|
+
country: 'germany',
|
|
249
|
+
state: 'hamburg',
|
|
250
|
+
city: 'hamburg'
|
|
251
|
+
)
|
|
252
|
+
puts result
|
|
98
253
|
```
|
|
99
254
|
|
|
100
|
-
|
|
255
|
+
**PSE - Person Search**
|
|
256
|
+
|
|
257
|
+
Search for people by name, company, job title, location, or other filters.
|
|
258
|
+
|
|
101
259
|
```ruby
|
|
102
|
-
result = client.
|
|
103
|
-
|
|
260
|
+
result = client.pse(
|
|
261
|
+
full_name: 'iain mckenzie',
|
|
262
|
+
company_name: 'stripe'
|
|
263
|
+
)
|
|
264
|
+
puts result
|
|
104
265
|
```
|
|
105
266
|
|
|
106
|
-
|
|
267
|
+
**LBS - Local Business Search (Google Maps Search API)**
|
|
268
|
+
|
|
269
|
+
Search for local businesses by location, industry, or name.
|
|
270
|
+
|
|
107
271
|
```ruby
|
|
108
|
-
result = client.
|
|
109
|
-
|
|
272
|
+
result = client.lbs(
|
|
273
|
+
country: 'united states',
|
|
274
|
+
state: 'california',
|
|
275
|
+
page: 1
|
|
276
|
+
)
|
|
277
|
+
puts result
|
|
110
278
|
```
|
|
111
279
|
|
|
112
|
-
|
|
280
|
+
**BCD - B2B Customers Finder**
|
|
281
|
+
|
|
282
|
+
Returns company's careers page
|
|
283
|
+
|
|
113
284
|
```ruby
|
|
114
|
-
result = client.
|
|
115
|
-
puts result
|
|
285
|
+
result = client.bcd(url: "stripe.com")
|
|
286
|
+
puts result
|
|
116
287
|
```
|
|
117
288
|
|
|
118
|
-
|
|
289
|
+
**CCP - Company Career Page Finder**
|
|
290
|
+
|
|
291
|
+
Returns is company SaaS or not
|
|
292
|
+
|
|
119
293
|
```ruby
|
|
120
|
-
result = client.
|
|
121
|
-
puts result
|
|
122
|
-
puts result.person.phone # => "+1-408-996-1010"
|
|
294
|
+
result = client.ccp(url: "stripe.com")
|
|
295
|
+
puts result
|
|
123
296
|
```
|
|
124
297
|
|
|
125
|
-
|
|
298
|
+
**ISC - Company Saas Checker**
|
|
299
|
+
|
|
300
|
+
Returns is company SaaS or not
|
|
301
|
+
|
|
126
302
|
```ruby
|
|
127
|
-
result = client.
|
|
128
|
-
puts result
|
|
303
|
+
result = client.isc(url: "stripe.com")
|
|
304
|
+
puts result
|
|
129
305
|
```
|
|
130
306
|
|
|
131
|
-
|
|
307
|
+
**CBC - Company B2B or B2C Checker**
|
|
308
|
+
|
|
309
|
+
Returns company's business type
|
|
310
|
+
|
|
132
311
|
```ruby
|
|
133
|
-
result = client.
|
|
134
|
-
puts result
|
|
312
|
+
result = client.cbc(url: "stripe.com")
|
|
313
|
+
puts result
|
|
135
314
|
```
|
|
136
315
|
|
|
137
|
-
|
|
316
|
+
**CSC - Company Mission Statement**
|
|
317
|
+
|
|
318
|
+
Returns company's mission statement
|
|
319
|
+
|
|
138
320
|
```ruby
|
|
139
|
-
result = client.
|
|
140
|
-
puts result
|
|
321
|
+
result = client.csc(url: "stripe.com")
|
|
322
|
+
puts result
|
|
141
323
|
```
|
|
142
324
|
|
|
143
|
-
|
|
325
|
+
**CSN - Company Snapshot**
|
|
326
|
+
|
|
327
|
+
Returns company's snapshot information
|
|
328
|
+
|
|
144
329
|
```ruby
|
|
145
|
-
result = client.
|
|
146
|
-
puts result
|
|
330
|
+
result = client.csn(url: "stripe.com")
|
|
331
|
+
puts result
|
|
147
332
|
```
|
|
148
333
|
|
|
149
|
-
|
|
334
|
+
**NAO - Phone Number Normalizer**
|
|
335
|
+
|
|
336
|
+
Returns normalized phone
|
|
337
|
+
|
|
150
338
|
```ruby
|
|
151
|
-
result = client.
|
|
152
|
-
puts result
|
|
339
|
+
result = client.nao(phone: "+18006676389")
|
|
340
|
+
puts result
|
|
153
341
|
```
|
|
154
342
|
|
|
155
|
-
|
|
343
|
+
**NAA - Address Normalizer**
|
|
344
|
+
|
|
345
|
+
Returns normalized address
|
|
346
|
+
|
|
156
347
|
```ruby
|
|
157
|
-
result = client.
|
|
158
|
-
puts result
|
|
348
|
+
result = client.naa(address: "1095 avenue of the Americas, 6th Avenue ny 10036")
|
|
349
|
+
puts result
|
|
159
350
|
```
|
|
160
351
|
|
|
161
|
-
|
|
352
|
+
## Error Handling
|
|
162
353
|
|
|
163
|
-
The
|
|
354
|
+
The SDK provides comprehensive error handling with custom error types:
|
|
164
355
|
|
|
165
356
|
```ruby
|
|
357
|
+
require 'cufinder_ruby'
|
|
358
|
+
|
|
166
359
|
begin
|
|
167
|
-
result = client.cuf(company_name:
|
|
360
|
+
result = client.cuf(company_name: 'cufinder', country_code: 'US')
|
|
168
361
|
rescue Cufinder::AuthenticationError => e
|
|
362
|
+
# 401 - Invalid API key
|
|
169
363
|
puts "Authentication failed: #{e.message}"
|
|
364
|
+
rescue Cufinder::CreditLimitError => e
|
|
365
|
+
# 400 - Not enough credit
|
|
366
|
+
puts "Not enough credit: #{e.message}"
|
|
367
|
+
rescue Cufinder::NotFoundError => e
|
|
368
|
+
# 404 - Not found result
|
|
369
|
+
puts "Not found result: #{e.message}"
|
|
370
|
+
rescue Cufinder::PayloadError => e
|
|
371
|
+
# 422 - Error in the payload
|
|
372
|
+
puts "Payload error: #{e.message}"
|
|
170
373
|
rescue Cufinder::RateLimitError => e
|
|
374
|
+
# 429 - Rate limit exceeded
|
|
171
375
|
puts "Rate limit exceeded: #{e.message}"
|
|
172
|
-
rescue Cufinder::
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
376
|
+
rescue Cufinder::ServerError => e
|
|
377
|
+
# 500, 501, ... - Server errors
|
|
378
|
+
puts "Server error (#{e.status}): #{e.message}"
|
|
379
|
+
rescue Cufinder::NetworkError => e
|
|
380
|
+
puts "Network error: #{e.message}"
|
|
176
381
|
rescue Cufinder::ValidationError => e
|
|
177
382
|
puts "Validation error: #{e.message}"
|
|
383
|
+
rescue Cufinder::ApiError => e
|
|
384
|
+
puts "Unknown error: #{e.message}"
|
|
178
385
|
end
|
|
179
386
|
```
|
|
180
387
|
|
|
181
|
-
|
|
388
|
+
## Types
|
|
182
389
|
|
|
183
|
-
|
|
390
|
+
The SDK exports comprehensive Ruby classes for all API requests and responses:
|
|
184
391
|
|
|
185
392
|
```ruby
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
393
|
+
# Response classes
|
|
394
|
+
class BaseResponse
|
|
395
|
+
attr_reader :query, :credit_count
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# Model classes
|
|
399
|
+
class Company
|
|
400
|
+
# The Company class contains all returned company data.
|
|
401
|
+
attr_reader :name, :domain, :website, :linkedin_url
|
|
402
|
+
attr_reader :country, :state, :city, :address
|
|
403
|
+
attr_reader :industry, :company_size, :revenue
|
|
404
|
+
attr_reader :employee_count, :subsidiaries, :tech_stack
|
|
405
|
+
attr_reader :emails, :phones, :description
|
|
406
|
+
attr_reader :locations, :founded_year, :logo_url
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
class Person
|
|
410
|
+
# The Person class contains all returned person data.
|
|
411
|
+
attr_reader :full_name, :first_name, :last_name
|
|
412
|
+
attr_reader :company_name, :company_domain, :job_title
|
|
413
|
+
attr_reader :country, :state, :city
|
|
414
|
+
attr_reader :email, :phone, :description, :linkedin_url
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
class LookalikeCompany
|
|
418
|
+
# The LookalikeCompany class contains all returned lookalike company data.
|
|
419
|
+
attr_reader :name, :domain, :website, :linkedin_url
|
|
420
|
+
attr_reader :country, :state, :city, :address
|
|
421
|
+
attr_reader :industry, :company_size, :revenue
|
|
422
|
+
attr_reader :employee_count, :subsidiaries, :tech_stack
|
|
423
|
+
attr_reader :emails, :phones, :description
|
|
424
|
+
attr_reader :locations, :founded_year, :logo_url
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
class FundraisingInfo
|
|
428
|
+
attr_reader :funding_last_round_type
|
|
429
|
+
attr_reader :funding_ammount_currency_code
|
|
430
|
+
attr_reader :funding_money_raised
|
|
431
|
+
attr_reader :funding_last_round_investors_url
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
class CompanyLocation
|
|
435
|
+
# The CompanyLocation class contains all returned company location data.
|
|
436
|
+
attr_reader :country, :state, :city, :postal_code
|
|
437
|
+
attr_reader :line1, :line2, :latitude, :longitude
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
class CompanySearchResult
|
|
441
|
+
attr_reader :companies, :total_results, :page
|
|
442
|
+
attr_reader :query, :credit_count
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
class PersonSearchResult
|
|
446
|
+
attr_reader :peoples, :total_results, :page
|
|
447
|
+
attr_reader :query, :credit_count
|
|
448
|
+
end
|
|
449
|
+
|
|
450
|
+
class LocalBusinessResult
|
|
451
|
+
attr_reader :businesses, :total_results, :page
|
|
452
|
+
attr_reader :query, :credit_count
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
# Configuration
|
|
456
|
+
class ClientConfig
|
|
457
|
+
attr_accessor :api_key, :base_url, :timeout, :max_retries
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# Error classes
|
|
461
|
+
class CufinderError < StandardError; end
|
|
462
|
+
class AuthenticationError < CufinderError; end
|
|
463
|
+
class CreditLimitError < CufinderError; end
|
|
464
|
+
class NotFoundError < CufinderError; end
|
|
465
|
+
class PayloadError < CufinderError; end
|
|
466
|
+
class RateLimitError < CufinderError; end
|
|
467
|
+
class ServerError < CufinderError; end
|
|
468
|
+
class NetworkError < CufinderError; end
|
|
469
|
+
class ValidationError < CufinderError; end
|
|
470
|
+
class ApiError < CufinderError; end
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
## Support
|
|
474
|
+
|
|
475
|
+
For support, please open an issue on the [GitHub repository](https://github.com/cufinder/cufinder-ruby/issues).
|
data/cufinder-ruby.gemspec
CHANGED
data/lib/cufinder_ruby/client.rb
CHANGED
|
@@ -109,5 +109,37 @@ module Cufinder
|
|
|
109
109
|
def lbs(**params)
|
|
110
110
|
@services.search_local_businesses(params)
|
|
111
111
|
end
|
|
112
|
+
|
|
113
|
+
def bcd(url:)
|
|
114
|
+
@services.extract_b2b_customers(url: url)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def ccp(url:)
|
|
118
|
+
@services.find_company_careers_page(url: url)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def isc(url:)
|
|
122
|
+
@services.is_saas(url: url)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def cbc(url:)
|
|
126
|
+
@services.get_company_business_type(url: url)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def csc(url:)
|
|
130
|
+
@services.get_company_mission_statement(url: url)
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def csn(url:)
|
|
134
|
+
@services.get_company_snapshot(url: url)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def nao(phone:)
|
|
138
|
+
@services.normalize_phone(phone: phone)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def naa(address:)
|
|
142
|
+
@services.normalize_address(address: address)
|
|
143
|
+
end
|
|
112
144
|
end
|
|
113
145
|
end
|
|
@@ -164,6 +164,70 @@ module Cufinder
|
|
|
164
164
|
response = @client.post("/lbs", params)
|
|
165
165
|
LbsResponse.new(response)
|
|
166
166
|
end
|
|
167
|
+
|
|
168
|
+
# BCD Service - B2B Customers Finder
|
|
169
|
+
def extract_b2b_customers(params)
|
|
170
|
+
validate_required(params, [:url])
|
|
171
|
+
|
|
172
|
+
response = @client.post("/bcd", params)
|
|
173
|
+
BcdResponse.new(response)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# CCP Service - Company Career Page Finder
|
|
177
|
+
def find_company_careers_page(params)
|
|
178
|
+
validate_required(params, [:url])
|
|
179
|
+
|
|
180
|
+
response = @client.post("/ccp", params)
|
|
181
|
+
CcpResponse.new(response)
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# ISC Service - Company Saas Checker
|
|
185
|
+
def is_saas(params)
|
|
186
|
+
validate_required(params, [:url])
|
|
187
|
+
|
|
188
|
+
response = @client.post("/isc", params)
|
|
189
|
+
IscResponse.new(response)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# CBC Service - Company B2B or B2C Checker
|
|
193
|
+
def get_company_business_type(params)
|
|
194
|
+
validate_required(params, [:url])
|
|
195
|
+
|
|
196
|
+
response = @client.post("/cbc", params)
|
|
197
|
+
CbcResponse.new(response)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# CSC Service - Company Mission Statement
|
|
201
|
+
def get_company_mission_statement(params)
|
|
202
|
+
validate_required(params, [:url])
|
|
203
|
+
|
|
204
|
+
response = @client.post("/csc", params)
|
|
205
|
+
CscResponse.new(response)
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# CSN Service - Company Snapshot
|
|
209
|
+
def get_company_snapshot(params)
|
|
210
|
+
validate_required(params, [:url])
|
|
211
|
+
|
|
212
|
+
response = @client.post("/csn", params)
|
|
213
|
+
CsnResponse.new(response)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Nao Service - Phone Number Normalizer
|
|
217
|
+
def normalize_phone(params)
|
|
218
|
+
validate_required(params, [:phone])
|
|
219
|
+
|
|
220
|
+
response = @client.post("/nao", params)
|
|
221
|
+
NaoResponse.new(response)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Naa Service - Address Normalizer
|
|
225
|
+
def normalize_address(params)
|
|
226
|
+
validate_required(params, [:address])
|
|
227
|
+
|
|
228
|
+
response = @client.post("/naa", params)
|
|
229
|
+
NaaResponse.new(response)
|
|
230
|
+
end
|
|
167
231
|
|
|
168
232
|
private
|
|
169
233
|
|
data/lib/cufinder_ruby/types.rb
CHANGED
|
@@ -518,4 +518,87 @@ module Cufinder
|
|
|
518
518
|
@companies = (data["companies"] || []).map { |c| Company.new(c) }
|
|
519
519
|
end
|
|
520
520
|
end
|
|
521
|
+
|
|
522
|
+
class BcdResponse < BaseResponse
|
|
523
|
+
attr_accessor :customers
|
|
524
|
+
|
|
525
|
+
def initialize(data = {})
|
|
526
|
+
super(data)
|
|
527
|
+
@customers = data["customers"] || []
|
|
528
|
+
end
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
class CcpResponse < BaseResponse
|
|
532
|
+
attr_accessor :customers
|
|
533
|
+
|
|
534
|
+
def initialize(data = {})
|
|
535
|
+
super(data)
|
|
536
|
+
@careers_page_url = data["careers_page_url"]
|
|
537
|
+
end
|
|
538
|
+
end
|
|
539
|
+
|
|
540
|
+
class IscResponse < BaseResponse
|
|
541
|
+
attr_accessor :is_saas
|
|
542
|
+
|
|
543
|
+
def initialize(data = {})
|
|
544
|
+
super(data)
|
|
545
|
+
@is_saas = data["is_saas"]
|
|
546
|
+
end
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
class CbcResponse < BaseResponse
|
|
550
|
+
attr_accessor :business_type
|
|
551
|
+
|
|
552
|
+
def initialize(data = {})
|
|
553
|
+
super(data)
|
|
554
|
+
@business_type = data["business_type"]
|
|
555
|
+
end
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
class CscResponse < BaseResponse
|
|
559
|
+
attr_accessor :mission_statement
|
|
560
|
+
|
|
561
|
+
def initialize(data = {})
|
|
562
|
+
super(data)
|
|
563
|
+
@mission_statement = data["mission_statement"]
|
|
564
|
+
end
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
class CsnSnapshotInfo
|
|
568
|
+
attr_accessor :icp, :target_industries, :target_personas, :value_proposition
|
|
569
|
+
|
|
570
|
+
def initialize(data = {})
|
|
571
|
+
@icp = data["icp"]
|
|
572
|
+
@target_industries = data["target_industries"] || []
|
|
573
|
+
@target_personas = data["target_personas"]
|
|
574
|
+
@value_proposition = data["value_proposition"]
|
|
575
|
+
end
|
|
576
|
+
end
|
|
577
|
+
|
|
578
|
+
class CsnResponse < BaseResponse
|
|
579
|
+
attr_accessor :company_snapshot
|
|
580
|
+
|
|
581
|
+
def initialize(data = {})
|
|
582
|
+
super(data)
|
|
583
|
+
@company_snapshot = data["company_snapshot"] ? CsnSnapshotInfo.new(data["company_snapshot"]) : nil
|
|
584
|
+
end
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
class NaoResponse < BaseResponse
|
|
588
|
+
attr_accessor :phone
|
|
589
|
+
|
|
590
|
+
def initialize(data = {})
|
|
591
|
+
super(data)
|
|
592
|
+
@phone = data["phone"]
|
|
593
|
+
end
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
class NaaResponse < BaseResponse
|
|
597
|
+
attr_accessor :address
|
|
598
|
+
|
|
599
|
+
def initialize(data = {})
|
|
600
|
+
super(data)
|
|
601
|
+
@address = data["address"]
|
|
602
|
+
end
|
|
603
|
+
end
|
|
521
604
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cufinder-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- CUFinder Team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: httparty
|
|
@@ -89,6 +89,7 @@ extra_rdoc_files: []
|
|
|
89
89
|
files:
|
|
90
90
|
- ".gitignore"
|
|
91
91
|
- ".rspec"
|
|
92
|
+
- CHANGELOG.md
|
|
92
93
|
- Gemfile
|
|
93
94
|
- LICENSE
|
|
94
95
|
- README.md
|