hubspot-ruby 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hubspot-ruby.gemspec +4 -3
- data/lib/hubspot/contact.rb +11 -3
- data/lib/hubspot/exceptions.rb +5 -1
- data/lib/hubspot/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/find_all_contacts.yml +258 -0
- data/spec/lib/hubspot/contact_spec.rb +39 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de21d5dd95f68e46b0d289c9cae19de49423df0d
|
4
|
+
data.tar.gz: afe20a8aeb443ba86a5742140ce488fc50312bfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45f1b32ab613d5f38f362c2e4aac42b36fbf1cf8c5b4d38ceac935ca259b90fa637d0d49cd717c10015e859fb1dbb826fa79f0ec5d094f42cb811e6df3c916f8
|
7
|
+
data.tar.gz: 20cc23dc732a1c21869e2736cb5c39bd8cecd8a1e07ade008b82a79b3ec404b173528c348a9d96617986c75496d61f62c79583fd436ff463859203ee34cf4501
|
data/hubspot-ruby.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: hubspot-ruby 0.1.
|
5
|
+
# stub: hubspot-ruby 0.1.7 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "hubspot-ruby"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.7"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Andrew DiMichele"]
|
14
|
-
s.date = "2015-01-
|
14
|
+
s.date = "2015-01-12"
|
15
15
|
s.description = "hubspot-ruby is a wrapper for the HubSpot REST API"
|
16
16
|
s.email = "hello@omadahealth.com"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -56,6 +56,7 @@ Gem::Specification.new do |s|
|
|
56
56
|
"spec/fixtures/vcr_cassettes/deal_example.yml",
|
57
57
|
"spec/fixtures/vcr_cassettes/deal_find.yml",
|
58
58
|
"spec/fixtures/vcr_cassettes/destroy_deal.yml",
|
59
|
+
"spec/fixtures/vcr_cassettes/find_all_contacts.yml",
|
59
60
|
"spec/fixtures/vcr_cassettes/find_all_recent_updated_deals.yml",
|
60
61
|
"spec/fixtures/vcr_cassettes/form_post.yml",
|
61
62
|
"spec/fixtures/vcr_cassettes/one_month_blog_posts_filter_state.yml",
|
data/lib/hubspot/contact.rb
CHANGED
@@ -14,6 +14,7 @@ module Hubspot
|
|
14
14
|
GET_CONTACT_BY_UTK_PATH = "/contacts/v1/contact/utk/:contact_utk/profile"
|
15
15
|
UPDATE_CONTACT_PATH = "/contacts/v1/contact/vid/:contact_id/profile"
|
16
16
|
DESTROY_CONTACT_PATH = "/contacts/v1/contact/vid/:contact_id"
|
17
|
+
CONTACTS_PATH = "/contacts/v1/lists/all/contacts/all"
|
17
18
|
|
18
19
|
class << self
|
19
20
|
# Creates a new contact
|
@@ -74,10 +75,17 @@ module Hubspot
|
|
74
75
|
|
75
76
|
# TODO: Get all contacts
|
76
77
|
# {https://developers.hubspot.com/docs/methods/contacts/get_contacts}
|
77
|
-
# @param count [Fixnum] number of contacts per page; max 100
|
78
|
+
# @param count [Fixnum] number of contacts per page; default 20; max 100
|
79
|
+
# @param vidOffset [Fixnum] page through the contacts
|
78
80
|
# @return [Hubspot::ContactCollection] the paginated collection of contacts
|
79
|
-
def all(
|
80
|
-
|
81
|
+
def all(opts = {})
|
82
|
+
url = Hubspot::Utils.generate_url(CONTACTS_PATH, opts)
|
83
|
+
request = HTTParty.get(url, format: :json)
|
84
|
+
|
85
|
+
raise(Hubspot::RequestError.new(request)) unless request.success?
|
86
|
+
|
87
|
+
found = request.parsed_response['contacts']
|
88
|
+
return found.map{|h| new(h) }
|
81
89
|
end
|
82
90
|
|
83
91
|
# TODO: Get recently updated and created contacts
|
data/lib/hubspot/exceptions.rb
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
module Hubspot
|
2
2
|
class RequestError < StandardError
|
3
|
+
attr_accessor :response
|
4
|
+
|
3
5
|
def initialize(response, message=nil)
|
4
6
|
message += "\n" if message
|
5
|
-
super("#{message}Response body: #{response.body}")
|
7
|
+
me = super("#{message}Response body: #{response.body}",)
|
8
|
+
me.response = response
|
9
|
+
return me
|
6
10
|
end
|
7
11
|
end
|
8
12
|
|
data/lib/hubspot/version.rb
CHANGED
@@ -0,0 +1,258 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
Access-Control-Allow-Credentials:
|
16
|
+
- 'false'
|
17
|
+
Content-Type:
|
18
|
+
- application/json; charset=UTF-8
|
19
|
+
Date:
|
20
|
+
- Sat, 10 Jan 2015 14:43:56 GMT
|
21
|
+
Vary:
|
22
|
+
- Accept-Encoding
|
23
|
+
- Accept-Encoding
|
24
|
+
Transfer-Encoding:
|
25
|
+
- chunked
|
26
|
+
Connection:
|
27
|
+
- keep-alive
|
28
|
+
body:
|
29
|
+
encoding: UTF-8
|
30
|
+
string: '{"contacts":[{"addedAt":1405347851360,"vid":154835,"canonical-vid":154835,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mNJu56Masvy-UGew0va-sSwlbSvfM2QxK1J7sd52Qci-gZCHybsgFoIwqgvmHq9f01ywtMLA6vB131sFPFEpkGAvl-bvEJ0ZB9xzpVbPkYVRmHfFIU3q9WfOStV1IMYOqGL9wYl","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mNJu56Masvy-UGew0va-sSwlbSvfM2QxK1J7sd52Qci-gZCHybsgFoIwqgvmHq9f01ywtMLA6vB131sFPFEpkGAvl-bvEJ0ZB9xzpVbPkYVRmHfFIU3q9WfOStV1IMYOqGL9wYl/","properties":{"firstname":{"value":"HubSpot"},"lastmodifieddate":{"value":"1414183315068"},"lastname":{"value":"Test"}},"form-submissions":[{"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9","timestamp":1405347851180,"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b","portal-id":62515,"page-url":"http://demo.hubapi.com/your-stunning-headline-30","page-title":"Your
|
31
|
+
stunning headline!","page-id":"324527","title":"My New Form","meta-data":[]}],"identity-profiles":[{"vid":154835,"saved-at-timestamp":1405347851237,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"test@hubspot.com","timestamp":1405347851180},{"type":"LEAD_GUID","value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc","timestamp":1405347851237}]}],"merge-audits":[]},{"addedAt":1390569372731,"vid":196181,"canonical-vid":196181,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMIvDKHrvpwOBJZFyPEfOShYcO5PwUtJl0kwaIpsdPv533R18vJiH0w5yHk8LrLBCMVyKkRqgRKYkEUcaLmsZwIjwpjy-WLoGBWK1Gurw-sfAbZCeQ1ICgoEN5rM_PO1_dIye-H","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMIvDKHrvpwOBJZFyPEfOShYcO5PwUtJl0kwaIpsdPv533R18vJiH0w5yHk8LrLBCMVyKkRqgRKYkEUcaLmsZwIjwpjy-WLoGBWK1Gurw-sfAbZCeQ1ICgoEN5rM_PO1_dIye-H/","properties":{"firstname":{"value":"Charles"},"lastmodifieddate":{"value":"1414183318111"},"company":{"value":""},"lastname":{"value":"Gowland"}},"form-submissions":[],"identity-profiles":[{"vid":196181,"saved-at-timestamp":1390569372649,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"clg@gburnette.com","timestamp":1390568711002},{"type":"LEAD_GUID","value":"dca0d8a2-fa9c-4ca6-b5ef-c1bfb4a0bed4","timestamp":1390569372636}]}],"merge-audits":[]},{"addedAt":1390569372834,"vid":196182,"canonical-vid":196182,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mNJlSBo9yjlSNHhLCObpPdvDtt2qFmrIsza5CV3z7vr2cHFZ3cwBhK-q2k1xMGWmuJizRat-dxQuAfAEoJR-rnH9tHGFaH3ee2ZSM3_6_9u_r1EEyRqZuSLYHJ3d7ZNxjBPQjjE","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mNJlSBo9yjlSNHhLCObpPdvDtt2qFmrIsza5CV3z7vr2cHFZ3cwBhK-q2k1xMGWmuJizRat-dxQuAfAEoJR-rnH9tHGFaH3ee2ZSM3_6_9u_r1EEyRqZuSLYHJ3d7ZNxjBPQjjE/","properties":{"firstname":{"value":"Curtis"},"lastmodifieddate":{"value":"1414183316159"},"company":{"value":""},"lastname":{"value":"Romig"}},"form-submissions":[],"identity-profiles":[{"vid":196182,"saved-at-timestamp":1390569372699,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"curtis.romig@bryancave.com","timestamp":1390568725415},{"type":"LEAD_GUID","value":"e18dc184-0238-48f1-a8a2-4476733f50d3","timestamp":1390569372641}]}],"merge-audits":[]},{"addedAt":1390569372757,"vid":196183,"canonical-vid":196183,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mP3BDDUCSCAHYFESNJPJTemaXdGs_aoSaIk8jvkthVcdEt0Aj5lzqBRSO-ojRgScw9Vv2a6AFnyd8q_7OuyoKi_F0Aq_pK13ENmv85vUNE3mBoR0MbuAoKvg2A339q8FB-nuABH","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mP3BDDUCSCAHYFESNJPJTemaXdGs_aoSaIk8jvkthVcdEt0Aj5lzqBRSO-ojRgScw9Vv2a6AFnyd8q_7OuyoKi_F0Aq_pK13ENmv85vUNE3mBoR0MbuAoKvg2A339q8FB-nuABH/","properties":{"firstname":{"value":"Eugene"},"lastmodifieddate":{"value":"1414183318527"},"company":{"value":""},"lastname":{"value":"Klibanoff"}},"form-submissions":[],"identity-profiles":[{"vid":196183,"saved-at-timestamp":1390569372682,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"eklibanoff@incomm.com","timestamp":1390568722786},{"type":"LEAD_GUID","value":"276f1a0f-ce8f-4069-9b7a-405f9e14971a","timestamp":1390569372674}]}],"merge-audits":[]},{"addedAt":1390569372800,"vid":196184,"canonical-vid":196184,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMeiurcgjssDNV-J7ZAyr90NUeiP3J8zWIpSUKSxZJ8Tr187ylEPHUwFG9Fk3mbpbQwt-Dk5KFRx3z5po6idM2MOEqFjP42xWQgaPRKZ0pH2Bkuj2QZHqTp7rK4pfC5kuaZOmfj","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMeiurcgjssDNV-J7ZAyr90NUeiP3J8zWIpSUKSxZJ8Tr187ylEPHUwFG9Fk3mbpbQwt-Dk5KFRx3z5po6idM2MOEqFjP42xWQgaPRKZ0pH2Bkuj2QZHqTp7rK4pfC5kuaZOmfj/","properties":{"firstname":{"value":"James
|
32
|
+
C. & Brenda L."},"lastmodifieddate":{"value":"1414183520978"},"company":{"value":""},"lastname":{"value":"Kellling"}},"form-submissions":[],"identity-profiles":[{"vid":196184,"saved-at-timestamp":1390569372744,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"jameskelling@bellsouth.net","timestamp":1390568911277},{"type":"LEAD_GUID","value":"4b92ccc6-d777-4e3e-90d9-bc4722329c16","timestamp":1390569372738}]}],"merge-audits":[]},{"addedAt":1390569372819,"vid":196185,"canonical-vid":196185,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mN2EpC4p1spU8eCK6jzJJ-rO-uppLkPuQczndwj0MzLk3qefFgGtaa67UDJUH2YFCUE9xA1LGYg8MY84ydS29l3UOT9pnKGPQLSJ65-8j6QTSVa_sHQnV42pDE3xaDfTos9ZNgO","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mN2EpC4p1spU8eCK6jzJJ-rO-uppLkPuQczndwj0MzLk3qefFgGtaa67UDJUH2YFCUE9xA1LGYg8MY84ydS29l3UOT9pnKGPQLSJ65-8j6QTSVa_sHQnV42pDE3xaDfTos9ZNgO/","properties":{"firstname":{"value":""},"lastmodifieddate":{"value":"1414183316574"},"company":{"value":""},"lastname":{"value":"Fred
|
33
|
+
Woestman"}},"form-submissions":[],"identity-profiles":[{"vid":196185,"saved-at-timestamp":1390569372754,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"fwoestmann@comcast.net","timestamp":1390568788629},{"type":"LEAD_GUID","value":"610c58ef-2e19-43fe-af5d-8c115aba617f","timestamp":1390569372746}]}],"merge-audits":[]},{"addedAt":1390569372981,"vid":196186,"canonical-vid":196186,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mNy6mozQ-cJOHTBCmyfjjUK0-vmLbvTjvN92J5Zp7t-ic6BZdnirR256o001rHNppnRmWvThdjLKqYxrd-asodWUYZhSxcuRVEwOugNdlkOaY7tuTiOBzqF0GGUQ7HPLHGzw4y0","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mNy6mozQ-cJOHTBCmyfjjUK0-vmLbvTjvN92J5Zp7t-ic6BZdnirR256o001rHNppnRmWvThdjLKqYxrd-asodWUYZhSxcuRVEwOugNdlkOaY7tuTiOBzqF0GGUQ7HPLHGzw4y0/","properties":{"firstname":{"value":"Benjamin"},"lastmodifieddate":{"value":"1414183315715"},"company":{"value":""},"lastname":{"value":"Rust"}},"form-submissions":[],"identity-profiles":[{"vid":196186,"saved-at-timestamp":1390569372769,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"ben@synaxisworks.com","timestamp":1390568759222},{"type":"LEAD_GUID","value":"c0981af6-1d44-4375-a425-f880cef2fd83","timestamp":1390569372756}]}],"merge-audits":[]},{"addedAt":1390569372870,"vid":196187,"canonical-vid":196187,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMt1ySwGuR2Ej08BIJcEW12co1iJDRFO6DJmTKwgGZmzv5xYowUGUi5YNMDEdD9AHIsBnCFkqu7IQT84lM80uXN1j1Jetaqk9iULFn9WzySGAwUkUc9Kdp66jK9XbGa-T4hniLn","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMt1ySwGuR2Ej08BIJcEW12co1iJDRFO6DJmTKwgGZmzv5xYowUGUi5YNMDEdD9AHIsBnCFkqu7IQT84lM80uXN1j1Jetaqk9iULFn9WzySGAwUkUc9Kdp66jK9XbGa-T4hniLn/","properties":{"firstname":{"value":""},"lastmodifieddate":{"value":"1414183314753"},"company":{"value":""},"lastname":{"value":"Rich
|
34
|
+
Green"}},"form-submissions":[],"identity-profiles":[{"vid":196187,"saved-at-timestamp":1390569372772,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"green3531@gmail.com","timestamp":1390568813364},{"type":"LEAD_GUID","value":"519bf221-2f75-4e84-b677-36779f8e3a43","timestamp":1390569372762}]}],"merge-audits":[]},{"addedAt":1390569372844,"vid":196188,"canonical-vid":196188,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mPnpigaR0qygRzE9cJIiPpAHdkDbmR_DAvnoR-LRzaYDAwcEM9jeCHlPOiSREDhjqKu-iaLyvA2Nd5h9n3Gs22PibFwfUq6l5p2B6vv1OiqeJvKTjhxvCX8JSoeiXaa88TjlUbU","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mPnpigaR0qygRzE9cJIiPpAHdkDbmR_DAvnoR-LRzaYDAwcEM9jeCHlPOiSREDhjqKu-iaLyvA2Nd5h9n3Gs22PibFwfUq6l5p2B6vv1OiqeJvKTjhxvCX8JSoeiXaa88TjlUbU/","properties":{"firstname":{"value":"Kathleen
|
35
|
+
Odonnell"},"lastmodifieddate":{"value":"1414183318653"},"company":{"value":""},"lastname":{"value":"Durst"}},"form-submissions":[],"identity-profiles":[{"vid":196188,"saved-at-timestamp":1390569372772,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"kathidurst@gmail.com","timestamp":1390568852085},{"type":"LEAD_GUID","value":"c1df47c3-605a-4847-af76-e60cc4212dcc","timestamp":1390569372763}]}],"merge-audits":[]},{"addedAt":1390569372832,"vid":196189,"canonical-vid":196189,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMGX5Ipm0pGttb6IiLgKydou8eynpDr3Ht3xtgMEQIIDt0lqTQMN-S433E0aOgtioShtT6-sQ0mOlaZcXsR86iBZOt6Lnialhu5D0NpriJwxoNivtyfBnfT1fFcEx04f406z7vq","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMGX5Ipm0pGttb6IiLgKydou8eynpDr3Ht3xtgMEQIIDt0lqTQMN-S433E0aOgtioShtT6-sQ0mOlaZcXsR86iBZOt6Lnialhu5D0NpriJwxoNivtyfBnfT1fFcEx04f406z7vq/","properties":{"firstname":{"value":"Glenn"},"lastmodifieddate":{"value":"1414183436568"},"company":{"value":""},"lastname":{"value":"Bachman"}},"form-submissions":[],"identity-profiles":[{"vid":196189,"saved-at-timestamp":1390569372781,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"glennbachman@att.net","timestamp":1390568755598},{"type":"LEAD_GUID","value":"f97a9531-2780-4a53-bed1-3659c58e1b98","timestamp":1390569372775}]}],"merge-audits":[]},{"addedAt":1390569372872,"vid":196190,"canonical-vid":196190,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mPd8kOdqDNDxQIx1xCesr2EhZPmDnquPl5hIK_mJH_Hs9aLVEXLxcTtO7jPbCjh0gziZ49ZFlAbwQkZ_KzOz_fYc6woX6lHgYSPTrHHdpFwfZXLf9ZfxzDAy_6hbJrqTCQc7oJB","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mPd8kOdqDNDxQIx1xCesr2EhZPmDnquPl5hIK_mJH_Hs9aLVEXLxcTtO7jPbCjh0gziZ49ZFlAbwQkZ_KzOz_fYc6woX6lHgYSPTrHHdpFwfZXLf9ZfxzDAy_6hbJrqTCQc7oJB/","properties":{"firstname":{"value":""},"lastmodifieddate":{"value":"1414183632930"},"company":{"value":""},"lastname":{"value":"Kohn,
|
36
|
+
Larry & Jami"}},"form-submissions":[],"identity-profiles":[{"vid":196190,"saved-at-timestamp":1390569372777,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"jamikohn@yahoo.com","timestamp":1390568666276},{"type":"LEAD_GUID","value":"e8ee498e-7947-4d8a-b386-c2b260dfad62","timestamp":1390569372767}]}],"merge-audits":[]},{"addedAt":1390569372852,"vid":196191,"canonical-vid":196191,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMLNU76twJIjifu-scDoFLUEEMK0DagWZMYL6DLlDJaZajPXd-ywYOYH66qt4eZ2y-bD5_OXDyzjU-cbQNfoy1T0yUj_Qcq2fmAhYUFyWQxr7Menn-0bbmUxgpExM31V-5whUrz","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMLNU76twJIjifu-scDoFLUEEMK0DagWZMYL6DLlDJaZajPXd-ywYOYH66qt4eZ2y-bD5_OXDyzjU-cbQNfoy1T0yUj_Qcq2fmAhYUFyWQxr7Menn-0bbmUxgpExM31V-5whUrz/","properties":{"firstname":{"value":"Emily"},"lastmodifieddate":{"value":"1414183314276"},"company":{"value":""},"lastname":{"value":"Palik"}},"form-submissions":[],"identity-profiles":[{"vid":196191,"saved-at-timestamp":1390569372782,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"emily.palik@adp.com","timestamp":1390568893411},{"type":"LEAD_GUID","value":"a42c7c5c-939e-4b33-b6b1-7bbc5d6f165e","timestamp":1390569372773}]}],"merge-audits":[]},{"addedAt":1390569372864,"vid":196192,"canonical-vid":196192,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mPYNu_N7jzVwo-w1KV8OHrDeArfpZxB7DMJIK9jmyvkSWUQINX16KF0bTL63jXp_5gsDMc4XA42zhwDhGGKYD3zC-mprBmsWnI883Lnz_gIQIr5zEEOrj7SUsYtnxpzKvd_ww-v","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mPYNu_N7jzVwo-w1KV8OHrDeArfpZxB7DMJIK9jmyvkSWUQINX16KF0bTL63jXp_5gsDMc4XA42zhwDhGGKYD3zC-mprBmsWnI883Lnz_gIQIr5zEEOrj7SUsYtnxpzKvd_ww-v/","properties":{"firstname":{"value":""},"lastmodifieddate":{"value":"1414183315545"},"company":{"value":""},"lastname":{"value":"Cliff
|
37
|
+
Byrant"}},"form-submissions":[],"identity-profiles":[{"vid":196192,"saved-at-timestamp":1390569372797,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"cliffbryant@corp.earthlink.net","timestamp":1390568783409},{"type":"LEAD_GUID","value":"8c2d9b51-cc45-492d-a018-883bf871e48c","timestamp":1390569372789}]}],"merge-audits":[]},{"addedAt":1390569372941,"vid":196193,"canonical-vid":196193,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mP02ynziBSjBxNQEto6d6R4v5Afv2yA_XtrNS3twaK7226u2MbukngDFDy4UH410-V19OFZhV8SQac_Zy131o2s-X2nh52BcAt-y4gR26reAFGgKP-yCHxok3qHP6WY33P9azjO","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mP02ynziBSjBxNQEto6d6R4v5Afv2yA_XtrNS3twaK7226u2MbukngDFDy4UH410-V19OFZhV8SQac_Zy131o2s-X2nh52BcAt-y4gR26reAFGgKP-yCHxok3qHP6WY33P9azjO/","properties":{"firstname":{"value":"John"},"lastmodifieddate":{"value":"1414183316745"},"company":{"value":"BlueLink,
|
38
|
+
LLC"},"lastname":{"value":"Dyslin"}},"form-submissions":[],"identity-profiles":[{"vid":196193,"saved-at-timestamp":1390569372811,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"john@bluelinkdirect.com","timestamp":1390568923286},{"type":"LEAD_GUID","value":"62355e28-add8-4bf2-a687-e04e2826b442","timestamp":1390569372793}]}],"merge-audits":[]},{"addedAt":1390569372879,"vid":196194,"canonical-vid":196194,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mN-dAdX8IqvyDahhTFZU-0A2sW10OM9LdFJGH0e-GzK1A5ZN97CRSaZX9kCwywL6xhGGKNhw4wz0vnr1v-I_A-LZfafFAAkYjp_ckJaPlmDGpLq8zrP-DOBQfWXMED4_JbOZsfe","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mN-dAdX8IqvyDahhTFZU-0A2sW10OM9LdFJGH0e-GzK1A5ZN97CRSaZX9kCwywL6xhGGKNhw4wz0vnr1v-I_A-LZfafFAAkYjp_ckJaPlmDGpLq8zrP-DOBQfWXMED4_JbOZsfe/","properties":{"firstname":{"value":""},"lastmodifieddate":{"value":"1414183313940"},"company":{"value":""},"lastname":{"value":"Ellen
|
39
|
+
Schwartz"}},"form-submissions":[],"identity-profiles":[{"vid":196194,"saved-at-timestamp":1390569372816,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"elatingome@yahoo.com","timestamp":1390568787814},{"type":"LEAD_GUID","value":"606c133c-b550-4752-81dd-0df0d2066f5a","timestamp":1390569372810}]}],"merge-audits":[]},{"addedAt":1390569372979,"vid":196195,"canonical-vid":196195,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mOAzS7t4rhnvrKqdBJk67vrzwUQSJGrOcaTAQPuFmRi1-rMVrjvaoelMYnzPecABgo9mS_MCd5xfYiztAoqViB60kB1AQL7PAo9zW4gxWwydC_DERzE09rEMw5SxqtLD0xUFvI1","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mOAzS7t4rhnvrKqdBJk67vrzwUQSJGrOcaTAQPuFmRi1-rMVrjvaoelMYnzPecABgo9mS_MCd5xfYiztAoqViB60kB1AQL7PAo9zW4gxWwydC_DERzE09rEMw5SxqtLD0xUFvI1/","properties":{"firstname":{"value":"Gary"},"lastmodifieddate":{"value":"1414183424704"},"company":{"value":""},"lastname":{"value":"Weiss"}},"form-submissions":[],"identity-profiles":[{"vid":196195,"saved-at-timestamp":1390569372830,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"gweiss@lwandco.com","timestamp":1390568711614},{"type":"LEAD_GUID","value":"b899625c-0228-4ea0-b6e7-e05403d9991d","timestamp":1390569372823}]}],"merge-audits":[]},{"addedAt":1390569372981,"vid":196196,"canonical-vid":196196,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mN-rf-1pKGhru98f2G8uNo0GL3rheI-7O_e_XpRzOa-IjvNrdF_eWfPxeoRP9JI15kGhR2FMCeVSljrLD3WHrBJAkhHHkHMcHPCkbM3v0jQTa9I43uThCNdHK_kWTC2-YUWtTEp","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mN-rf-1pKGhru98f2G8uNo0GL3rheI-7O_e_XpRzOa-IjvNrdF_eWfPxeoRP9JI15kGhR2FMCeVSljrLD3WHrBJAkhHHkHMcHPCkbM3v0jQTa9I43uThCNdHK_kWTC2-YUWtTEp/","properties":{"firstname":{"value":""},"lastmodifieddate":{"value":"1414183436593"},"company":{"value":""},"lastname":{"value":"Gaines"}},"form-submissions":[],"identity-profiles":[{"vid":196196,"saved-at-timestamp":1390569372827,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"dgaines@rosser.com","timestamp":1390568775978},{"type":"LEAD_GUID","value":"8e55df1c-f73f-4a9b-bfb3-5fd0bdbeed3c","timestamp":1390569372819}]}],"merge-audits":[]},{"addedAt":1390569372977,"vid":196197,"canonical-vid":196197,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMNDQPVIatRzvwwbjxH5kPMb1qbP15Ou8uQsf0vFoGvU8YsEHjMU1m4-i_ECZ87srGV2BYWxBOVgxaO6sxbU44Yfbi0CFqn9bsfQ3mveVPcBt0nHnKpPxTaJI5NY86TP2leU_xI","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMNDQPVIatRzvwwbjxH5kPMb1qbP15Ou8uQsf0vFoGvU8YsEHjMU1m4-i_ECZ87srGV2BYWxBOVgxaO6sxbU44Yfbi0CFqn9bsfQ3mveVPcBt0nHnKpPxTaJI5NY86TP2leU_xI/","properties":{"firstname":{"value":"Kathy"},"lastmodifieddate":{"value":"1414183318779"},"company":{"value":""},"lastname":{"value":"Oliverio"}},"form-submissions":[],"identity-profiles":[{"vid":196197,"saved-at-timestamp":1390569372895,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"kathyoliverio@thomasthomasllp.com","timestamp":1390568679200},{"type":"LEAD_GUID","value":"ca657c02-4179-48ef-b4f8-3b8d88cc3650","timestamp":1390569372889}]}],"merge-audits":[]},{"addedAt":1390569373032,"vid":196198,"canonical-vid":196198,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mP2qi6dkyTPirRHRrgpiaN7vEnohWR6AvX7pdcd7zeFDsc7ze_ATyjEGlS7_S4bz2aFE3N-9HqPIfZY4DZwtH1jmGf6uJHZ8EZgc2MgkK-k8b9tmigL4fDVrTo0aCxIAxDdW9Js","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mP2qi6dkyTPirRHRrgpiaN7vEnohWR6AvX7pdcd7zeFDsc7ze_ATyjEGlS7_S4bz2aFE3N-9HqPIfZY4DZwtH1jmGf6uJHZ8EZgc2MgkK-k8b9tmigL4fDVrTo0aCxIAxDdW9Js/","properties":{"firstname":{"value":""},"lastmodifieddate":{"value":"1414183521010"},"company":{"value":""},"lastname":{"value":"Mahoney"}},"form-submissions":[],"identity-profiles":[{"vid":196198,"saved-at-timestamp":1390569372942,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"aasdfsadf@ad.com","timestamp":1390568594597},{"type":"LEAD_GUID","value":"3db8e975-7032-4648-a74a-ca382fda59ec","timestamp":1390569372903}]}],"merge-audits":[]},{"addedAt":1390569373036,"vid":196199,"canonical-vid":196199,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mOPicMqToNnyGzSH1MaLq6MqstTs2xvbEnZluJChZ5WdY98SfW3jR4TtiOoPM2iK6czZaHUxQyNx387tvj57CPUZLFwCc8q1InUCQI16rR1sORpW7tqd4l6odMYOvouBhSS3vVs","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mOPicMqToNnyGzSH1MaLq6MqstTs2xvbEnZluJChZ5WdY98SfW3jR4TtiOoPM2iK6czZaHUxQyNx387tvj57CPUZLFwCc8q1InUCQI16rR1sORpW7tqd4l6odMYOvouBhSS3vVs/","properties":{"firstname":{"value":"Eleanor"},"lastmodifieddate":{"value":"1414183314891"},"company":{"value":""},"lastname":{"value":"Morgan"}},"form-submissions":[],"identity-profiles":[{"vid":196199,"saved-at-timestamp":1390569372911,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"emorgan@mdecorps.com","timestamp":1390568741710},{"type":"LEAD_GUID","value":"2225f650-6781-4e20-9269-adc783a00474","timestamp":1390569372905}]}],"merge-audits":[]}],"has-more":true,"vid-offset":196199}'
|
40
|
+
http_version:
|
41
|
+
recorded_at: Sat, 10 Jan 2015 14:43:57 GMT
|
42
|
+
- request:
|
43
|
+
method: get
|
44
|
+
uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=2&hapikey=demo
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: ''
|
48
|
+
headers: {}
|
49
|
+
response:
|
50
|
+
status:
|
51
|
+
code: 200
|
52
|
+
message: OK
|
53
|
+
headers:
|
54
|
+
Access-Control-Allow-Credentials:
|
55
|
+
- 'false'
|
56
|
+
Content-Type:
|
57
|
+
- application/json; charset=UTF-8
|
58
|
+
Date:
|
59
|
+
- Sat, 10 Jan 2015 14:48:13 GMT
|
60
|
+
Vary:
|
61
|
+
- Accept-Encoding
|
62
|
+
- Accept-Encoding
|
63
|
+
Content-Length:
|
64
|
+
- '2251'
|
65
|
+
Connection:
|
66
|
+
- keep-alive
|
67
|
+
body:
|
68
|
+
encoding: UTF-8
|
69
|
+
string: '{"contacts":[{"addedAt":1405347851360,"vid":154835,"canonical-vid":154835,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mNNP5CPNuARzP3V_eLb6X5QiAaD9sP46z4cxjkcjG6yAgjSJv-Lb7NRZ5WoaTitsgW6E7dyP0rKv9kaeZrp-QUwDCHCnaqxQMRkftVawLUbsBWYWR3KRvY4j_k6nsolW7g9emtA","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mNNP5CPNuARzP3V_eLb6X5QiAaD9sP46z4cxjkcjG6yAgjSJv-Lb7NRZ5WoaTitsgW6E7dyP0rKv9kaeZrp-QUwDCHCnaqxQMRkftVawLUbsBWYWR3KRvY4j_k6nsolW7g9emtA/","properties":{"firstname":{"value":"HubSpot"},"lastmodifieddate":{"value":"1414183315068"},"lastname":{"value":"Test"}},"form-submissions":[{"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9","timestamp":1405347851180,"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b","portal-id":62515,"page-url":"http://demo.hubapi.com/your-stunning-headline-30","page-title":"Your
|
70
|
+
stunning headline!","page-id":"324527","title":"My New Form","meta-data":[]}],"identity-profiles":[{"vid":154835,"saved-at-timestamp":1405347851237,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"test@hubspot.com","timestamp":1405347851180},{"type":"LEAD_GUID","value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc","timestamp":1405347851237}]}],"merge-audits":[]},{"addedAt":1390569372731,"vid":196181,"canonical-vid":196181,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMnsfCFq7T0ImjA7qC3a4aw1jLrgryLYG-9ceZmNOsKPeNhCmUDFaS7-6H0ylqLafb9Ejjrt1XXdxZO9S8CT1BltoouGc4Af4MdmKdT7YmGZmYxGTlPbEC9d9UlPWa-6fYBhkJX","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMnsfCFq7T0ImjA7qC3a4aw1jLrgryLYG-9ceZmNOsKPeNhCmUDFaS7-6H0ylqLafb9Ejjrt1XXdxZO9S8CT1BltoouGc4Af4MdmKdT7YmGZmYxGTlPbEC9d9UlPWa-6fYBhkJX/","properties":{"firstname":{"value":"Charles"},"lastmodifieddate":{"value":"1414183318111"},"company":{"value":""},"lastname":{"value":"Gowland"}},"form-submissions":[],"identity-profiles":[{"vid":196181,"saved-at-timestamp":1390569372649,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"clg@gburnette.com","timestamp":1390568711002},{"type":"LEAD_GUID","value":"dca0d8a2-fa9c-4ca6-b5ef-c1bfb4a0bed4","timestamp":1390569372636}]}],"merge-audits":[]}],"has-more":true,"vid-offset":196181}'
|
71
|
+
http_version:
|
72
|
+
recorded_at: Sat, 10 Jan 2015 14:48:14 GMT
|
73
|
+
- request:
|
74
|
+
method: get
|
75
|
+
uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=1&hapikey=demo&offset=1
|
76
|
+
body:
|
77
|
+
encoding: US-ASCII
|
78
|
+
string: ''
|
79
|
+
headers: {}
|
80
|
+
response:
|
81
|
+
status:
|
82
|
+
code: 200
|
83
|
+
message: OK
|
84
|
+
headers:
|
85
|
+
Access-Control-Allow-Credentials:
|
86
|
+
- 'false'
|
87
|
+
Content-Type:
|
88
|
+
- application/json; charset=UTF-8
|
89
|
+
Date:
|
90
|
+
- Sat, 10 Jan 2015 14:48:59 GMT
|
91
|
+
Vary:
|
92
|
+
- Accept-Encoding
|
93
|
+
- Accept-Encoding
|
94
|
+
Content-Length:
|
95
|
+
- '1290'
|
96
|
+
Connection:
|
97
|
+
- keep-alive
|
98
|
+
body:
|
99
|
+
encoding: UTF-8
|
100
|
+
string: '{"contacts":[{"addedAt":1405347851360,"vid":154835,"canonical-vid":154835,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mNPg6nJUsLAeVfcohVGJ7EIXndQo1ZwqiPhXvPd1RSWNJ96MONN7kfiXm2psXPZNmFv_VbtTfT7SIbmlrLzPDP2ugwm2p8si22r9QBWwk3Z6-Z9M27-v-uV4Duv15TduSXLmny_","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mNPg6nJUsLAeVfcohVGJ7EIXndQo1ZwqiPhXvPd1RSWNJ96MONN7kfiXm2psXPZNmFv_VbtTfT7SIbmlrLzPDP2ugwm2p8si22r9QBWwk3Z6-Z9M27-v-uV4Duv15TduSXLmny_/","properties":{"firstname":{"value":"HubSpot"},"lastmodifieddate":{"value":"1414183315068"},"lastname":{"value":"Test"}},"form-submissions":[{"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9","timestamp":1405347851180,"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b","portal-id":62515,"page-url":"http://demo.hubapi.com/your-stunning-headline-30","page-title":"Your
|
101
|
+
stunning headline!","page-id":"324527","title":"My New Form","meta-data":[]}],"identity-profiles":[{"vid":154835,"saved-at-timestamp":1405347851237,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"test@hubspot.com","timestamp":1405347851180},{"type":"LEAD_GUID","value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc","timestamp":1405347851237}]}],"merge-audits":[]}],"has-more":true,"vid-offset":154835}'
|
102
|
+
http_version:
|
103
|
+
recorded_at: Sat, 10 Jan 2015 14:48:59 GMT
|
104
|
+
- request:
|
105
|
+
method: get
|
106
|
+
uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=1&hapikey=demo&vid-offset=1
|
107
|
+
body:
|
108
|
+
encoding: US-ASCII
|
109
|
+
string: ''
|
110
|
+
headers: {}
|
111
|
+
response:
|
112
|
+
status:
|
113
|
+
code: 200
|
114
|
+
message: OK
|
115
|
+
headers:
|
116
|
+
Access-Control-Allow-Credentials:
|
117
|
+
- 'false'
|
118
|
+
Content-Type:
|
119
|
+
- application/json; charset=UTF-8
|
120
|
+
Date:
|
121
|
+
- Sat, 10 Jan 2015 14:51:46 GMT
|
122
|
+
Vary:
|
123
|
+
- Accept-Encoding
|
124
|
+
- Accept-Encoding
|
125
|
+
Content-Length:
|
126
|
+
- '1290'
|
127
|
+
Connection:
|
128
|
+
- keep-alive
|
129
|
+
body:
|
130
|
+
encoding: UTF-8
|
131
|
+
string: '{"contacts":[{"addedAt":1405347851360,"vid":154835,"canonical-vid":154835,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mPQrmiM4qpLqHAh4NfijScX9yV9kcg8nhFto816A7beCVuH0H94ZQxd2c4aBR6fRAWPpJ8YBE1T0Pzl0-MW72UUP3ykEV32k0luQWeneu0HfNRhz8mtWvSLCzNYOWk-4ZQg2liS","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mPQrmiM4qpLqHAh4NfijScX9yV9kcg8nhFto816A7beCVuH0H94ZQxd2c4aBR6fRAWPpJ8YBE1T0Pzl0-MW72UUP3ykEV32k0luQWeneu0HfNRhz8mtWvSLCzNYOWk-4ZQg2liS/","properties":{"firstname":{"value":"HubSpot"},"lastmodifieddate":{"value":"1414183315068"},"lastname":{"value":"Test"}},"form-submissions":[{"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9","timestamp":1405347851180,"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b","portal-id":62515,"page-url":"http://demo.hubapi.com/your-stunning-headline-30","page-title":"Your
|
132
|
+
stunning headline!","page-id":"324527","title":"My New Form","meta-data":[]}],"identity-profiles":[{"vid":154835,"saved-at-timestamp":1405347851237,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"test@hubspot.com","timestamp":1405347851180},{"type":"LEAD_GUID","value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc","timestamp":1405347851237}]}],"merge-audits":[]}],"has-more":true,"vid-offset":154835}'
|
133
|
+
http_version:
|
134
|
+
recorded_at: Sat, 10 Jan 2015 14:51:46 GMT
|
135
|
+
- request:
|
136
|
+
method: get
|
137
|
+
uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=1&hapikey=demo
|
138
|
+
body:
|
139
|
+
encoding: US-ASCII
|
140
|
+
string: ''
|
141
|
+
headers: {}
|
142
|
+
response:
|
143
|
+
status:
|
144
|
+
code: 200
|
145
|
+
message: OK
|
146
|
+
headers:
|
147
|
+
Access-Control-Allow-Credentials:
|
148
|
+
- 'false'
|
149
|
+
Content-Type:
|
150
|
+
- application/json; charset=UTF-8
|
151
|
+
Date:
|
152
|
+
- Sat, 10 Jan 2015 14:54:01 GMT
|
153
|
+
Vary:
|
154
|
+
- Accept-Encoding
|
155
|
+
- Accept-Encoding
|
156
|
+
Content-Length:
|
157
|
+
- '1290'
|
158
|
+
Connection:
|
159
|
+
- keep-alive
|
160
|
+
body:
|
161
|
+
encoding: UTF-8
|
162
|
+
string: '{"contacts":[{"addedAt":1405347851360,"vid":154835,"canonical-vid":154835,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mOnjZKtFCNfP3lhRh-kWUmduMMaRd_h9AprbJXZRDmuBjvcTJXXRjyLNx7n6svmqwjtljbjR8TpI3BCxNUZMYebNSNBp_sPRrjC3seb3E3qkJoVn3FGn2ftEIA8a8fpE5NNE5lF","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mOnjZKtFCNfP3lhRh-kWUmduMMaRd_h9AprbJXZRDmuBjvcTJXXRjyLNx7n6svmqwjtljbjR8TpI3BCxNUZMYebNSNBp_sPRrjC3seb3E3qkJoVn3FGn2ftEIA8a8fpE5NNE5lF/","properties":{"firstname":{"value":"HubSpot"},"lastmodifieddate":{"value":"1414183315068"},"lastname":{"value":"Test"}},"form-submissions":[{"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9","timestamp":1405347851180,"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b","portal-id":62515,"page-url":"http://demo.hubapi.com/your-stunning-headline-30","page-title":"Your
|
163
|
+
stunning headline!","page-id":"324527","title":"My New Form","meta-data":[]}],"identity-profiles":[{"vid":154835,"saved-at-timestamp":1405347851237,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"test@hubspot.com","timestamp":1405347851180},{"type":"LEAD_GUID","value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc","timestamp":1405347851237}]}],"merge-audits":[]}],"has-more":true,"vid-offset":154835}'
|
164
|
+
http_version:
|
165
|
+
recorded_at: Sat, 10 Jan 2015 14:54:01 GMT
|
166
|
+
- request:
|
167
|
+
method: get
|
168
|
+
uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=1&hapikey=demo&vid-offset=154835
|
169
|
+
body:
|
170
|
+
encoding: US-ASCII
|
171
|
+
string: ''
|
172
|
+
headers: {}
|
173
|
+
response:
|
174
|
+
status:
|
175
|
+
code: 200
|
176
|
+
message: OK
|
177
|
+
headers:
|
178
|
+
Access-Control-Allow-Credentials:
|
179
|
+
- 'false'
|
180
|
+
Content-Type:
|
181
|
+
- application/json; charset=UTF-8
|
182
|
+
Date:
|
183
|
+
- Sat, 10 Jan 2015 14:54:02 GMT
|
184
|
+
Vary:
|
185
|
+
- Accept-Encoding
|
186
|
+
- Accept-Encoding
|
187
|
+
Content-Length:
|
188
|
+
- '1290'
|
189
|
+
Connection:
|
190
|
+
- keep-alive
|
191
|
+
body:
|
192
|
+
encoding: UTF-8
|
193
|
+
string: '{"contacts":[{"addedAt":1405347851360,"vid":154835,"canonical-vid":154835,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mPygkRdWWe9QgapoAJglcWOb82_8QH3Oj7oYh0oOqcym7ACl_72ttwUSp95OcFoL3l5IJxsZPEOQ7rFBut6OEqAezXyRWf5DuhdKUH6Pe_fHRKLgGrM0COPGde9u0BrSGaZo491","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mPygkRdWWe9QgapoAJglcWOb82_8QH3Oj7oYh0oOqcym7ACl_72ttwUSp95OcFoL3l5IJxsZPEOQ7rFBut6OEqAezXyRWf5DuhdKUH6Pe_fHRKLgGrM0COPGde9u0BrSGaZo491/","properties":{"firstname":{"value":"HubSpot"},"lastmodifieddate":{"value":"1414183315068"},"lastname":{"value":"Test"}},"form-submissions":[{"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9","timestamp":1405347851180,"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b","portal-id":62515,"page-url":"http://demo.hubapi.com/your-stunning-headline-30","page-title":"Your
|
194
|
+
stunning headline!","page-id":"324527","title":"My New Form","meta-data":[]}],"identity-profiles":[{"vid":154835,"saved-at-timestamp":1405347851237,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"test@hubspot.com","timestamp":1405347851180},{"type":"LEAD_GUID","value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc","timestamp":1405347851237}]}],"merge-audits":[]}],"has-more":true,"vid-offset":154835}'
|
195
|
+
http_version:
|
196
|
+
recorded_at: Sat, 10 Jan 2015 14:54:02 GMT
|
197
|
+
- request:
|
198
|
+
method: get
|
199
|
+
uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=1&hapikey=demo
|
200
|
+
body:
|
201
|
+
encoding: US-ASCII
|
202
|
+
string: ''
|
203
|
+
headers: {}
|
204
|
+
response:
|
205
|
+
status:
|
206
|
+
code: 200
|
207
|
+
message: OK
|
208
|
+
headers:
|
209
|
+
Access-Control-Allow-Credentials:
|
210
|
+
- 'false'
|
211
|
+
Content-Type:
|
212
|
+
- application/json; charset=UTF-8
|
213
|
+
Date:
|
214
|
+
- Sat, 10 Jan 2015 14:55:34 GMT
|
215
|
+
Vary:
|
216
|
+
- Accept-Encoding
|
217
|
+
- Accept-Encoding
|
218
|
+
Content-Length:
|
219
|
+
- '1290'
|
220
|
+
Connection:
|
221
|
+
- keep-alive
|
222
|
+
body:
|
223
|
+
encoding: UTF-8
|
224
|
+
string: '{"contacts":[{"addedAt":1405347851360,"vid":154835,"canonical-vid":154835,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMMGT9lJCB6A21Lgqyly5DfNcW3u-ldo7UnhCE9dg0eyzWt7g-JAMrxxoM_IRCiQVojiunlgOBQYIezEVSRCKi3Zq4rAHnzenFg0Yn3N-1stJ-zVZsKszUZV6UK-algZOU4YPPy","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMMGT9lJCB6A21Lgqyly5DfNcW3u-ldo7UnhCE9dg0eyzWt7g-JAMrxxoM_IRCiQVojiunlgOBQYIezEVSRCKi3Zq4rAHnzenFg0Yn3N-1stJ-zVZsKszUZV6UK-algZOU4YPPy/","properties":{"firstname":{"value":"HubSpot"},"lastmodifieddate":{"value":"1414183315068"},"lastname":{"value":"Test"}},"form-submissions":[{"conversion-id":"b18f9fd8-b8d3-49e5-898a-ac301fac93e9","timestamp":1405347851180,"form-id":"b844ad5e-32bd-41e1-b0e6-ed990c5f3d1b","portal-id":62515,"page-url":"http://demo.hubapi.com/your-stunning-headline-30","page-title":"Your
|
225
|
+
stunning headline!","page-id":"324527","title":"My New Form","meta-data":[]}],"identity-profiles":[{"vid":154835,"saved-at-timestamp":1405347851237,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"test@hubspot.com","timestamp":1405347851180},{"type":"LEAD_GUID","value":"c8f20860-d3d6-4b57-b092-86a07cebdcbc","timestamp":1405347851237}]}],"merge-audits":[]}],"has-more":true,"vid-offset":154835}'
|
226
|
+
http_version:
|
227
|
+
recorded_at: Sat, 10 Jan 2015 14:55:34 GMT
|
228
|
+
- request:
|
229
|
+
method: get
|
230
|
+
uri: https://api.hubapi.com/contacts/v1/lists/all/contacts/all?count=1&hapikey=demo&vidOffset=154835
|
231
|
+
body:
|
232
|
+
encoding: US-ASCII
|
233
|
+
string: ''
|
234
|
+
headers: {}
|
235
|
+
response:
|
236
|
+
status:
|
237
|
+
code: 200
|
238
|
+
message: OK
|
239
|
+
headers:
|
240
|
+
Access-Control-Allow-Credentials:
|
241
|
+
- 'false'
|
242
|
+
Content-Type:
|
243
|
+
- application/json; charset=UTF-8
|
244
|
+
Date:
|
245
|
+
- Sat, 10 Jan 2015 14:58:11 GMT
|
246
|
+
Vary:
|
247
|
+
- Accept-Encoding
|
248
|
+
- Accept-Encoding
|
249
|
+
Content-Length:
|
250
|
+
- '1011'
|
251
|
+
Connection:
|
252
|
+
- keep-alive
|
253
|
+
body:
|
254
|
+
encoding: UTF-8
|
255
|
+
string: '{"contacts":[{"addedAt":1390569372731,"vid":196181,"canonical-vid":196181,"merged-vids":[],"portal-id":62515,"is-contact":true,"profile-token":"AO_T-mMN_5UTisMlYNPPYlhtxjNSaNd6gmtkpeCjXH_qREthy25LLaY4OOsA7cdXTLqM5mrxcU0jFZ33ym4cUvjNRbYi_h8h80esdoyxw_w0-tfzqFwPgT8t8S03dBASBcxR68M4q52G","profile-url":"https://app.hubspot.com/contacts/62515/lists/public/contact/_AO_T-mMN_5UTisMlYNPPYlhtxjNSaNd6gmtkpeCjXH_qREthy25LLaY4OOsA7cdXTLqM5mrxcU0jFZ33ym4cUvjNRbYi_h8h80esdoyxw_w0-tfzqFwPgT8t8S03dBASBcxR68M4q52G/","properties":{"firstname":{"value":"Charles"},"lastmodifieddate":{"value":"1414183318111"},"company":{"value":""},"lastname":{"value":"Gowland"}},"form-submissions":[],"identity-profiles":[{"vid":196181,"saved-at-timestamp":1390569372649,"deleted-changed-timestamp":0,"identities":[{"type":"EMAIL","value":"clg@gburnette.com","timestamp":1390568711002},{"type":"LEAD_GUID","value":"dca0d8a2-fa9c-4ca6-b5ef-c1bfb4a0bed4","timestamp":1390569372636}]}],"merge-audits":[]}],"has-more":true,"vid-offset":196181}'
|
256
|
+
http_version:
|
257
|
+
recorded_at: Sat, 10 Jan 2015 14:58:11 GMT
|
258
|
+
recorded_with: VCR 2.4.0
|
@@ -99,6 +99,45 @@ describe Hubspot::Contact do
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
+
|
103
|
+
describe '.all' do
|
104
|
+
cassette 'find_all_contacts'
|
105
|
+
|
106
|
+
it 'must get the contacts list' do
|
107
|
+
contacts = Hubspot::Contact.all
|
108
|
+
|
109
|
+
expect(contacts.size).to eql 20 # defautl page size
|
110
|
+
|
111
|
+
first = contacts.first
|
112
|
+
last = contacts.last
|
113
|
+
|
114
|
+
expect(first.vid).to eql 154835
|
115
|
+
expect(first['firstname']).to eql 'HubSpot'
|
116
|
+
expect(first['lastname']).to eql 'Test'
|
117
|
+
|
118
|
+
expect(last).to be_a Hubspot::Contact
|
119
|
+
expect(last.vid).to eql 196199
|
120
|
+
expect(last['firstname']).to eql 'Eleanor'
|
121
|
+
expect(last['lastname']).to eql 'Morgan'
|
122
|
+
end
|
123
|
+
|
124
|
+
it 'must filter only 2 contacts' do
|
125
|
+
contacts = Hubspot::Contact.all(count: 2)
|
126
|
+
expect(contacts.size).to eql 2
|
127
|
+
end
|
128
|
+
|
129
|
+
it 'it must offset the contacts' do
|
130
|
+
single_list = Hubspot::Contact.all(count: 1)
|
131
|
+
expect(single_list.size).to eql 1
|
132
|
+
first = single_list.first
|
133
|
+
|
134
|
+
second = Hubspot::Contact.all(count: 1, 'vidOffset': first.vid).first
|
135
|
+
expect(second.vid).to eql 196181
|
136
|
+
expect(second['firstname']).to eql 'Charles'
|
137
|
+
expect(second['lastname']).to eql 'Gowland'
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
102
141
|
describe "#update!" do
|
103
142
|
cassette "contact_update"
|
104
143
|
let(:contact){ Hubspot::Contact.new(example_contact_hash) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hubspot-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew DiMichele
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -237,6 +237,7 @@ files:
|
|
237
237
|
- spec/fixtures/vcr_cassettes/deal_example.yml
|
238
238
|
- spec/fixtures/vcr_cassettes/deal_find.yml
|
239
239
|
- spec/fixtures/vcr_cassettes/destroy_deal.yml
|
240
|
+
- spec/fixtures/vcr_cassettes/find_all_contacts.yml
|
240
241
|
- spec/fixtures/vcr_cassettes/find_all_recent_updated_deals.yml
|
241
242
|
- spec/fixtures/vcr_cassettes/form_post.yml
|
242
243
|
- spec/fixtures/vcr_cassettes/one_month_blog_posts_filter_state.yml
|