demandbase 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/README.md +462 -4
- data/VERSION +1 -1
- data/demandbase.gemspec +6 -2
- data/lib/demandbase.rb +136 -3
- data/lib/demandbase/domain_record.rb +84 -0
- data/lib/demandbase/ip_record.rb +98 -0
- data/lib/demandbase/record.rb +0 -72
- data/test/test_demandbase.rb +54 -35
- data/test/test_domain_record.rb +78 -0
- data/test/test_ip_record.rb +53 -0
- data/test/test_record.rb +61 -61
- metadata +7 -3
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
The Demandbase gem is a Ruby wrapper for the [Demandbase](http://www.demandbase.com?affiliate_id=LOL_JK_MAYBE) real-time targeting and personalization platform.
|
1
|
+
The Demandbase gem is a Ruby wrapper for the [Demandbase](http://www.demandbase.com?affiliate_id=LOL_JK_MAYBE) real-time targeting and personalization platform's [API](http://wiki.demandbaselabs.com/mwiki/index.php?title=Demandbase_API_Documentation).
|
4
2
|
|
5
3
|
### Prerequisites
|
6
4
|
|
7
|
-
You'll need an active Demandbase account with at least one Real Time Identification(RTID) key. You can sign up for a trial developer key [here](http://www.demandbase.com/who-is-demandbase/contact-demandbase/?affiliate_id=LOL_JK_MAYBE).
|
5
|
+
You'll need an active Demandbase account with at least one Real Time Identification (RTID) key. You can sign up for a trial developer key [here](http://www.demandbase.com/who-is-demandbase/contact-demandbase/?affiliate_id=LOL_JK_MAYBE).
|
8
6
|
|
9
7
|
### Installation
|
10
8
|
|
@@ -34,6 +32,8 @@ heroku config:add DEMANDBASE_RTID_KEY=1234deadbeef4321
|
|
34
32
|
|
35
33
|
### Usage
|
36
34
|
|
35
|
+
#### Domain Lookup
|
36
|
+
|
37
37
|
If everything's installed and configured you should be able to look up companies' information via their domain name as follows:
|
38
38
|
|
39
39
|
```ruby
|
@@ -119,6 +119,464 @@ record.forbes_2000
|
|
119
119
|
# => true
|
120
120
|
```
|
121
121
|
|
122
|
+
#### IP Lookup
|
123
|
+
|
124
|
+
The IP lookup returns some additional information e.g.
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
record = Demandbase::lookup_ip 'microsoft.com'
|
128
|
+
# => <Demandbase::Record:0x007fce82a46060>
|
129
|
+
<<<<<<< HEAD
|
130
|
+
|
131
|
+
|
132
|
+
=======
|
133
|
+
>>>>>>> ae8ee8ca255b42a6a0754c9087e83102c966d2f8
|
134
|
+
```
|
135
|
+
|
136
|
+
#### Lazy Lookup
|
137
|
+
|
138
|
+
If you have an IP, domain name, email address, or craptacular URL and just want to use that use `lazy_lookup`
|
139
|
+
|
140
|
+
```ruby
|
141
|
+
ip_looking_thing = '12.12.12.12'
|
142
|
+
domain_looking_thing 'http://google.com'
|
143
|
+
url_looking_thing 'www.google.com/lol?seriously=true'
|
144
|
+
email_looking_thing 'willy@microsoft.com'
|
145
|
+
|
146
|
+
(Demandbase::lazy_lookup ip_looking_thing).class
|
147
|
+
# => Demanbase::IPRecord
|
148
|
+
|
149
|
+
(Demandbase::lazy_lookup domain_looking_thing).class
|
150
|
+
# => Demanbase::DomainRecord
|
151
|
+
|
152
|
+
(Demandbase::lazy_lookup url_looking_thing).class
|
153
|
+
# => Demanbase::DomainRecord
|
154
|
+
|
155
|
+
(Demandbase::lazy_lookup email_looking_thing).class
|
156
|
+
# => Demanbase::DomainRecord
|
157
|
+
```
|
158
|
+
|
159
|
+
### Field Info
|
160
|
+
|
161
|
+
<table>
|
162
|
+
<tr>
|
163
|
+
<th>Field name (click for description)</th>
|
164
|
+
<th>DomainRecord Presence?</th>
|
165
|
+
<th>IPRecord Presence?</th>
|
166
|
+
</tr>
|
167
|
+
|
168
|
+
<tr>
|
169
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#registry-company-name">registry_company_name</a></td>
|
170
|
+
<td>:finnadie:</td>
|
171
|
+
<td>:metal:</td>
|
172
|
+
</tr>
|
173
|
+
|
174
|
+
<tr>
|
175
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#registry-city">registry_city</a></td>
|
176
|
+
<td>:finnadie:</td>
|
177
|
+
<td>:metal:</td>
|
178
|
+
</tr>
|
179
|
+
|
180
|
+
<tr>
|
181
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#registry-state">registry_state</a></td>
|
182
|
+
<td>:finnadie:</td>
|
183
|
+
<td>:metal:</td>
|
184
|
+
</tr>
|
185
|
+
|
186
|
+
<tr>
|
187
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#registry-country">registry_country</a></td>
|
188
|
+
<td>:finnadie:</td>
|
189
|
+
<td>:metal:</td>
|
190
|
+
</tr>
|
191
|
+
|
192
|
+
<tr>
|
193
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#registry-latitude">registry_latitude</a></td>
|
194
|
+
<td>:finnadie:</td>
|
195
|
+
<td>:metal:</td>
|
196
|
+
</tr>
|
197
|
+
|
198
|
+
<tr>
|
199
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#registry-longitude">registry_longitude</a></td>
|
200
|
+
<td>:finnadie:</td>
|
201
|
+
<td>:metal:</td>
|
202
|
+
</tr>
|
203
|
+
|
204
|
+
<tr>
|
205
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#ip">ip</a></td>
|
206
|
+
<td>:finnadie:</td>
|
207
|
+
<td>:metal:</td>
|
208
|
+
</tr>
|
209
|
+
|
210
|
+
<tr>
|
211
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#information-level">information_level</a></td>
|
212
|
+
<td>:finnadie:</td>
|
213
|
+
<td>:metal:</td>
|
214
|
+
</tr>
|
215
|
+
|
216
|
+
<tr>
|
217
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#worldhq-sid">worldhq_sid</a></td>
|
218
|
+
<td>:finnadie:</td>
|
219
|
+
<td>:metal:</td>
|
220
|
+
</tr>
|
221
|
+
|
222
|
+
<tr>
|
223
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#domestichq-sid">domestichq_sid</a></td>
|
224
|
+
<td>:finnadie:</td>
|
225
|
+
<td>:metal:</td>
|
226
|
+
</tr>
|
227
|
+
|
228
|
+
<tr>
|
229
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#hq-sid">hq_sid</a></td>
|
230
|
+
<td>:finnadie:</td>
|
231
|
+
<td>:metal:</td>
|
232
|
+
</tr>
|
233
|
+
|
234
|
+
<tr>
|
235
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#isp">isp</a></td>
|
236
|
+
<td>:finnadie:</td>
|
237
|
+
<td>:metal:</td>
|
238
|
+
</tr>
|
239
|
+
|
240
|
+
<tr>
|
241
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#company-name">company_name</a></td>
|
242
|
+
<td>:metal:</td>
|
243
|
+
<td>:metal:</td>
|
244
|
+
</tr>
|
245
|
+
|
246
|
+
<tr>
|
247
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#demandbase-sid">demandbase_sid</a></td>
|
248
|
+
<td>:metal:</td>
|
249
|
+
<td>:metal:</td>
|
250
|
+
</tr>
|
251
|
+
|
252
|
+
<tr>
|
253
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#marketing-alias">marketing_alias</a></td>
|
254
|
+
<td>:metal:</td>
|
255
|
+
<td>:metal:</td>
|
256
|
+
</tr>
|
257
|
+
|
258
|
+
<tr>
|
259
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#industry">industry</a></td>
|
260
|
+
<td>:metal:</td>
|
261
|
+
<td>:metal:</td>
|
262
|
+
</tr>
|
263
|
+
|
264
|
+
<tr>
|
265
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#sub-industry">sub_industry</a></td>
|
266
|
+
<td>:metal:</td>
|
267
|
+
<td>:metal:</td>
|
268
|
+
</tr>
|
269
|
+
|
270
|
+
<tr>
|
271
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#employee-count">employee_count</a></td>
|
272
|
+
<td>:metal:</td>
|
273
|
+
<td>:metal:</td>
|
274
|
+
</tr>
|
275
|
+
|
276
|
+
<tr>
|
277
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#primary-sic">primary_sic</a></td>
|
278
|
+
<td>:metal:</td>
|
279
|
+
<td>:metal:</td>
|
280
|
+
</tr>
|
281
|
+
|
282
|
+
<tr>
|
283
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#street-address">street_address</a></td>
|
284
|
+
<td>:metal:</td>
|
285
|
+
<td>:metal:</td>
|
286
|
+
</tr>
|
287
|
+
|
288
|
+
<tr>
|
289
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#city">city</a></td>
|
290
|
+
<td>:metal:</td>
|
291
|
+
<td>:metal:</td>
|
292
|
+
</tr>
|
293
|
+
|
294
|
+
<tr>
|
295
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#state">state</a></td>
|
296
|
+
<td>:metal:</td>
|
297
|
+
<td>:metal:</td>
|
298
|
+
</tr>
|
299
|
+
|
300
|
+
<tr>
|
301
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#zip">zip</a></td>
|
302
|
+
<td>:metal:</td>
|
303
|
+
<td>:metal:</td>
|
304
|
+
</tr>
|
305
|
+
|
306
|
+
<tr>
|
307
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#country">country</a></td>
|
308
|
+
<td>:metal:</td>
|
309
|
+
<td>:metal:</td>
|
310
|
+
</tr>
|
311
|
+
|
312
|
+
<tr>
|
313
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#country-name">country_name</a></td>
|
314
|
+
<td>:metal:</td>
|
315
|
+
<td>:metal:</td>
|
316
|
+
</tr>
|
317
|
+
|
318
|
+
<tr>
|
319
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#phone">phone</a></td>
|
320
|
+
<td>:metal:</td>
|
321
|
+
<td>:metal:</td>
|
322
|
+
</tr>
|
323
|
+
|
324
|
+
<tr>
|
325
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#web-site">web_site</a></td>
|
326
|
+
<td>:metal:</td>
|
327
|
+
<td>:metal:</td>
|
328
|
+
</tr>
|
329
|
+
|
330
|
+
<tr>
|
331
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#annual-sales">annual_sales</a></td>
|
332
|
+
<td>:metal:</td>
|
333
|
+
<td>:metal:</td>
|
334
|
+
</tr>
|
335
|
+
|
336
|
+
<tr>
|
337
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#revenue-range">revenue_range</a></td>
|
338
|
+
<td>:metal:</td>
|
339
|
+
<td>:metal:</td>
|
340
|
+
</tr>
|
341
|
+
|
342
|
+
<tr>
|
343
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#employee-range">employee_range</a></td>
|
344
|
+
<td>:metal:</td>
|
345
|
+
<td>:metal:</td>
|
346
|
+
</tr>
|
347
|
+
|
348
|
+
<tr>
|
349
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#b2b">b2b</a></td>
|
350
|
+
<td>:metal:</td>
|
351
|
+
<td>:metal:</td>
|
352
|
+
</tr>
|
353
|
+
|
354
|
+
<tr>
|
355
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#b2c">b2c</a></td>
|
356
|
+
<td>:metal:</td>
|
357
|
+
<td>:metal:</td>
|
358
|
+
</tr>
|
359
|
+
|
360
|
+
<tr>
|
361
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#traffic">traffic</a></td>
|
362
|
+
<td>:metal:</td>
|
363
|
+
<td>:metal:</td>
|
364
|
+
</tr>
|
365
|
+
|
366
|
+
<tr>
|
367
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#latitude">latitude</a></td>
|
368
|
+
<td>:metal:</td>
|
369
|
+
<td>:metal:</td>
|
370
|
+
</tr>
|
371
|
+
|
372
|
+
<tr>
|
373
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#longitude">longitude</a></td>
|
374
|
+
<td>:metal:</td>
|
375
|
+
<td>:metal:</td>
|
376
|
+
</tr>
|
377
|
+
|
378
|
+
<tr>
|
379
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#fortune_1000">fortune_1000</a></td>
|
380
|
+
<td>:metal:</td>
|
381
|
+
<td>:metal:</td>
|
382
|
+
</tr>
|
383
|
+
|
384
|
+
<tr>
|
385
|
+
<td><a href="https://github.com/leereilly/demandbase/blob/master/README.md#forbes_2000">forbes_2000</a></td>
|
386
|
+
<td>:metal:</td>
|
387
|
+
<td>:metal:</td>
|
388
|
+
</tr>
|
389
|
+
|
390
|
+
</table>
|
391
|
+
|
392
|
+
#### Registry Company Name
|
393
|
+
|
394
|
+
#### Registry City
|
395
|
+
|
396
|
+
#### Registry State
|
397
|
+
|
398
|
+
#### Registry Country
|
399
|
+
|
400
|
+
#### Registry Latitude
|
401
|
+
|
402
|
+
#### Registry Longitude
|
403
|
+
|
404
|
+
#### IP
|
405
|
+
|
406
|
+
#### Information Level
|
407
|
+
|
408
|
+
#### World HQ SID
|
409
|
+
|
410
|
+
#### Domestic HQ SID
|
411
|
+
|
412
|
+
#### HQ SID
|
413
|
+
|
414
|
+
#### ISP
|
415
|
+
|
416
|
+
#### Company Name
|
417
|
+
|
418
|
+
#### Demandbase SID
|
419
|
+
|
420
|
+
#### Marketing Alias
|
421
|
+
|
422
|
+
#### Industry
|
423
|
+
|
424
|
+
#### Sub Industry
|
425
|
+
|
426
|
+
#### Employee Count
|
427
|
+
|
428
|
+
#### Primary SIC
|
429
|
+
|
430
|
+
#### Street Address
|
431
|
+
|
432
|
+
#### City
|
433
|
+
|
434
|
+
#### State
|
435
|
+
|
436
|
+
#### Zip
|
437
|
+
|
438
|
+
#### Country
|
439
|
+
|
440
|
+
#### Country Name
|
441
|
+
|
442
|
+
#### Phone
|
443
|
+
|
444
|
+
#### Web Site
|
445
|
+
|
446
|
+
#### Annual Sales
|
447
|
+
|
448
|
+
#### Revenue Range
|
449
|
+
|
450
|
+
#### Revenue Range
|
451
|
+
|
452
|
+
<table>
|
453
|
+
<tr>
|
454
|
+
<th>Value</th>
|
455
|
+
<th>Description</th>
|
456
|
+
</tr>
|
457
|
+
<tr>
|
458
|
+
<td>$1 - $1M</td>
|
459
|
+
<td>:credit_card:</td>
|
460
|
+
</tr>
|
461
|
+
<tr>
|
462
|
+
<td>$1M - $5M</td>
|
463
|
+
<td>:dollar:</td>
|
464
|
+
</tr>
|
465
|
+
<tr>
|
466
|
+
<td>$5M - $10M</td>
|
467
|
+
<td>:dollar: :dollar:</td>
|
468
|
+
</tr>
|
469
|
+
<tr>
|
470
|
+
<td>$10M - $25M</td>
|
471
|
+
<td>:dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar:</td>
|
472
|
+
</tr>
|
473
|
+
<tr>
|
474
|
+
<td>$25M - $50M</td>
|
475
|
+
<td>:dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar: :dollar:</td>
|
476
|
+
</tr>
|
477
|
+
<tr>
|
478
|
+
<td>$50M - $100M</td>
|
479
|
+
<td>:moneybag:</td>
|
480
|
+
</tr>
|
481
|
+
<tr>
|
482
|
+
<td>$100M - $250M</td>
|
483
|
+
<td>:moneybag::moneybag:</td>
|
484
|
+
</tr>
|
485
|
+
<tr>
|
486
|
+
<td>$250M - $500M</td>
|
487
|
+
<td>:moneybag::moneybag::moneybag:</td>
|
488
|
+
</tr>
|
489
|
+
<tr>
|
490
|
+
<td>$500M - $1B</td>
|
491
|
+
<td>:moneybag::moneybag::moneybag::moneybag:</td>
|
492
|
+
</tr>
|
493
|
+
<tr>
|
494
|
+
<td>$1B - $2.5B</td>
|
495
|
+
<td>:moneybag::moneybag::moneybag::moneybag::moneybag:</td>
|
496
|
+
</tr>
|
497
|
+
<tr>
|
498
|
+
<td>$2.5B - $5B</td>
|
499
|
+
<td>:moneybag::moneybag::moneybag::moneybag::moneybag::moneybag:</td>
|
500
|
+
</tr>
|
501
|
+
<tr>
|
502
|
+
<td>Over $5B</td>
|
503
|
+
<td>:money_with_wings:</td>
|
504
|
+
</tr>
|
505
|
+
</table>
|
506
|
+
|
507
|
+
#### Employee Range
|
508
|
+
|
509
|
+
<table>
|
510
|
+
<tr>
|
511
|
+
<th>Value</th>
|
512
|
+
<th>Description</th>
|
513
|
+
</tr>
|
514
|
+
<tr>
|
515
|
+
<td>Unknown</td>
|
516
|
+
<td>:house:</td>
|
517
|
+
</tr>
|
518
|
+
<tr>
|
519
|
+
<td>Small</td>
|
520
|
+
<td>:school:1-99 employees</td>
|
521
|
+
</tr>
|
522
|
+
<tr>
|
523
|
+
<td>Mid-Market</td>
|
524
|
+
<td>:department_store: 100-999 employees</td>
|
525
|
+
</tr>
|
526
|
+
<tr>
|
527
|
+
<td>Enterprise</td>
|
528
|
+
<td>:office: 1000+ employees</td>
|
529
|
+
</tr>
|
530
|
+
</table>
|
531
|
+
|
532
|
+
#### Audience
|
533
|
+
|
534
|
+
<table>
|
535
|
+
<tr>
|
536
|
+
<th>Company Size</th>
|
537
|
+
<th>Vertical</th>
|
538
|
+
<th>Origination</th>
|
539
|
+
</tr>
|
540
|
+
<tr>
|
541
|
+
<td>Enterprise<br>Mid-Market<br>SMB</td>
|
542
|
+
<td>Government<br>Education</td>
|
543
|
+
<td>Wireless<br>Residential<br>SOHO<br>Unknown</td>
|
544
|
+
</tr>
|
545
|
+
</table>
|
546
|
+
|
547
|
+
#### Audience Segment
|
548
|
+
|
549
|
+
<table>
|
550
|
+
<tr>
|
551
|
+
<th>Company Size</th>
|
552
|
+
<th>Government</th>
|
553
|
+
<th>Education</th>
|
554
|
+
<th>Wireless</th>
|
555
|
+
<th>Residential/SOHO/Unknown</th>
|
556
|
+
</tr>
|
557
|
+
<tr>
|
558
|
+
<td>Industry<br>Search Engine</td>
|
559
|
+
<td>Federal<br>International<br>State<br>City<br>Local<br>Military<br>Public Safety</td>
|
560
|
+
<td>University<br>K12<br>Vocational<br>Educational Services<br>Educational ISP</td>
|
561
|
+
<td>Wireless Device<br>Wireless Hotspot</td>
|
562
|
+
<td>Bots</td>
|
563
|
+
</tr>
|
564
|
+
</table>
|
565
|
+
|
566
|
+
#### B2B
|
567
|
+
|
568
|
+
#### B2C
|
569
|
+
|
570
|
+
#### Traffic
|
571
|
+
|
572
|
+
#### Latitude
|
573
|
+
|
574
|
+
#### Longitude
|
575
|
+
|
576
|
+
#### Fortune 1000
|
577
|
+
|
578
|
+
#### Forbes 2000
|
579
|
+
|
122
580
|
### DLC / Enhancements
|
123
581
|
|
124
582
|
* Use the [csi](https://github.com/leereilly/csi) gem if you'd like to correlate SIC codes with NAICS codes.
|