nationbuilder-rb 1.3.4 → 1.3.5

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.
@@ -2,17 +2,17 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://organizeralexandreschmitt.nationbuilder.com/api/v1/sites/organizeralexandreschmitt/pages/basic_pages?access_token=53920a524356034a065515a37650df2bd295971975d5742b9daa50eb8c7404d5
5
+ uri: https://organizeralexandreschmitt.nationbuilder.com/api/v1/sites/organizeralexandreschmitt/pages/basic_pages?access_token=3695ca30a6e74401115ec2b68767b53112c32b5bedc3c1f34e72c9749419b2de&limit=11
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - HTTPClient/1.0 (2.4.0, ruby 2.1.0 (2013-12-25))
11
+ - HTTPClient/1.0 (2.4.0, ruby 2.1.6 (2015-04-13))
12
12
  Accept:
13
13
  - application/json
14
14
  Date:
15
- - Thu, 05 Feb 2015 05:47:06 GMT
15
+ - Sat, 15 Aug 2015 04:55:44 GMT
16
16
  Content-Type:
17
17
  - application/json
18
18
  response:
@@ -23,7 +23,7 @@ http_interactions:
23
23
  Server:
24
24
  - cloudflare-nginx
25
25
  Date:
26
- - Thu, 05 Feb 2015 05:47:07 GMT
26
+ - Sat, 15 Aug 2015 04:55:44 GMT
27
27
  Content-Type:
28
28
  - application/json
29
29
  Transfer-Encoding:
@@ -31,18 +31,18 @@ http_interactions:
31
31
  Connection:
32
32
  - keep-alive
33
33
  Set-Cookie:
34
- - __cfduid=d6fa870afdc82ad0a40132d9031a98e571423115226; expires=Fri, 05-Feb-16
35
- 05:47:06 GMT; path=/; domain=.nationbuilder.com; HttpOnly
34
+ - __cfduid=d436e5bbcd2561efc7c53accefbc5a83e1439614544; expires=Sun, 14-Aug-16
35
+ 04:55:44 GMT; path=/; domain=.nationbuilder.com; HttpOnly
36
36
  Cache-Control:
37
37
  - max-age=0, private, must-revalidate
38
38
  Etag:
39
- - W/"c83de0b418cef0e295f7a6b0d92a5e1e"
39
+ - W/"bbba1d8270e4aabeaca84e4c25444072"
40
40
  Nation-Ratelimit-Limit:
41
- - '125000'
41
+ - "-1"
42
42
  Nation-Ratelimit-Remaining:
43
- - '124964'
43
+ - '0'
44
44
  Nation-Ratelimit-Reset:
45
- - '1423180800'
45
+ - '1439683200'
46
46
  Status:
47
47
  - 200 OK
48
48
  Vary:
@@ -58,45 +58,46 @@ http_interactions:
58
58
  X-Ratelimit-Remaining:
59
59
  - '99'
60
60
  X-Ratelimit-Reset:
61
- - '1423115237'
61
+ - '1439614554'
62
62
  X-Request-Id:
63
- - d35195a1279519791b9d185625318a63
63
+ - 1f473121e35e2da6f73711b7af4c0013
64
64
  X-Runtime:
65
- - '0.417770'
65
+ - '0.151177'
66
66
  X-Ua-Compatible:
67
67
  - IE=Edge,chrome=1
68
68
  Via:
69
69
  - 1.1 nationbuilder.com
70
70
  Cf-Ray:
71
- - 1b3ccfb72a0f07e5-LAX
71
+ - 21624f161149282e-SJC
72
72
  body:
73
73
  encoding: UTF-8
74
- string: "{\"results\":[{\"slug\":\"crowdfund-it\",\"path\":\"/crowdfund-it\",\"status\":\"published\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"crowdfund-it\",\"headline\":\"Crowdfund
75
- your nation\",\"title\":\"crowdfund-it - Matt's General Store\",\"excerpt\":null,\"author_id\":null,\"published_at\":\"2015-01-26T17:18:37-08:00\",\"external_id\":null,\"tags\":[],\"id\":83,\"content\":\"\\u003Cp\\u003ERetrieve
74
+ string: '{"results":[{"slug":"voting_information_tool","path":"/voting_information_tool","status":"unlisted","site_slug":"organizeralexandreschmitt","name":"Voting
75
+ Information Tool","headline":"Voting Information Tool","title":"Voting Information
76
+ Tool - Matt''s General Store","excerpt":null,"author_id":79278,"published_at":null,"external_id":null,"tags":[],"id":85,"content":null},{"slug":"crowdfund-it","path":"/crowdfund-it","status":"published","site_slug":"organizeralexandreschmitt","name":"crowdfund-it","headline":"Crowdfund
77
+ your nation","title":"crowdfund-it - Matt''s General Store","excerpt":null,"author_id":null,"published_at":"2015-01-27T01:18:37Z","external_id":null,"tags":[],"id":83,"content":"\u003Cp\u003ERetrieve
76
78
  your embed code with instructions from Bring It Local and add it to the template
77
- of this page\\u003C/p\\u003E\"},{\"slug\":\"basic_page_test_ox_i2du_g2yuljz1pfu9gjen_w\",\"path\":\"/basic_page_test_ox_i2du_g2yuljz1pfu9gjen_w\",\"status\":\"published\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"basic_page_test\",\"headline\":\"basic_page_test\",\"title\":\"basic_page_test
78
- - Matt's General Store\",\"excerpt\":null,\"author_id\":null,\"published_at\":\"2014-12-17T18:53:06-08:00\",\"external_id\":null,\"tags\":[],\"id\":82,\"content\":null},{\"slug\":\"basic_page_test\",\"path\":\"/basic_page_test\",\"status\":\"unlisted\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"basic_page_test\",\"headline\":\"basic_page_test\",\"title\":\"basic_page_test
79
- - Matt's General Store\",\"excerpt\":null,\"author_id\":79278,\"published_at\":null,\"external_id\":null,\"tags\":[],\"id\":81,\"content\":null},{\"slug\":\"blog_parent\",\"path\":\"/blog_parent\",\"status\":\"archived\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"Blog
80
- parent\",\"headline\":\"Blog parent\",\"title\":\"Blog parent - Matt's General
81
- Store\",\"excerpt\":null,\"author_id\":79278,\"published_at\":null,\"external_id\":null,\"tags\":[],\"id\":48,\"content\":null},{\"slug\":\"catwin\",\"path\":\"/catwin\",\"status\":\"archived\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"Mrow
82
- - thanks\",\"headline\":\"Mrow - thanks\",\"title\":\"Mrow - thanks - Matt's
83
- General Store\",\"excerpt\":\"\",\"author_id\":null,\"published_at\":null,\"external_id\":null,\"tags\":[],\"id\":46,\"content\":\"\\u003Cp\\u003EYou
79
+ of this page\u003C/p\u003E"},{"slug":"basic_page_test_ox_i2du_g2yuljz1pfu9gjen_w","path":"/basic_page_test_ox_i2du_g2yuljz1pfu9gjen_w","status":"published","site_slug":"organizeralexandreschmitt","name":"basic_page_test","headline":"basic_page_test","title":"basic_page_test
80
+ - Matt''s General Store","excerpt":null,"author_id":null,"published_at":"2014-12-18T02:53:06Z","external_id":null,"tags":[],"id":82,"content":null},{"slug":"basic_page_test","path":"/basic_page_test","status":"unlisted","site_slug":"organizeralexandreschmitt","name":"basic_page_test","headline":"basic_page_test","title":"basic_page_test
81
+ - Matt''s General Store","excerpt":null,"author_id":79278,"published_at":null,"external_id":null,"tags":[],"id":81,"content":null},{"slug":"blog_parent","path":"/blog_parent","status":"archived","site_slug":"organizeralexandreschmitt","name":"Blog
82
+ parent","headline":"Blog parent","title":"Blog parent - Matt''s General Store","excerpt":null,"author_id":79278,"published_at":null,"external_id":null,"tags":[],"id":48,"content":null},{"slug":"catwin","path":"/catwin","status":"archived","site_slug":"organizeralexandreschmitt","name":"Mrow
83
+ - thanks","headline":"Mrow - thanks","title":"Mrow - thanks - Matt''s General
84
+ Store","excerpt":"","author_id":null,"published_at":null,"external_id":null,"tags":[],"id":46,"content":"\u003Cp\u003EYou
84
85
  are awesome. Now why not treat yoself by looking at this allergy-free screen
85
- cat who is aiding productivity:\\u003C/p\\u003E\\r\\n\\u003Cp\\u003Ehttps://www.youtube.com/watch?v=TmAjceTCW2A\\u003C/p\\u003E\"},{\"slug\":\"data_download\",\"path\":\"/data_download\",\"status\":\"published\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"Data
86
- download\",\"headline\":\"Data download\",\"title\":\"Data download - Matt's
87
- General Store\",\"excerpt\":null,\"author_id\":1,\"published_at\":\"2014-11-06T14:31:00-08:00\",\"external_id\":null,\"tags\":[],\"id\":44,\"content\":null},{\"slug\":\"123contactform\",\"path\":\"/123contactform\",\"status\":\"published\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"123contactform\",\"headline\":\"123contactform\",\"title\":\"123contactform
88
- - Matt's General Store\",\"excerpt\":null,\"author_id\":1,\"published_at\":\"2014-11-05T14:59:00-08:00\",\"external_id\":null,\"tags\":[],\"id\":42,\"content\":null},{\"slug\":\"liquid_email_example\",\"path\":\"/liquid_email_example\",\"status\":\"published\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"Liquid
89
- Use in Emails\",\"headline\":\"Liquid Use in Emails\",\"title\":\"Liquid Use
90
- in Emails - Matt's General Store\",\"excerpt\":\"Use of liquid is limited
91
- to just a few variables in an email blast.\",\"author_id\":103485,\"published_at\":\"2014-08-20T14:15:57-07:00\",\"external_id\":null,\"tags\":[],\"id\":30,\"content\":\"\"},{\"slug\":\"liquid_examples\",\"path\":\"/liquid_examples\",\"status\":\"published\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"Liquid
92
- examples\",\"headline\":\"Liquid examples\",\"title\":\"Liquid examples -
93
- Matt's General Store\",\"excerpt\":\"\",\"author_id\":79278,\"published_at\":\"2014-08-20T15:07:07-07:00\",\"external_id\":null,\"tags\":[],\"id\":29,\"content\":\"\\u003Cp\\u003EHere
94
- is the content you'll see as just anyone viewing the page - but when you log
95
- in, magic happens. If you're a member, more magic happens, all thanks to liquid!\\u003C/p\\u003E\\r\\n\\u003Cp\\u003E\\u003Cimg
96
- style=\\\"display: block; margin-left: auto; margin-right: auto;\\\" src=\\\"http://img1.wikia.nocookie.net/__cb20140608053037/glee/images/e/e9/I-Love-Magic.gif\\\"
97
- alt=\\\"\\\"\\u003E\\u003C/p\\u003E\"},{\"slug\":\"cheat_sheet\",\"path\":\"/cheat_sheet\",\"status\":\"published\",\"site_slug\":\"organizeralexandreschmitt\",\"name\":\"Cheat
98
- sheet\",\"headline\":\"Cheat sheet\",\"title\":\"Cheat sheet - Matt's General
99
- Store\",\"excerpt\":null,\"author_id\":79278,\"published_at\":\"2014-08-20T13:50:44-07:00\",\"external_id\":null,\"tags\":[],\"id\":28,\"content\":null}],\"next\":\"/api/v1/sites/organizeralexandreschmitt/pages/basic_pages?__nonce=gh4DglmUc03W_xwnC6EwxA\\u0026__token=AFPhNOVaSRpKLUv0II78TWKVwtBB-89EnzIT0SRGLkOV\",\"prev\":null}"
86
+ cat who is aiding productivity:\u003C/p\u003E\r\n\u003Cp\u003Ehttps://www.youtube.com/watch?v=TmAjceTCW2A\u003C/p\u003E"},{"slug":"data_download","path":"/data_download","status":"published","site_slug":"organizeralexandreschmitt","name":"Data
87
+ download","headline":"Data download","title":"Data download - Matt''s General
88
+ Store","excerpt":null,"author_id":1,"published_at":"2014-11-06T22:31:00Z","external_id":null,"tags":[],"id":44,"content":null},{"slug":"123contactform","path":"/123contactform","status":"published","site_slug":"organizeralexandreschmitt","name":"123contactform","headline":"123contactform","title":"123contactform
89
+ - Matt''s General Store","excerpt":null,"author_id":1,"published_at":"2014-11-05T22:59:00Z","external_id":null,"tags":[],"id":42,"content":null},{"slug":"liquid_email_example","path":"/liquid_email_example","status":"published","site_slug":"organizeralexandreschmitt","name":"Liquid
90
+ Use in Emails","headline":"Liquid Use in Emails","title":"Liquid Use in Emails
91
+ - Matt''s General Store","excerpt":"Use of liquid is limited to just a few
92
+ variables in an email blast.","author_id":103485,"published_at":"2014-08-20T21:15:57Z","external_id":null,"tags":[],"id":30,"content":""},{"slug":"liquid_examples","path":"/liquid_examples","status":"published","site_slug":"organizeralexandreschmitt","name":"Liquid
93
+ examples","headline":"Liquid examples","title":"Liquid examples - Matt''s
94
+ General Store","excerpt":"","author_id":79278,"published_at":"2014-08-20T22:07:07Z","external_id":null,"tags":[],"id":29,"content":"\u003Cp\u003EHere
95
+ is the content you''ll see as just anyone viewing the page - but when you
96
+ log in, magic happens. If you''re a member, more magic happens, all thanks
97
+ to liquid!\u003C/p\u003E\r\n\u003Cp\u003E\u003Cimg style=\"display: block;
98
+ margin-left: auto; margin-right: auto;\" src=\"http://img1.wikia.nocookie.net/__cb20140608053037/glee/images/e/e9/I-Love-Magic.gif\"
99
+ alt=\"\"\u003E\u003C/p\u003E"},{"slug":"cheat_sheet","path":"/cheat_sheet","status":"published","site_slug":"organizeralexandreschmitt","name":"Cheat
100
+ sheet","headline":"Cheat sheet","title":"Cheat sheet - Matt''s General Store","excerpt":null,"author_id":79278,"published_at":"2014-08-20T20:50:44Z","external_id":null,"tags":[],"id":28,"content":null}],"next":"/api/v1/sites/organizeralexandreschmitt/pages/basic_pages?__nonce=q_3tIGyS1skKRIUGIyeWUQ\u0026__token=AFBYnsk4zCcWNFJaOc1xN74YBbWJHwkF8DGqVtygMILA\u0026limit=11","prev":null}'
100
101
  http_version:
101
- recorded_at: Thu, 05 Feb 2015 05:47:07 GMT
102
- recorded_with: VCR 2.9.2
102
+ recorded_at: Sat, 15 Aug 2015 04:55:45 GMT
103
+ recorded_with: VCR 2.9.3
@@ -2,28 +2,28 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://organizeralexandreschmitt.nationbuilder.com/api/v1/people?access_token=53920a524356034a065515a37650df2bd295971975d5742b9daa50eb8c7404d5
5
+ uri: https://organizeralexandreschmitt.nationbuilder.com/api/v1/people?access_token=3695ca30a6e74401115ec2b68767b53112c32b5bedc3c1f34e72c9749419b2de
6
6
  body:
7
7
  encoding: UTF-8
8
- string: "{\"person\":{\"email\":\"bob@example.com\",\"last_name\":\"Smith\",\"first_name\":\"Bob\"},\"access_token\":\"53920a524356034a065515a37650df2bd295971975d5742b9daa50eb8c7404d5\"}"
8
+ string: '{"person":{"email":"bob@example.com","last_name":"Smith","first_name":"Bob"},"access_token":"3695ca30a6e74401115ec2b68767b53112c32b5bedc3c1f34e72c9749419b2de"}'
9
9
  headers:
10
10
  User-Agent:
11
- - HTTPClient/1.0 (2.4.0, ruby 2.1.0 (2013-12-25))
11
+ - HTTPClient/1.0 (2.4.0, ruby 2.1.6 (2015-04-13))
12
12
  Accept:
13
13
  - application/json
14
14
  Date:
15
- - Thu, 05 Feb 2015 05:54:32 GMT
15
+ - Sat, 15 Aug 2015 04:45:31 GMT
16
16
  Content-Type:
17
17
  - application/json
18
18
  response:
19
19
  status:
20
- code: 200
21
- message: Conflict
20
+ code: 201
21
+ message: Created
22
22
  headers:
23
23
  Server:
24
24
  - cloudflare-nginx
25
25
  Date:
26
- - Thu, 05 Feb 2015 05:54:33 GMT
26
+ - Sat, 15 Aug 2015 04:45:32 GMT
27
27
  Content-Type:
28
28
  - application/json
29
29
  Transfer-Encoding:
@@ -31,18 +31,20 @@ http_interactions:
31
31
  Connection:
32
32
  - keep-alive
33
33
  Set-Cookie:
34
- - __cfduid=d948b90f065447c7e715937cb22519f821423115672; expires=Fri, 05-Feb-16
35
- 05:54:32 GMT; path=/; domain=.nationbuilder.com; HttpOnly
34
+ - __cfduid=d68d0b187d1375c605cfabfa3a27dc91e1439613931; expires=Sun, 14-Aug-16
35
+ 04:45:31 GMT; path=/; domain=.nationbuilder.com; HttpOnly
36
36
  Cache-Control:
37
- - no-cache
37
+ - max-age=0, private, must-revalidate
38
+ Etag:
39
+ - W/"1c966e26141d616a9c74cec1c54e52a3"
38
40
  Nation-Ratelimit-Limit:
39
- - '125000'
41
+ - "-1"
40
42
  Nation-Ratelimit-Remaining:
41
- - '124958'
43
+ - '0'
42
44
  Nation-Ratelimit-Reset:
43
- - '1423180800'
45
+ - '1439683200'
44
46
  Status:
45
- - 409 Conflict
47
+ - 201 Created
46
48
  Vary:
47
49
  - Accept-Encoding
48
50
  X-Powered-By:
@@ -54,28 +56,23 @@ http_interactions:
54
56
  X-Ratelimit-Limit:
55
57
  - 10s
56
58
  X-Ratelimit-Remaining:
57
- - '99'
59
+ - '98'
58
60
  X-Ratelimit-Reset:
59
- - '1423115683'
61
+ - '1439613941'
60
62
  X-Request-Id:
61
- - 9be6fa50e0f42b4c780fc054bd79721f
63
+ - 6076fae83f30569d8e9f2da5baa10015
62
64
  X-Runtime:
63
- - '0.102341'
65
+ - '0.556356'
64
66
  X-Ua-Compatible:
65
67
  - IE=Edge,chrome=1
66
68
  Via:
67
69
  - 1.1 nationbuilder.com
68
70
  Cf-Ray:
69
- - 1b3cda9bf5c21431-LAX
71
+ - 21624020ce492858-SJC
70
72
  body:
71
73
  encoding: UTF-8
72
- string: "{\"person\":{\"birthdate\":null,\"city_district\":\"14\",\"civicrm_id\":null,\"county_district\":\"1\",\"county_file_id\":null,\"created_at\":\"2014-04-24T10:27:34-07:00\",\"datatrust_id\":null,\"do_not_call\":false,\"do_not_contact\":false,\"dw_id\":null,\"email\":\"bob@example.com\",\"email_opt_in\":true,\"employer\":\"\",\"external_id\":null,\"federal_district\":\"34\",\"fire_district\":null,\"first_name\":\"Bob\",\"has_facebook\":false,\"id\":79264,\"is_twitter_follower\":false,\"is_volunteer\":false,\"judicial_district\":null,\"labour_region\":null,\"last_name\":\"Smith\",\"linkedin_id\":null,\"mobile\":\"\",\"mobile_opt_in\":true,\"nbec_guid\":null,\"ngp_id\":null,\"note\":null,\"occupation\":\"\",\"party\":\"\",\"pf_strat_id\":null,\"phone\":\"213-555-1234\",\"precinct_id\":null,\"primary_address\":{\"address1\":\"1234
73
- S Hill St\",\"address2\":\"\",\"address3\":\"\",\"city\":\"Los Angeles\",\"state\":\"CA\",\"country_code\":\"US\",\"zip\":\"90015\",\"lat\":\"34.0383462\",\"lng\":\"-118.2614889\"},\"profile_image_url_ssl\":\"https://d3n8a8pro7vhmx.cloudfront.net/assets/icons/buddy.png\",\"recruiter_id\":null,\"rnc_id\":null,\"rnc_regid\":null,\"salesforce_id\":null,\"school_district\":\"19647330000000\",\"school_sub_district\":\"2\",\"sex\":\"\",\"signup_type\":0,\"state_file_id\":null,\"state_lower_district\":\"53\",\"state_upper_district\":\"30\",\"support_level\":null,\"supranational_district\":null,\"tags\":[\"website_volunteer\",\"Youth_Outreach\",\"sample
74
- import\"],\"twitter_id\":null,\"twitter_name\":null,\"updated_at\":\"2015-02-04T21:54:25-08:00\",\"van_id\":null,\"village_district\":null,\"work_phone_number\":\"\",\"active_customer_expires_at\":null,\"active_customer_started_at\":null,\"author\":null,\"author_id\":null,\"auto_import_id\":null,\"availability\":\"M-F\",\"banned_at\":null,\"billing_address\":{\"address1\":\"1234
75
- S Hill St\",\"address2\":\"\",\"address3\":\"\",\"city\":\"Los Angeles\",\"state\":\"CA\",\"country_code\":\"US\",\"zip\":\"90015\",\"lat\":\"34.0383462\",\"lng\":\"-118.2614889\"},\"bio\":null,\"call_status_id\":null,\"call_status_name\":null,\"capital_amount_in_cents\":16700,\"children_count\":0,\"church\":\"\",\"city_sub_district\":\"DOWNTOWN
76
- LOS ANGELES\",\"closed_invoices_amount_in_cents\":null,\"closed_invoices_count\":null,\"contact_status_id\":null,\"contact_status_name\":null,\"could_vote_status\":null,\"demo\":\"\",\"donations_amount_in_cents\":0,\"donations_amount_this_cycle_in_cents\":0,\"donations_count\":0,\"donations_count_this_cycle\":0,\"donations_pledged_amount_in_cents\":0,\"donations_raised_amount_in_cents\":0,\"donations_raised_amount_this_cycle_in_cents\":0,\"donations_raised_count\":0,\"donations_raised_count_this_cycle\":0,\"donations_to_raise_amount_in_cents\":0,\"email1\":\"bob@example.com\",\"email1_is_bad\":false,\"email2\":null,\"email2_is_bad\":false,\"email3\":null,\"email3_is_bad\":false,\"email4\":null,\"email4_is_bad\":false,\"ethnicity\":\"\",\"facebook_address\":null,\"facebook_profile_url\":null,\"facebook_updated_at\":null,\"facebook_username\":null,\"fax_number\":\"\",\"federal_donotcall\":false,\"first_donated_at\":null,\"first_fundraised_at\":null,\"first_invoice_at\":null,\"first_prospect_at\":null,\"first_recruited_at\":null,\"first_supporter_at\":\"2014-04-24T10:27:34-07:00\",\"first_volunteer_at\":\"2014-09-02T13:10:28-07:00\",\"full_name\":\"Bob
77
- Smith\",\"home_address\":null,\"import_id\":null,\"inferred_party\":\"\",\"inferred_support_level\":null,\"invoice_payments_amount_in_cents\":null,\"invoice_payments_referred_amount_in_cents\":null,\"invoices_amount_in_cents\":null,\"invoices_count\":null,\"is_deceased\":false,\"is_donor\":false,\"is_fundraiser\":false,\"is_ignore_donation_limits\":false,\"is_leaderboardable\":true,\"is_mobile_bad\":false,\"is_possible_duplicate\":false,\"is_profile_private\":false,\"is_profile_searchable\":true,\"is_prospect\":false,\"is_supporter\":true,\"is_survey_question_private\":false,\"language\":\"\",\"last_call_id\":null,\"last_contacted_at\":null,\"last_contacted_by\":null,\"last_donated_at\":null,\"last_fundraised_at\":null,\"last_invoice_at\":null,\"last_rule_violation_at\":null,\"legal_name\":null,\"locale\":\"\",\"mailing_address\":null,\"marital_status\":\"\",\"media_market_name\":null,\"meetup_address\":null,\"membership_expires_at\":null,\"membership_level_name\":null,\"membership_started_at\":null,\"middle_name\":null,\"mobile_normalized\":null,\"nbec_precinct_code\":null,\"note_updated_at\":null,\"outstanding_invoices_amount_in_cents\":null,\"outstanding_invoices_count\":null,\"overdue_invoices_count\":null,\"page_slug\":\"ticket_page\",\"parent\":null,\"parent_id\":null,\"party_member\":false,\"phone_normalized\":\"2135551234\",\"phone_time\":\"\",\"precinct_code\":null,\"precinct_name\":null,\"prefix\":null,\"previous_party\":\"\",\"primary_email_id\":1,\"priority_level\":null,\"priority_level_changed_at\":null,\"profile_content\":null,\"profile_content_html\":null,\"profile_headline\":null,\"received_capital_amount_in_cents\":17700,\"recruiter\":null,\"recruits_count\":0,\"registered_address\":null,\"registered_at\":null,\"religion\":\"\",\"rule_violations_count\":0,\"spent_capital_amount_in_cents\":1000,\"submitted_address\":\"\",\"subnations\":[],\"suffix\":null,\"support_level_changed_at\":null,\"support_probability_score\":null,\"turnout_probability_score\":null,\"twitter_address\":null,\"twitter_description\":null,\"twitter_followers_count\":null,\"twitter_friends_count\":null,\"twitter_location\":null,\"twitter_login\":null,\"twitter_updated_at\":null,\"twitter_website\":null,\"unsubscribed_at\":null,\"user_submitted_address\":{\"address1\":\"488
78
- S Hill St\",\"address2\":null,\"address3\":null,\"city\":\"Los Angeles\",\"state\":\"CA\",\"country_code\":\"US\",\"zip\":\"90013\",\"lat\":\"34.0490467\",\"lng\":\"-118.2515224\"},\"username\":\"randomeveguy\",\"warnings_count\":0,\"website\":null,\"work_address\":null,\"bag_preference\":null,\"do_you_drive_a_fork_lift\":null,\"have_you_ever_been_contacted_by_a_union_representative_before_\":null,\"have_you_been_involved_in_an_election_campaign_before_\":null,\"sub_branch\":null,\"sams_custom_field\":null,\"mrow\":null,\"received_an_email\":null,\"brett_petition_mc\":null,\"headshot_url\":null,\"university\":null,\"membership_number\":null},\"precinct\":null}"
79
- http_version:
80
- recorded_at: Thu, 05 Feb 2015 05:54:33 GMT
81
- recorded_with: VCR 2.9.2
74
+ string: '{"person":{"birthdate":null,"city_district":null,"civicrm_id":null,"county_district":null,"county_file_id":null,"created_at":"2015-08-15T04:45:31Z","datatrust_id":null,"do_not_call":false,"do_not_contact":false,"dw_id":null,"email":"bob@example.com","email_opt_in":true,"employer":null,"external_id":null,"federal_district":null,"fire_district":null,"first_name":"Bob","has_facebook":false,"id":278772,"is_twitter_follower":false,"is_volunteer":false,"judicial_district":null,"labour_region":null,"last_name":"Smith","linkedin_id":null,"mobile":null,"mobile_opt_in":true,"nbec_guid":null,"ngp_id":null,"note":null,"occupation":null,"party":null,"pf_strat_id":null,"phone":null,"precinct_id":null,"primary_address":null,"profile_image_url_ssl":"https://d3n8a8pro7vhmx.cloudfront.net/assets/icons/buddy.png","recruiter_id":null,"rnc_id":null,"rnc_regid":null,"salesforce_id":null,"school_district":null,"school_sub_district":null,"sex":null,"signup_type":0,"state_file_id":null,"state_lower_district":null,"state_upper_district":null,"support_level":null,"supranational_district":null,"tags":[],"twitter_id":null,"twitter_name":null,"updated_at":"2015-08-15T04:45:31Z","van_id":null,"village_district":null,"work_phone_number":null,"active_customer_expires_at":null,"active_customer_started_at":null,"author":null,"author_id":null,"auto_import_id":null,"availability":null,"ballots":[],"banned_at":null,"billing_address":null,"bio":null,"call_status_id":null,"call_status_name":null,"capital_amount_in_cents":0,"children_count":0,"church":null,"city_sub_district":null,"closed_invoices_amount_in_cents":null,"closed_invoices_count":null,"contact_status_id":null,"contact_status_name":null,"could_vote_status":null,"demo":null,"donations_amount_in_cents":0,"donations_amount_this_cycle_in_cents":0,"donations_count":0,"donations_count_this_cycle":0,"donations_pledged_amount_in_cents":0,"donations_raised_amount_in_cents":0,"donations_raised_amount_this_cycle_in_cents":0,"donations_raised_count":0,"donations_raised_count_this_cycle":0,"donations_to_raise_amount_in_cents":0,"email1":"bob@example.com","email1_is_bad":false,"email2":null,"email2_is_bad":false,"email3":null,"email3_is_bad":false,"email4":null,"email4_is_bad":false,"ethnicity":null,"facebook_address":null,"facebook_profile_url":null,"facebook_updated_at":null,"facebook_username":null,"fax_number":null,"federal_donotcall":false,"first_donated_at":null,"first_fundraised_at":null,"first_invoice_at":null,"first_prospect_at":null,"first_recruited_at":null,"first_supporter_at":"2015-08-15T04:45:31Z","first_volunteer_at":null,"full_name":"Bob
75
+ Smith","home_address":null,"import_id":null,"inferred_party":null,"inferred_support_level":null,"invoice_payments_amount_in_cents":null,"invoice_payments_referred_amount_in_cents":null,"invoices_amount_in_cents":null,"invoices_count":null,"is_absentee_voter":null,"is_active_voter":null,"is_deceased":false,"is_donor":false,"is_dropped_from_file":null,"is_early_voter":null,"is_fundraiser":false,"is_ignore_donation_limits":false,"is_leaderboardable":true,"is_mobile_bad":false,"is_permanent_absentee_voter":null,"is_possible_duplicate":false,"is_profile_private":false,"is_profile_searchable":true,"is_prospect":false,"is_supporter":true,"is_survey_question_private":false,"language":null,"last_call_id":null,"last_contacted_at":null,"last_contacted_by":null,"last_donated_at":null,"last_fundraised_at":null,"last_invoice_at":null,"last_rule_violation_at":null,"legal_name":null,"locale":null,"mailing_address":null,"marital_status":null,"media_market_name":null,"meetup_address":null,"membership_expires_at":null,"membership_level_name":null,"membership_started_at":null,"middle_name":null,"mobile_normalized":null,"nbec_precinct_code":null,"nbec_precinct":null,"note_updated_at":null,"outstanding_invoices_amount_in_cents":null,"outstanding_invoices_count":null,"overdue_invoices_count":null,"page_slug":null,"parent":null,"parent_id":null,"party_member":false,"phone_normalized":null,"phone_time":null,"precinct_code":null,"precinct_name":null,"prefix":null,"previous_party":null,"primary_email_id":1,"priority_level":null,"priority_level_changed_at":null,"profile_content":null,"profile_content_html":null,"profile_headline":null,"received_capital_amount_in_cents":0,"recruiter":null,"recruits_count":0,"registered_address":null,"registered_at":null,"religion":null,"rule_violations_count":0,"spent_capital_amount_in_cents":0,"submitted_address":null,"subnations":[],"suffix":null,"support_level_changed_at":null,"support_probability_score":null,"township":null,"turnout_probability_score":null,"twitter_address":null,"twitter_description":null,"twitter_followers_count":null,"twitter_friends_count":null,"twitter_location":null,"twitter_login":null,"twitter_updated_at":null,"twitter_website":null,"unsubscribed_at":null,"user_submitted_address":null,"username":null,"voter_updated_at":null,"ward":null,"warnings_count":0,"website":null,"work_address":null,"bag_preference":null,"do_you_drive_a_fork_lift":null,"have_you_been_involved_in_an_election_campaign_before_":null,"sub_branch":null,"sams_custom_field":null,"mrow":null,"headshot_url":null,"university":null,"membership_number":null,"number":null,"check":null,"industry_name":null,"yes":null,"next_election":null,"filing_window":null},"precinct":null}'
76
+ http_version:
77
+ recorded_at: Sat, 15 Aug 2015 04:45:32 GMT
78
+ recorded_with: VCR 2.9.3
@@ -4,8 +4,9 @@ describe NationBuilder::Client do
4
4
 
5
5
  let(:client) do
6
6
  NationBuilder::Client.new('organizeralexandreschmitt',
7
- '53920a524356034a065515a37650df2bd295971975d5742b9daa50eb8c7404d5',
8
- retries: 1)
7
+ '3695ca30a6e74401115ec2b68767b53112c32b5bedc3c1f34e72c9749419b2de',
8
+ retries: 1
9
+ )
9
10
  end
10
11
 
11
12
  describe '#endpoints' do
@@ -48,7 +49,7 @@ describe NationBuilder::Client do
48
49
 
49
50
  it 'should handle a parametered GET' do
50
51
  VCR.use_cassette('parametered_get') do
51
- response = client.call(:basic_pages, :index, site_slug: 'organizeralexandreschmitt')
52
+ response = client.call(:basic_pages, :index, site_slug: 'organizeralexandreschmitt', limit: 11)
52
53
  response['results'].each do |result|
53
54
  expect(result['site_slug']).to eq('organizeralexandreschmitt')
54
55
  end
@@ -110,7 +111,7 @@ describe NationBuilder::Client do
110
111
 
111
112
  it 'should handle a DELETE' do
112
113
  params = {
113
- id: 21234
114
+ id: 278772
114
115
  }
115
116
 
116
117
  response = VCR.use_cassette('delete') do
@@ -4,11 +4,11 @@ describe NationBuilder::Paginator do
4
4
 
5
5
  let(:client) do
6
6
  NationBuilder::Client.new('organizeralexandreschmitt',
7
- '53920a524356034a065515a37650df2bd295971975d5742b9daa50eb8c7404d5')
7
+ '3695ca30a6e74401115ec2b68767b53112c32b5bedc3c1f34e72c9749419b2de')
8
8
  end
9
9
  let(:response) do
10
10
  VCR.use_cassette('parametered_get') do
11
- client.call(:basic_pages, :index, site_slug: 'organizeralexandreschmitt')
11
+ client.call(:basic_pages, :index, site_slug: 'organizeralexandreschmitt', limit: 11)
12
12
  end
13
13
  end
14
14
 
@@ -40,5 +40,20 @@ describe NationBuilder::Paginator do
40
40
  it 'should return nil if no prev page' do
41
41
  expect(@page1.prev).to be_nil
42
42
  end
43
+
44
+ it 'should accept limit params and return results accordingly' do
45
+ VCR.use_cassette('paginated_get_page2_with_limit') do
46
+ expect(@page1.body['results'].count).to eq(11)
47
+ page2 = @page1.next(limit: 5)
48
+ expect(page2.body['results'].count).to eq(5)
49
+ end
50
+ end
51
+
52
+ it 'defaults to original limit when none is given' do
53
+ VCR.use_cassette('paginated_get_page2') do
54
+ page2 = @page1.next
55
+ expect(page2.body['results'].count).to eq(11)
56
+ end
57
+ end
43
58
  end
44
59
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nationbuilder-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Huie
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-08-07 00:00:00.000000000 Z
12
+ date: 2015-08-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httpclient
@@ -159,10 +159,10 @@ files:
159
159
  - nationbuilder-rb.gemspec
160
160
  - spec/fixtures/delete.yml
161
161
  - spec/fixtures/paginated_get_page2.yml
162
+ - spec/fixtures/paginated_get_page2_with_limit.yml
162
163
  - spec/fixtures/paginated_get_page3.yml
163
164
  - spec/fixtures/parametered_get.yml
164
165
  - spec/fixtures/parametered_post.yml
165
- - spec/fixtures/parametered_post_with_fire_webhooks_false.yml
166
166
  - spec/nationbuilder_client_spec.rb
167
167
  - spec/nationbuilder_paginator_spec.rb
168
168
  - spec/spec_helper.rb
@@ -1,81 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://organizeralexandreschmitt.nationbuilder.com/api/v1/people?access_token=53920a524356034a065515a37650df2bd295971975d5742b9daa50eb8c7404d5&fire_webhooks=false
6
- body:
7
- encoding: UTF-8
8
- string: "{\"person\":{\"email\":\"bob@example.com\",\"last_name\":\"Smith\",\"first_name\":\"Bob\"},\"access_token\":\"53921a524356034a065515a37650df2bd295971975d5742b9daa50eb8c7404d5\",\"fire_webhooks\":\"false\"}"
9
- headers:
10
- User-Agent:
11
- - HTTPClient/1.0 (2.4.0, ruby 2.1.0 (2013-12-25))
12
- Accept:
13
- - application/json
14
- Date:
15
- - Thu, 05 Feb 2015 05:54:32 GMT
16
- Content-Type:
17
- - application/json
18
- response:
19
- status:
20
- code: 200
21
- message: Conflict
22
- headers:
23
- Server:
24
- - cloudflare-nginx
25
- Date:
26
- - Thu, 05 Feb 2015 05:54:33 GMT
27
- Content-Type:
28
- - application/json
29
- Transfer-Encoding:
30
- - chunked
31
- Connection:
32
- - keep-alive
33
- Set-Cookie:
34
- - __cfduid=d948b90f065447c7e715937cb22519f821423115672; expires=Fri, 05-Feb-16
35
- 05:54:32 GMT; path=/; domain=.nationbuilder.com; HttpOnly
36
- Cache-Control:
37
- - no-cache
38
- Nation-Ratelimit-Limit:
39
- - '125000'
40
- Nation-Ratelimit-Remaining:
41
- - '124958'
42
- Nation-Ratelimit-Reset:
43
- - '1423180800'
44
- Status:
45
- - 409 Conflict
46
- Vary:
47
- - Accept-Encoding
48
- X-Powered-By:
49
- - Phusion Passenger 4.0.53
50
- X-Pulse-Approved:
51
- - 'true'
52
- X-Rack-Cache:
53
- - invalidate, pass
54
- X-Ratelimit-Limit:
55
- - 10s
56
- X-Ratelimit-Remaining:
57
- - '99'
58
- X-Ratelimit-Reset:
59
- - '1423115683'
60
- X-Request-Id:
61
- - 9be6fa50e0f42b4c780fc054bd79721f
62
- X-Runtime:
63
- - '0.102341'
64
- X-Ua-Compatible:
65
- - IE=Edge,chrome=1
66
- Via:
67
- - 1.1 nationbuilder.com
68
- Cf-Ray:
69
- - 1b3cda9bf5c21431-LAX
70
- body:
71
- encoding: UTF-8
72
- string: "{\"person\":{\"birthdate\":null,\"city_district\":\"14\",\"civicrm_id\":null,\"county_district\":\"1\",\"county_file_id\":null,\"created_at\":\"2014-04-24T10:27:34-07:00\",\"datatrust_id\":null,\"do_not_call\":false,\"do_not_contact\":false,\"dw_id\":null,\"email\":\"bob@example.com\",\"email_opt_in\":true,\"employer\":\"\",\"external_id\":null,\"federal_district\":\"34\",\"fire_district\":null,\"first_name\":\"Bob\",\"has_facebook\":false,\"id\":79264,\"is_twitter_follower\":false,\"is_volunteer\":false,\"judicial_district\":null,\"labour_region\":null,\"last_name\":\"Smith\",\"linkedin_id\":null,\"mobile\":\"\",\"mobile_opt_in\":true,\"nbec_guid\":null,\"ngp_id\":null,\"note\":null,\"occupation\":\"\",\"party\":\"\",\"pf_strat_id\":null,\"phone\":\"213-555-1234\",\"precinct_id\":null,\"primary_address\":{\"address1\":\"1234
73
- S Hill St\",\"address2\":\"\",\"address3\":\"\",\"city\":\"Los Angeles\",\"state\":\"CA\",\"country_code\":\"US\",\"zip\":\"90015\",\"lat\":\"34.0383462\",\"lng\":\"-118.2614889\"},\"profile_image_url_ssl\":\"https://d3n8a8pro7vhmx.cloudfront.net/assets/icons/buddy.png\",\"recruiter_id\":null,\"rnc_id\":null,\"rnc_regid\":null,\"salesforce_id\":null,\"school_district\":\"19647330000000\",\"school_sub_district\":\"2\",\"sex\":\"\",\"signup_type\":0,\"state_file_id\":null,\"state_lower_district\":\"53\",\"state_upper_district\":\"30\",\"support_level\":null,\"supranational_district\":null,\"tags\":[\"website_volunteer\",\"Youth_Outreach\",\"sample
74
- import\"],\"twitter_id\":null,\"twitter_name\":null,\"updated_at\":\"2015-02-04T21:54:25-08:00\",\"van_id\":null,\"village_district\":null,\"work_phone_number\":\"\",\"active_customer_expires_at\":null,\"active_customer_started_at\":null,\"author\":null,\"author_id\":null,\"auto_import_id\":null,\"availability\":\"M-F\",\"banned_at\":null,\"billing_address\":{\"address1\":\"1234
75
- S Hill St\",\"address2\":\"\",\"address3\":\"\",\"city\":\"Los Angeles\",\"state\":\"CA\",\"country_code\":\"US\",\"zip\":\"90015\",\"lat\":\"34.0383462\",\"lng\":\"-118.2614889\"},\"bio\":null,\"call_status_id\":null,\"call_status_name\":null,\"capital_amount_in_cents\":16700,\"children_count\":0,\"church\":\"\",\"city_sub_district\":\"DOWNTOWN
76
- LOS ANGELES\",\"closed_invoices_amount_in_cents\":null,\"closed_invoices_count\":null,\"contact_status_id\":null,\"contact_status_name\":null,\"could_vote_status\":null,\"demo\":\"\",\"donations_amount_in_cents\":0,\"donations_amount_this_cycle_in_cents\":0,\"donations_count\":0,\"donations_count_this_cycle\":0,\"donations_pledged_amount_in_cents\":0,\"donations_raised_amount_in_cents\":0,\"donations_raised_amount_this_cycle_in_cents\":0,\"donations_raised_count\":0,\"donations_raised_count_this_cycle\":0,\"donations_to_raise_amount_in_cents\":0,\"email1\":\"bob@example.com\",\"email1_is_bad\":false,\"email2\":null,\"email2_is_bad\":false,\"email3\":null,\"email3_is_bad\":false,\"email4\":null,\"email4_is_bad\":false,\"ethnicity\":\"\",\"facebook_address\":null,\"facebook_profile_url\":null,\"facebook_updated_at\":null,\"facebook_username\":null,\"fax_number\":\"\",\"federal_donotcall\":false,\"first_donated_at\":null,\"first_fundraised_at\":null,\"first_invoice_at\":null,\"first_prospect_at\":null,\"first_recruited_at\":null,\"first_supporter_at\":\"2014-04-24T10:27:34-07:00\",\"first_volunteer_at\":\"2014-09-02T13:10:28-07:00\",\"full_name\":\"Bob
77
- Smith\",\"home_address\":null,\"import_id\":null,\"inferred_party\":\"\",\"inferred_support_level\":null,\"invoice_payments_amount_in_cents\":null,\"invoice_payments_referred_amount_in_cents\":null,\"invoices_amount_in_cents\":null,\"invoices_count\":null,\"is_deceased\":false,\"is_donor\":false,\"is_fundraiser\":false,\"is_ignore_donation_limits\":false,\"is_leaderboardable\":true,\"is_mobile_bad\":false,\"is_possible_duplicate\":false,\"is_profile_private\":false,\"is_profile_searchable\":true,\"is_prospect\":false,\"is_supporter\":true,\"is_survey_question_private\":false,\"language\":\"\",\"last_call_id\":null,\"last_contacted_at\":null,\"last_contacted_by\":null,\"last_donated_at\":null,\"last_fundraised_at\":null,\"last_invoice_at\":null,\"last_rule_violation_at\":null,\"legal_name\":null,\"locale\":\"\",\"mailing_address\":null,\"marital_status\":\"\",\"media_market_name\":null,\"meetup_address\":null,\"membership_expires_at\":null,\"membership_level_name\":null,\"membership_started_at\":null,\"middle_name\":null,\"mobile_normalized\":null,\"nbec_precinct_code\":null,\"note_updated_at\":null,\"outstanding_invoices_amount_in_cents\":null,\"outstanding_invoices_count\":null,\"overdue_invoices_count\":null,\"page_slug\":\"ticket_page\",\"parent\":null,\"parent_id\":null,\"party_member\":false,\"phone_normalized\":\"2135551234\",\"phone_time\":\"\",\"precinct_code\":null,\"precinct_name\":null,\"prefix\":null,\"previous_party\":\"\",\"primary_email_id\":1,\"priority_level\":null,\"priority_level_changed_at\":null,\"profile_content\":null,\"profile_content_html\":null,\"profile_headline\":null,\"received_capital_amount_in_cents\":17700,\"recruiter\":null,\"recruits_count\":0,\"registered_address\":null,\"registered_at\":null,\"religion\":\"\",\"rule_violations_count\":0,\"spent_capital_amount_in_cents\":1000,\"submitted_address\":\"\",\"subnations\":[],\"suffix\":null,\"support_level_changed_at\":null,\"support_probability_score\":null,\"turnout_probability_score\":null,\"twitter_address\":null,\"twitter_description\":null,\"twitter_followers_count\":null,\"twitter_friends_count\":null,\"twitter_location\":null,\"twitter_login\":null,\"twitter_updated_at\":null,\"twitter_website\":null,\"unsubscribed_at\":null,\"user_submitted_address\":{\"address1\":\"488
78
- S Hill St\",\"address2\":null,\"address3\":null,\"city\":\"Los Angeles\",\"state\":\"CA\",\"country_code\":\"US\",\"zip\":\"90013\",\"lat\":\"34.0490467\",\"lng\":\"-118.2515224\"},\"username\":\"randomeveguy\",\"warnings_count\":0,\"website\":null,\"work_address\":null,\"bag_preference\":null,\"do_you_drive_a_fork_lift\":null,\"have_you_ever_been_contacted_by_a_union_representative_before_\":null,\"have_you_been_involved_in_an_election_campaign_before_\":null,\"sub_branch\":null,\"sams_custom_field\":null,\"mrow\":null,\"received_an_email\":null,\"brett_petition_mc\":null,\"headshot_url\":null,\"university\":null,\"membership_number\":null},\"precinct\":null}"
79
- http_version:
80
- recorded_at: Thu, 05 Feb 2015 05:54:33 GMT
81
- recorded_with: VCR 2.9.2