Closed PaulVSmith closed 8 years ago
Hi, Paul.
It looks like custom fields can be supported by making the methods that read and write objects accept a type parameter, and turning container types into templates.
I have a couple of small changes I was planning to release soon (changelog excerpt below). I could look at supporting custom fields afterwards. (Pull requests are also welcome. :))
validation_errors
in Nation Builder remote exceptions.HttpWebRequest
, which now records all data sent to Nation Builder, and made it available in NationBuilderRemoteException
.Thank you for the reply Pavel
The custom fields would be very useful thanks.
My question was not about person creation. I just want to read all the fields for a person.
I am finding people using SearchPeople and that works well.
When I get one of those people and try to run ShowPerson, I get an error: {"ValueType 'System.Int32' cannot be null."}
Presumably some mandatory field does not have a value? Is ValueType a NB field?
Regards
Paul Smith
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Thursday, 17 December 2015 4:28 PM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
Hi, Paul.
As far as I understand your first question, yes, when an exception
occurs during person creation the person shouldn't be updated in Nation Builder. (For smaller problems, such as invalid combinations of country code and state / Zip code, Nation Builder seems to just ignore parts of the data you submit, and returns back what it accepts as the new person object.)
I did not have access to custom fields when developing this
library, so I have not included support for them.
It looks like custom fields can be supported by making the methods that read and write objects accept a type parameter, and turning container types into templates.
I have a couple of small changes I was planning to release soon (changelog excerpt below). I could look at supporting custom fields afterwards. (Pull requests are also welcome. :)) Changes since v. 1.2.0Improvements
· Added convenience methods for working with a person's e-mail IDs.
· Added deserialization of validation_errors in Nation Builder remote exceptions.
· Added a wrapper around HttpWebRequest, which now records all data sent to Nation Builder, and made it available in NationBuilderRemoteException.
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-165341680 .
Hi, Paul.
Happy New Year! Sorry, I was a bit busy around this beginning.
Would you be able to capture a JSON representation of the person that is causing an exception to be thrown when the person's record is read? That would help me debug which member is returned as null.
There are a couple of ways to do this. If you have a .NET application that you are using the 'NationBuilderAPI' library from, you could enable .NET Network Tracing to capture your application's network traffic. Here's a link to Network Tracing documentation: https://msdn.microsoft.com/en-us/library/ty48b824(v=vs.110).aspx
That produces a lot of output to look through, so you may want to reduce your application to the minimum amount of traffic required to reproduce the problem.
If you can record the ID of the person that causes the exception, you could get the Nation Builder JSON response by putting it in the form for the 'People' -> 'Show' method on the [https://apiexplorer.nationbuilder.com/nationbuilder](Nation Builder API Explorer) page. Or, you could use CURL from the command-line. The command would like something like this:
curl -H "Content-Type: application/json" -H "Accept: application/json" "https://your-nations-slug.nationbuilder.com/api/v1/people/2?access_token=<your-secret-api-access-token>"
You can redirect the result of curl
to a file by appending > filePath.json
to the command. You can include the HTTP headers in the output by adding the -sD -
switches to the curl
command.
Here's a list of what should be currently declared as non-nullable Person
int
fields:
Besides a Person
object, the response that ShowPerson
deserializes also contains a Precinct
object. The Precinct
object has the following non-nullable long
field:
I have trouble telling what fields can be nullable and what can't from the Nation Builder API documentation. A few times the documentation has, actually, not corresponded to the responses returned by the Nation Builder server, so I had to file bug reports. So, there has been a lot of trial-and-error in getting this library to work.
Thanks for the help.
Pav
Typical Microsoft error message – no useful info. “Something Happened”
Response Headers from the API explorer for person 69073
{ "server": "cloudflare-nginx", "date": "Wed, 13 Jan 2016 22:23:51 GMT", "content-type": "application/json", "transfer-encoding": "chunked", "connection": "close", "set-cookie": [ "__cfduid=dbe786e9bbaa83adde2f4eedb9b321a2c1452723831; expires=Thu, 12-Jan-17 22:23:51 GMT; path=/; domain=.nationbuilder.com; HttpOnly" ], "cache-control": "max-age=0, private, must-revalidate", "etag": "W/\"b041b30698db247b79ad2a2a94646f4b\"", "nation-ratelimit-limit": "185000", "nation-ratelimit-remaining": "184996", "nation-ratelimit-reset": "1452729600", "status": "200 OK", "vary": "Accept-Encoding", "x-powered-by": "Phusion Passenger 4.0.53", "x-pulse-approved": "true", "x-rack-cache": "miss", "x-ratelimit-limit": "10s", "x-ratelimit-remaining": "99", "x-ratelimit-reset": "1452723841", "x-request-id": "3d2801edff7e90f18b1c55c36bf81643", "x-runtime": "0.170201", "x-ua-compatible": "IE=Edge,chrome=1", "via": "1.1 nationbuilder.com", "cf-ray": "2644820c6ad623cc-IAD" }
Response Body, which has few fields filled in
·
Top of Form
{ "person": { "birthdate": null, "city_district": null, "civicrm_id": null, "county_district": null, "county_file_id": null, "created_at": "2016-01-14T02:15:09+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": null, "email_opt_in": true, "employer": null, "external_id": null, "federal_district": null, "fire_district": null, "first_name": "Steven", "has_facebook": true, "id": 69073, "is_twitter_follower": false, "is_volunteer": false, "judicial_district": null, "labour_region": null, "last_name": "Eeyee", "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://graph.facebook.com/v2.2/10151950080927854/picture?height=73&type=square&width=73 ", "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": "2016-01-14T02:15:09+11:00", "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": 1, "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": null, "donations_amount_this_cycle_in_cents": null, "donations_count": null, "donations_count_this_cycle": null, "donations_pledged_amount_in_cents": null, "donations_raised_amount_in_cents": null, "donations_raised_amount_this_cycle_in_cents": null, "donations_raised_count": null, "donations_raised_count_this_cycle": null, "donations_to_raise_amount_in_cents": null, "email1": null, "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": "http://www.facebook.com/10151950080927854", "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": "2016-01-14T02:15:09+11:00", "first_recruited_at": null, "first_supporter_at": null, "first_volunteer_at": null, "full_name": "Steven Eeyee", "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": true, "is_supporter": false, "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": null, "priority_level": null, "priority_level_changed_at": null, "profile_content": null, "profile_content_html": null, "profile_headline": null, "received_capital_amount_in_cents": 1, "recruiter": null, "recruits_count": 0, "registered_address": null, "registered_at": null, "religion": null, "rule_violations_count": 0, "signup_sources": [], "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, "campaign_centre": null, "circle_financial": null, "circle_volunteer": null, "do_not_ask_financial": null, "driver_licence_type": null, "driver_notes": null, "emergency_name": null, "emergency_relationship": null, "first_aid_qualified": null, "jobs_additional_notes": null, "job_advocacy_type": null, "job_advocacy_status": null, "job_arts_status": null, "job_arts_type": null, "job_av_type": null, "job_office_type": null, "tws_staff": null, "lead_source": null, "emergency_phone": null, "telemarketing_in_progress": null, "tws_member": null, "volunteer_status": null, "lead_source_detail": null, "job_catering": null, "job_doorknocking": null, "job_events": null, "job_handyman": null, "job_letterboxing": null, "job_nvda": null, "job_project_management": null, "job_research": null, "job_social_media": null, "job_stalls": null, "job_wilderness_trips": null, "job_writing": null, "vip_status": null, "job_phonebanking": null, "job_av_status": null, "job_office_status": null }, "precinct": null }
Bottom of Form
· GETMatch/people/match
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Wednesday, 13 January 2016 4:19 PM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
Hi, Paul.
Happy New Year! Sorry, I was a bit busy around this beginning.
Would you be able to capture a JSON representation of the person that is causing an exception to be thrown when the person's record is read? That would help me debug which member is returned as null.
There are a couple of ways to do this. If you have a .NET application that you are using the 'NationBuilderAPI' library from, you could enable .NET Network Tracing to capture your application's network traffic. Here's a link to Network Tracing documentation: https://msdn.microsoft.com/en-us/library/ty48b824(v=vs.110).aspx
That produces a lot of output to look through, so you may want to reduce your application to the minimum amount of traffic required to reproduce the problem.
If you can record the ID of the person that causes the exception, you could get the Nation Builder JSON response by putting it in the form for the 'People' -> 'Show' method on the https://apiexplorer.nationbuilder.com/nationbuilder <Nation%20Builder%20API%20Explorer> page. Or, you could use CURL from the command-line. The command would like something like this:
curl -H "Content-Type: application/json" -H "Accept: application/json"
"https://your-nations-slug.nationbuilder.com/api/v1/people/2?access_token=
You can redirect the result of curl to a file by appending > filePath.json to the command. You can include the HTTP headers in the output by adding the -sD - switches to the curl command.
Here's a list of what should be currently declared as non-nullable Person int fields: From Person:
· capital_amount_in_cents
· children_count
· donations_amount_in_cents
· donations_amount_this_cycle_in_cents
· donations_count_this_cycle
· donations_count
· donations_pledged_amount_in_cents
· donations_raised_amount_in_cents
· donations_raised_amount_this_cycle_in_cents
· donations_raised_count_this_cycle
· donations_raised_count
· donations_to_raise_amount_in_cents
· received_capital_amount_in_cents
· recruits_count
· rule_violations_count
· spent_capital_amount_in_cents
Besides a Person object the response that ShowPerson deserializes also contains a Precinct object. The Precinct object has the following non-nullable long field:
I have trouble telling what fields can be nullable and what can't from the Nation Builder API documentation. A few times the documentation has, actually, not corresponded to the responses returned by the Nation Builder server, so I had to file bug reports. So, there has been a lot of trial-and-error in getting this library to work. Thanks for the help.
Pav
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-171171202 .
Thanks, Paul.
Looks like all the 'donation_' int
fields received null values. I updated the Person
object to make them nullable.
Can you test if this solves the issues you are having?
Here is a way to test using the development version of this library before it's published to the NuGet repository:
NationBuilderAPI.sln
> in Visual Studio, and build the solution.NuGet-Signed.exe Pack NationBuilderAPI.1.2.1.nuspec -Symbols
for the appropriate <.nuspec
> file.It should now be using the development version of the library you built.
To stop using the development version, just remove the 'NationBuilderAPI' directory from 'Package Sources' and re-install the 'NationBuliderAPI' NuGet package.
Thanks,
Pav
Hi, Paul.
I had forgotten to include the step for building the NuGet package in my previous comment.
It may be easier to just uninstall the NuGet package, and reference the built 'NationBuliderAPI' solution from the project that uses the library.
Let me know, if you can verify this works for you,
Pav
The changes have fixed those thanks.
However like Robin Hood Daffy (see https://www.youtube.com/watch?v=0VzkRTXBG_g) I have hit the next tree:
WindowsApplication1
There was an error deserializing the object of type NationBuilderAPI.V1.PersonResponse. End element 'author' from namespace '' expected. Found element 'birthdate' from namespace ''.
OK
This appears only to be happening on some records, like:
Response BodySelect body https://apiexplorer.nationbuilder.com/nationbuilder
{ "person": { "birthdate": null, "city_district": "", "civicrm_id": null, "county_district": "", "county_file_id": "", "created_at": "2015-12-07T16:22:04+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": "paul.smith@wilderness.org.au", "email_opt_in": true, "employer": "The Wilderness Society", "external_id": "578656", "federal_district": "", "fire_district": "", "first_name": "Paul", "has_facebook": false, "id": 68251, "is_twitter_follower": false, "is_volunteer": false, "judicial_district": "", "labour_region": null, "last_name": "Smith", "linkedin_id": null, "mobile": "", "mobile_opt_in": true, "nbec_guid": null, "ngp_id": "", "note": "", "occupation": "Database Administrator", "party": "", "pf_strat_id": null, "phone": "03 6270 1708", "precinct_id": 38, "primary_address": { "address1": "132 Davey St", "address2": "", "address3": null, "city": "Hobart", "county": "", "state": "Tas", "country_code": "AU", "zip": "7000", "lat": "-42.890111", "lng": "147.323236", "fips": null }, "profile_image_url_ssl": "https://d3n8a8pro7vhmx.cloudfront.net/assets/icons/buddy.png", "recruiter_id": null, "rnc_id": null, "rnc_regid": "", "salesforce_id": null, "school_district": "", "school_sub_district": "", "sex": "M", "signup_type": 0, "state_file_id": "", "state_lower_district": "", "state_upper_district": "", "support_level": null, "supranational_district": null, "tags": [], "twitter_id": null, "twitter_name": null, "updated_at": "2016-01-18T01:05:14+11:00", "van_id": "", "village_district": "", "work_phone_number": "03 6270 1708", "active_customer_expires_at": null, "active_customer_started_at": null, "author": { "birthdate": null, "city_district": "Hobart", "civicrm_id": null, "county_district": null, "county_file_id": null, "created_at": "2015-10-16T16:56:02+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": "doug.oneil@wilderness.org.au", "email_opt_in": true, "employer": "The Wilderness Society", "external_id": "449113", "federal_district": "Denison", "fire_district": "", "first_name": "Douglas", "has_facebook": true, "id": 5, "is_twitter_follower": false, "is_volunteer": true, "judicial_district": "", "labour_region": null, "last_name": "O'Neil", "linkedin_id": null, "mobile": "0438 660 556", "mobile_opt_in": true, "nbec_guid": null, "ngp_id": null, "note": "Works next door, set up TWS fb, Sea Sheppard", "occupation": "IT", "party": "", "pf_strat_id": null, "phone": "03 6278 1653", "precinct_id": 38, "primary_address": { "address1": "22 Giblin St", "address2": null, "address3": null, "city": "Lenah Valley", "county": null, "state": "Tasmania", "country_code": "AU", "zip": "7008", "lat": null, "lng": null, "fips": null }, "profile_image_url_ssl": "https://graph.facebook.com/v2.2/648164661/picture?height=73&type=square&width=73", "recruiter_id": null, "rnc_id": null, "rnc_regid": null, "salesforce_id": "28221", "school_district": "61028", "school_sub_district": "6102810", "sex": "M", "signup_type": 0, "state_file_id": null, "state_lower_district": "Denison", "state_upper_district": null, "support_level": 1, "supranational_district": null, "tags": [ "tas_Wednesday_Lunch", "tas_tags_converted" ], "twitter_id": "176386961", "twitter_name": "Doug O'Neil", "updated_at": "2016-01-17T23:58:40+11:00", "van_id": null, "village_district": null, "work_phone_number": "03 6270 1791", "campaign_centre": "Tas", "circle_financial": "2 Supporter", "circle_volunteer": "3 Active supporter", "do_not_ask_financial": null, "driver_licence_type": "Car", "driver_notes": null, "emergency_name": null, "emergency_relationship": null, "first_aid_qualified": null, "jobs_additional_notes": null, "job_advocacy_type": null, "job_advocacy_status": "Interested", "job_arts_status": "Interested", "job_arts_type": "ALL", "job_av_type": "Event setup", "job_office_type": null, "tws_staff": "Current", "lead_source": null, "emergency_phone": null, "telemarketing_in_progress": null, "tws_member": "Dropped", "volunteer_status": "Active", "lead_source_detail": null, "job_catering": "Trained", "job_doorknocking": null, "job_events": null, "job_handyman": "Expert", "job_letterboxing": null, "job_nvda": "Skilled", "job_project_management": null, "job_research": null, "job_social_media": "Expert", "job_stalls": "Skilled", "job_wilderness_trips": null, "job_writing": "Skilled", "vip_status": null, "job_phonebanking": "Trained", "job_av_status": "Trained", "job_office_status": null }, "author_id": 5, "auto_import_id": null, "availability": "", "ballots": [], "banned_at": null, "billing_address": null, "bio": null, "call_status_id": null, "call_status_name": null, "capital_amount_in_cents": 1500, "children_count": 0, "church": "", "city_sub_district": "", "closed_invoices_amount_in_cents": null, "closed_invoices_count": null, "contact_status_id": null, "contact_status_name": null, "could_vote_status": -1, "demo": null, "donations_amount_in_cents": null, "donations_amount_this_cycle_in_cents": null, "donations_count": null, "donations_count_this_cycle": null, "donations_pledged_amount_in_cents": null, "donations_raised_amount_in_cents": null, "donations_raised_amount_this_cycle_in_cents": null, "donations_raised_count": null, "donations_raised_count_this_cycle": null, "donations_to_raise_amount_in_cents": null, "email1": "paul.smith@wilderness.org.au", "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": "2015-12-07T16:22:04+11:00", "first_volunteer_at": null, "full_name": "Paul Smith", "home_address": { "address1": "34 Clare St", "address2": null, "address3": null, "city": "New Town", "county": null, "state": "Tasmania", "country_code": "AU", "zip": "7008", "lat": null, "lng": null, "fips": 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_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": "", "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": "en", "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, "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": { "birthdate": "1960-10-27", "city_district": null, "civicrm_id": null, "county_district": null, "county_file_id": null, "created_at": "2015-11-03T12:25:47+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": "liz.johnstone@wilderness.org.au", "email_opt_in": true, "employer": "The Wilderness Society Tasmania", "external_id": "479917", "federal_district": "Denison", "fire_district": null, "first_name": "Liz", "has_facebook": false, "id": 268, "is_twitter_follower": false, "is_volunteer": false, "judicial_district": null, "labour_region": null, "last_name": "Johnstone", "linkedin_id": "WkkZLWbf_L", "mobile": "0448 678 897", "mobile_opt_in": true, "nbec_guid": null, "ngp_id": null, "note": null, "occupation": "Senior Campaigner - Hobart", "party": "", "pf_strat_id": null, "phone": "03 6234 6382", "precinct_id": 38, "primary_address": { "address1": "11 Union St", "address2": null, "address3": null, "city": "West Hobart", "county": null, "state": "Tasmania", "country_code": "AU", "zip": "7000", "lat": null, "lng": null, "fips": null }, "profile_image_url_ssl": "https://cloudinary-a.akamaihd.net/nationbuilder/image/twitter/w_73,h_73,c_fill,d_buddy1.png/341350789.jpg", "recruiter_id": null, "rnc_id": null, "rnc_regid": null, "salesforce_id": "22869", "school_district": "61033", "school_sub_district": "6103305", "sex": "F", "signup_type": 0, "state_file_id": null, "state_lower_district": "Denison", "state_upper_district": null, "support_level": null, "supranational_district": null, "tags": [ "tas_Wednesday_Lunch", "tas_volunteer_team", "tas_tags_converted" ], "twitter_id": "341350789", "twitter_name": "Liz Johnstone", "updated_at": "2016-01-17T23:58:49+11:00", "van_id": null, "village_district": null, "work_phone_number": "03 6281 1930", "campaign_centre": "Tas", "circle_financial": "2 Supporter", "circle_volunteer": "1 Community", "do_not_ask_financial": null, "driver_licence_type": null, "driver_notes": null, "emergency_name": null, "emergency_relationship": null, "first_aid_qualified": null, "jobs_additional_notes": null, "job_advocacy_type": null, "job_advocacy_status": "Interested", "job_arts_status": "Interested", "job_arts_type": null, "job_av_type": null, "job_office_type": null, "tws_staff": "Current", "lead_source": null, "emergency_phone": null, "telemarketing_in_progress": null, "tws_member": "Active", "volunteer_status": "Active", "lead_source_detail": null, "job_catering": null, "job_doorknocking": null, "job_events": null, "job_handyman": null, "job_letterboxing": null, "job_nvda": null, "job_project_management": null, "job_research": null, "job_social_media": null, "job_stalls": null, "job_wilderness_trips": null, "job_writing": null, "vip_status": null, "job_phonebanking": null, "job_av_status": null, "job_office_status": null }, "parent_id": 268, "party_member": false, "phone_normalized": "362701708", "phone_time": "", "precinct_code": "Hob", "precinct_name": "Hobart", "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": 1500, "recruiter": null, "recruits_count": 0, "registered_address": null, "registered_at": null, "religion": "", "rule_violations_count": 0, "signup_sources": [], "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": { "address1": "132 Davey St", "address2": "", "address3": null, "city": "Hobart", "county": "", "state": "Tas", "country_code": "AU", "zip": "7000", "lat": "-42.890111", "lng": "147.323236", "fips": null }, "campaign_centre": "Tas", "circle_financial": "5 Leader", "circle_volunteer": null, "do_not_ask_financial": false, "driver_licence_type": null, "driver_notes": "", "emergency_name": "", "emergency_relationship": "", "first_aid_qualified": null, "jobs_additional_notes": "", "job_advocacy_type": null, "job_advocacy_status": null, "job_arts_status": null, "job_arts_type": null, "job_av_type": null, "job_office_type": null, "tws_staff": "Current", "lead_source": null, "emergency_phone": "", "telemarketing_in_progress": false, "tws_member": null, "volunteer_status": null, "lead_source_detail": "", "job_catering": null, "job_doorknocking": null, "job_events": null, "job_handyman": null, "job_letterboxing": null, "job_nvda": null, "job_project_management": null, "job_research": null, "job_social_media": null, "job_stalls": null, "job_wilderness_trips": null, "job_writing": null, "vip_status": null, "job_phonebanking": null, "job_av_status": null, "job_office_status": null }, "precinct": { "id": 38, "code": "Hob", "name": "Hobart" } }
Birthdate is the first element returned.
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Friday, 15 January 2016 4:11 AM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
Thanks, Paul.
Looks like all the 'donation_' int fields received null values. I updated the Person object to make them nullable.
Can you test if this solves the issues you are having?
Here is a way to test using the development version of this library before it's published to the NuGet repository:
· Clone the NationBuilderAPI https://github.com/pavpen/NationBuilderAPI Git hub repository, or download it as a <.zip> from the GitHub web page, and unzip it.
· Open the
· Open your test Visual Studio project that uses the 'NationBuilderAPI' library.
· Go to 'TOOLS' -> 'NuGet Package Manager' -> 'Package Manager Settings'. Go to 'NuGet Package Manager' -> 'Package Sources' in the left panel.
· Click the '+' icon in the top-right row. Click the '...' button at the bottom-right row, above ,'OK' and 'Cancel'. Browse to the directory where you stored the 'NationBuliderAPI' repository.
· Update the NuGet packages in your test Visual Studio project that uses the 'NationBuilderAPI' library.
· Re-build your test project.
It should now be using the development version of the library you built.
To stop using the development version, just remove the 'NationBuilderAPI' directory from 'Package Sources' and re-install the 'NationBuliderAPI' NuGet package.
Thanks,
Pav
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-171708076 .
Thanks, Paul!
Sometimes you have to take on one evil-doer at a time.
This was clearly my bug. I had the type of Person.author
as string
, while the documentation says it is an abbreviated person resource, and that is what the JSON seems to contain.
I pushed fix for the field type.
Could you let me know if there are any more trees in the way?
Pav
Oh, I forgot to ask. Do I have permission to use your JSON data from these comments in the unit tests for this 'NatiorBuilderAPI' library?
Sure.
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Monday, 18 January 2016 3:19 PM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
Oh, I forgot to ask. Do I have permission to use your JSON data from these comments in the unit tests for this 'NatiorBuilderAPI' library?
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-172420757 .
Thanks. I've, obviously, been using it already, but just wanted to make sure.
I should start a contributors file, so I have place to put your name.
Pav
It now retrieves them with no errors.
The next step is to look at the fields returned from ShowPerson and see how it looks.
Thanks again.
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Monday, 18 January 2016 3:17 PM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
Thanks, Paul!
Sometimes you have to take on one evil-doer at a time.
This was clearly my bug. I had the type of Person.author as string, while the documentation says it is an abbreviated person resource, and that is what the JSON seems to contain.
I pushed fix for the field type.
Could you let me know if there are any more trees in the way?
Pav
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-172420639 .
I'm glad it's working.
I will consider this issue as resolved. If you run into another problem, you can reopen it, or create a new one.
Also, if you are able to do some testing for custom field support, please open a new issue. I can provide an initial implementation of it, but I won't be able to run good testing for it.
Thanks,
Pav
We are more than happy to do testing for it.
Issue 180.
Thank you.
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Wednesday, 20 January 2016 12:42 PM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
I'm glad it's working.
I will consider this issue as resolved. If you run into another problem, you can reopen it, or create a new one.
Also, if you are able to do some testing for custom field support, please open a new issue. I can provide an initial implementation of it, but I won't be able to run good testing for it.
Thanks,
Pav
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-173055892 .
Hi, Paul.
I opened an issue on GitHub for custom fields support. It is at:
https://github.com/pavpen/NationBuilderAPI/issues/2
You can report any success, and problems with the implementation of the new feature there.
I added an issue comment containing a link to a feature branch implementing custom fields. Hopefully, you should be able to build it, and use it to read and write custom person and donation fields.
Let me know of any problems with it.
Pav
Thank you very much, not sure when I will get to test it, we have lots on including NationBuilder integration.
I reckon Thursday maybe.
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Saturday, 23 January 2016 2:57 PM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
Hi, Paul.
I opened an issue on GitHub for custom fields support. It is at:
You can report any success, and problems with the implementation of the new feature there.
I added an issue comment containing a link to a feature branch implementing custom fields. Hopefully, you should be able to build it, and use it to read and write custom person and donation fields.
Let me know of any problems with it.
Pav
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-174126792 .
Did initial test, getting deserialization error:
WindowsApplication1
There was an error deserializing the object of type NationBuilderAPI.V1.PersonResponse. The value 'false' cannot be parsed as the type 'Int32'.
OK
Gets that for Id 69613, 69612 then it gets timeout errors on ShowPerson.
WindowsApplication1
The operation has timed out
OK
Here is 69613
·
{ "server": "cloudflare-nginx", "date": "Mon, 25 Jan 2016 04:22:17 GMT", "content-type": "application/json", "transfer-encoding": "chunked", "connection": "close", "set-cookie": [ "__cfduid=d7959a05b642dcd495f13286eaa54672c1453695736; expires=Tue, 24-Jan-17 04:22:16 GMT; path=/; domain=.nationbuilder.com; HttpOnly" ], "cache-control": "max-age=0, private, must-revalidate", "etag": "W/\"62e52cbc2030007145b298893d9ff319\"", "nation-ratelimit-limit": "195000", "nation-ratelimit-remaining": "194993", "nation-ratelimit-reset": "1453766400", "status": "200 OK", "vary": "Accept-Encoding", "x-powered-by": "Phusion Passenger 4.0.53", "x-pulse-approved": "true", "x-rack-cache": "miss", "x-ratelimit-limit": "10s", "x-ratelimit-remaining": "99", "x-ratelimit-reset": "1453695747", "x-request-id": "451768a917364be9f06c8713e8579f7b", "x-runtime": "0.105376", "x-ua-compatible": "IE=Edge,chrome=1", "via": "1.1 nationbuilder.com", "cf-ray": "26a1323409772438-IAD" }
Response BodySelect body https://apiexplorer.nationbuilder.com/nationbuilder
{ "person": { "birthdate": null, "city_district": null, "civicrm_id": null, "county_district": null, "county_file_id": null, "created_at": "2016-01-25T14:01:30+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": null, "email_opt_in": true, "employer": null, "external_id": null, "federal_district": null, "fire_district": null, "first_name": "NPA of", "has_facebook": false, "id": 69613, "is_twitter_follower": false, "is_volunteer": false, "judicial_district": null, "labour_region": null, "last_name": "Nsw", "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://cloudinary-a.akamaihd.net/nationbuilder/image/twitter/w_73,h_73,c_fill,d_buddy1.png/715181000.jpg", "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": [ "qld_twitter" ], "twitter_id": "715181000", "twitter_name": "NPA of NSW", "updated_at": "2016-01-25T14:01:30+11:00", "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": "An NGO that seeks to protect, connect & restore the integrity and diversity of natural systems in NSW and beyond.", "call_status_id": null, "call_status_name": null, "capital_amount_in_cents": 200, "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": false, "demo": null, "donations_amount_in_cents": null, "donations_amount_this_cycle_in_cents": null, "donations_count": null, "donations_count_this_cycle": null, "donations_pledged_amount_in_cents": null, "donations_raised_amount_in_cents": null, "donations_raised_amount_this_cycle_in_cents": null, "donations_raised_count": null, "donations_raised_count_this_cycle": null, "donations_to_raise_amount_in_cents": null, "email1": null, "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": "2016-01-25T14:01:30+11:00", "first_recruited_at": null, "first_supporter_at": null, "first_volunteer_at": null, "full_name": "NPA of Nsw", "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": true, "is_supporter": false, "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": null, "priority_level": null, "priority_level_changed_at": null, "profile_content": null, "profile_content_html": null, "profile_headline": null, "received_capital_amount_in_cents": 200, "recruiter": null, "recruits_count": 0, "registered_address": null, "registered_at": null, "religion": null, "rule_violations_count": 0, "signup_sources": [], "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": "An NGO that seeks to protect, connect & restore the integrity and diversity of natural systems in NSW and beyond.", "twitter_followers_count": 472, "twitter_friends_count": 561, "twitter_location": "", "twitter_login": "npansw", "twitter_updated_at": null, "twitter_website": "http://t.co/ZNHPuohKEA", "unsubscribed_at": null, "user_submitted_address": null, "username": "npansw", "voter_updated_at": null, "ward": null, "warnings_count": 0, "website": "https://twitter.com/npansw", "work_address": null, "campaign_centre": null, "circle_financial": null, "circle_volunteer": null, "do_not_ask_financial": null, "driver_licence_type": null, "driver_notes": null, "emergency_name": null, "emergency_relationship": null, "first_aid_qualified": null, "jobs_additional_notes": null, "job_advocacy_type": null, "major_donor": null, "job_advocacy_status": null, "job_arts_status": null, "job_arts_type": null, "job_av_type": null, "job_office_type": null, "tws_staff": null, "lead_source": null, "emergency_phone": null, "telemarketing_in_progress": null, "tws_member": null, "volunteer_status": null, "lead_source_detail": null, "job_catering": null, "job_doorknocking": null, "job_events": null, "job_handyman": null, "job_letterboxing": null, "job_nvda": null, "job_project_management": null, "job_research": null, "job_social_media": null, "job_stalls": null, "job_wilderness_trips": null, "job_writing": null, "job_phonebanking": null, "job_av_status": null, "job_office_status": null, "vip_status": null }, "precinct": null }
· GETMatch/people/match
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Saturday, 23 January 2016 2:57 PM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
Hi, Paul.
I opened an issue on GitHub for custom fields support. It is at:
You can report any success, and problems with the implementation of the new feature there.
I added an issue comment containing a link to a feature branch implementing custom fields. Hopefully, you should be able to build it, and use it to read and write custom person and donation fields.
Let me know of any problems with it.
Pav
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-174126792 .
Hi, Paul.
I had that error before I created the new feature branch.
Can you make sure you are on the 'I-0002_support_custom_fields' branch, and you have the latest version? I did not get any errors parsing the JSON you sent.
I put a link to the new branch in the GitHub issue for supporting custom fields. The <README.md
> in that branch contains example code for using custom fields. That issue is, also, a better place to report your results. Can you comment there?
The issue link is: (https://github.com/pavpen/NationBuilderAPI/issues/2)[https://github.com/pavpen/NationBuilderAPI/issues/2]
The new branch is at:
https://github.com/pavpen/NationBuilderAPI/tree/I-0002_support_custom_fields
Pav
I am finally back to looking at this, work gets in the way of progress.
Where will the custom fields appear? Presumably a collection on the Person object? I haven’t found them yet.
I sometimes get:
"Expecting state 'Element'.. Encountered 'Text' with name '', namespace ''. "
On a ShowPerson(71110) is one example.
{ "person": { "birthdate": "1980-06-13", "city_district": null, "civicrm_id": null, "county_district": null, "county_file_id": null, "created_at": "2016-02-23T14:04:01+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": "paulinafernandez@gmail.com", "email_opt_in": true, "employer": "", "external_id": null, "federal_district": null, "fire_district": null, "first_name": "Paulina", "has_facebook": false, "id": 71110, "is_twitter_follower": false, "is_volunteer": false, "judicial_district": null, "labour_region": null, "last_name": "Fernandez", "linkedin_id": null, "mobile": "04050082330", "mobile_opt_in": true, "nbec_guid": null, "ngp_id": null, "note": "Masters in Business Design. Loves diving, painting, research, planning, being creative.", "occupation": "", "party": "", "pf_strat_id": null, "phone": "", "precinct_id": null, "primary_address": { "address1": "15 Esplanade", "address2": "", "address3": null, "city": "Semaphore South", "county": "", "state": "South Australia", "country_code": "AU", "zip": "5019", "lat": "-34.847936", "lng": "138.477707", "fips": null }, "profile_image_url_ssl": " https://d3n8a8pro7vhmx.cloudfront.net/assets/icons/buddy.png", "recruiter_id": 271, "rnc_id": null, "rnc_regid": null, "salesforce_id": null, "school_district": null, "school_sub_district": null, "sex": "F", "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": "2016-02-23T14:31:15+11:00", "van_id": null, "village_district": null, "ward": null, "work_phone_number": "", "active_customer_expires_at": null, "active_customer_started_at": null, "author": { "birthdate": null, "city_district": null, "civicrm_id": null, "county_district": null, "county_file_id": null, "created_at": "2015-11-03T12:25:48+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": "cristelchambers@gmail.com", "email_opt_in": true, "employer": "", "external_id": "439321", "federal_district": "Hindmarsh", "fire_district": null, "first_name": "Cristel", "has_facebook": true, "id": 271, "is_twitter_follower": false, "is_volunteer": true, "judicial_district": null, "labour_region": null, "last_name": "Chambers", "linkedin_id": "VC_H8N6EUV", "mobile": "0401 232 301", "mobile_opt_in": true, "nbec_guid": null, "ngp_id": null, "note": null, "occupation": "Education Program Coordinator", "party": "", "pf_strat_id": null, "phone": "", "precinct_id": 34, "primary_address": { "address1": "40 Barker Ave", "address2": null, "address3": null, "city": "Findon", "county": null, "state": "SA", "country_code": "AU", "zip": "5023", "lat": "-34.904012", "lng": "138.540747", "fips": null }, "profile_image_url_ssl": " https://graph.facebook.com/v2.2/607237579/picture?height=73&type=square&width=73 ", "recruiter_id": null, "rnc_id": null, "rnc_regid": null, "salesforce_id": "16147", "school_district": "41058", "school_sub_district": "4105807", "sex": "", "signup_type": 0, "state_file_id": null, "state_lower_district": "Ashford", "state_upper_district": null, "support_level": null, "supranational_district": null, "tags": [ "sa_actions", "sa_swag", "nat_tags_converted_sa", "sa_green_roots2016_rsvp", "sa_green_roast2016_rsvp" ], "twitter_id": null, "twitter_name": null, "updated_at": "2016-02-23T14:04:01+11:00", "van_id": null, "village_district": null, "ward": null, "work_phone_number": "", "circle_financial": "2 Supporter", "circle_volunteer": "3 Active supporter", "do_not_ask_financial": null, "driver_licence_type": null, "driver_notes": null, "emergency_name": null, "emergency_relationship": null, "first_aid_qualified": null, "jobs_additional_notes": null, "job_advocacy_type": "Education", "vip_major_donor": null, "vip_celebrity": null, "vip_com_board": null, "campaign_centre": "SA", "job_advocacy_status": "Skilled", "job_arts_status": null, "job_arts_type": null, "job_av_type": null, "job_office_type": null, "lead_source": null, "emergency_phone": null, "tws_staff": "Never", "telemarketing_in_progress": null, "tws_member": "Dropped", "lead_source_detail": null, "vip_bequestor": null, "job_catering": null, "job_doorknocking": null, "job_events": "Trained", "job_handyman": null, "job_letterboxing": null, "job_nvda": null, "job_project_management": null, "job_research": null, "job_social_media": null, "job_stalls": null, "job_wilderness_trips": null, "job_writing": null, "job_phonebanking": null, "job_av_status": null, "job_office_status": null, "vip_contact": null }, "author_id": 271, "auto_import_id": null, "availability": "Tues & Wed 10.30 - 1.30", "ballots": [], "banned_at": null, "billing_address": null, "bio": null, "call_status_id": null, "call_status_name": null, "capital_amount_in_cents": 500, "children_count": 0, "church": "", "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": false, "demo": null, "donations_amount_in_cents": null, "donations_amount_this_cycle_in_cents": null, "donations_count": null, "donations_count_this_cycle": null, "donations_pledged_amount_in_cents": null, "donations_raised_amount_in_cents": null, "donations_raised_amount_this_cycle_in_cents": null, "donations_raised_count": null, "donations_raised_count_this_cycle": null, "donations_to_raise_amount_in_cents": null, "email1": "paulinafernandez@gmail.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": "2016-02-23T14:04:01+11:00", "first_volunteer_at": null, "full_name": "Paulina Fernandez", "home_address": { "address1": "15 Esplanade", "address2": "", "address3": null, "city": "Semaphore South", "county": "", "state": "South Australia", "country_code": "AU", "zip": "5019", "lat": "-34.847936", "lng": "138.477707", "fips": 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_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": "", "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": "en", "mailing_address": null, "marital_status": "M", "media_market_name": null, "meetup_address": null, "membership_expires_at": null, "membership_level_name": null, "membership_started_at": null, "middle_name": null, "mobile_normalized": "4050082330", "nbec_precinct_code": null, "nbec_precinct": null, "note_updated_at": "2016-02-23T14:04:01+11:00", "outstanding_invoices_amount_in_cents": null, "outstanding_invoices_count": null, "overdue_invoices_count": null, "page_slug": null, "parent": { "birthdate": null, "city_district": null, "civicrm_id": null, "county_district": null, "county_file_id": null, "created_at": "2015-11-03T12:25:48+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": "cristelchambers@gmail.com", "email_opt_in": true, "employer": "", "external_id": "439321", "federal_district": "Hindmarsh", "fire_district": null, "first_name": "Cristel", "has_facebook": true, "id": 271, "is_twitter_follower": false, "is_volunteer": true, "judicial_district": null, "labour_region": null, "last_name": "Chambers", "linkedin_id": "VC_H8N6EUV", "mobile": "0401 232 301", "mobile_opt_in": true, "nbec_guid": null, "ngp_id": null, "note": null, "occupation": "Education Program Coordinator", "party": "", "pf_strat_id": null, "phone": "", "precinct_id": 34, "primary_address": { "address1": "40 Barker Ave", "address2": null, "address3": null, "city": "Findon", "county": null, "state": "SA", "country_code": "AU", "zip": "5023", "lat": "-34.904012", "lng": "138.540747", "fips": null }, "profile_image_url_ssl": " https://graph.facebook.com/v2.2/607237579/picture?height=73&type=square&width=73 ", "recruiter_id": null, "rnc_id": null, "rnc_regid": null, "salesforce_id": "16147", "school_district": "41058", "school_sub_district": "4105807", "sex": "", "signup_type": 0, "state_file_id": null, "state_lower_district": "Ashford", "state_upper_district": null, "support_level": null, "supranational_district": null, "tags": [ "sa_actions", "sa_swag", "nat_tags_converted_sa", "sa_green_roots2016_rsvp", "sa_green_roast2016_rsvp" ], "twitter_id": null, "twitter_name": null, "updated_at": "2016-02-23T14:04:01+11:00", "van_id": null, "village_district": null, "ward": null, "work_phone_number": "", "circle_financial": "2 Supporter", "circle_volunteer": "3 Active supporter", "do_not_ask_financial": null, "driver_licence_type": null, "driver_notes": null, "emergency_name": null, "emergency_relationship": null, "first_aid_qualified": null, "jobs_additional_notes": null, "job_advocacy_type": "Education", "vip_major_donor": null, "vip_celebrity": null, "vip_com_board": null, "campaign_centre": "SA", "job_advocacy_status": "Skilled", "job_arts_status": null, "job_arts_type": null, "job_av_type": null, "job_office_type": null, "lead_source": null, "emergency_phone": null, "tws_staff": "Never", "telemarketing_in_progress": null, "tws_member": "Dropped", "lead_source_detail": null, "vip_bequestor": null, "job_catering": null, "job_doorknocking": null, "job_events": "Trained", "job_handyman": null, "job_letterboxing": null, "job_nvda": null, "job_project_management": null, "job_research": null, "job_social_media": null, "job_stalls": null, "job_wilderness_trips": null, "job_writing": null, "job_phonebanking": null, "job_av_status": null, "job_office_status": null, "vip_contact": null }, "parent_id": 271, "party_member": null, "phone_normalized": null, "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": 500, "recruiter": { "birthdate": null, "city_district": null, "civicrm_id": null, "county_district": null, "county_file_id": null, "created_at": "2015-11-03T12:25:48+11:00", "datatrust_id": null, "do_not_call": false, "do_not_contact": false, "dw_id": null, "email": "cristelchambers@gmail.com", "email_opt_in": true, "employer": "", "external_id": "439321", "federal_district": "Hindmarsh", "fire_district": null, "first_name": "Cristel", "has_facebook": true, "id": 271, "is_twitter_follower": false, "is_volunteer": true, "judicial_district": null, "labour_region": null, "last_name": "Chambers", "linkedin_id": "VC_H8N6EUV", "mobile": "0401 232 301", "mobile_opt_in": true, "nbec_guid": null, "ngp_id": null, "note": null, "occupation": "Education Program Coordinator", "party": "", "pf_strat_id": null, "phone": "", "precinct_id": 34, "primary_address": { "address1": "40 Barker Ave", "address2": null, "address3": null, "city": "Findon", "county": null, "state": "SA", "country_code": "AU", "zip": "5023", "lat": "-34.904012", "lng": "138.540747", "fips": null }, "profile_image_url_ssl": " https://graph.facebook.com/v2.2/607237579/picture?height=73&type=square&width=73 ", "recruiter_id": null, "rnc_id": null, "rnc_regid": null, "salesforce_id": "16147", "school_district": "41058", "school_sub_district": "4105807", "sex": "", "signup_type": 0, "state_file_id": null, "state_lower_district": "Ashford", "state_upper_district": null, "support_level": null, "supranational_district": null, "tags": [ "sa_actions", "sa_swag", "nat_tags_converted_sa", "sa_green_roots2016_rsvp", "sa_green_roast2016_rsvp" ], "twitter_id": null, "twitter_name": null, "updated_at": "2016-02-23T14:04:01+11:00", "van_id": null, "village_district": null, "ward": null, "work_phone_number": "", "circle_financial": "2 Supporter", "circle_volunteer": "3 Active supporter", "do_not_ask_financial": null, "driver_licence_type": null, "driver_notes": null, "emergency_name": null, "emergency_relationship": null, "first_aid_qualified": null, "jobs_additional_notes": null, "job_advocacy_type": "Education", "vip_major_donor": null, "vip_celebrity": null, "vip_com_board": null, "campaign_centre": "SA", "job_advocacy_status": "Skilled", "job_arts_status": null, "job_arts_type": null, "job_av_type": null, "job_office_type": null, "lead_source": null, "emergency_phone": null, "tws_staff": "Never", "telemarketing_in_progress": null, "tws_member": "Dropped", "lead_source_detail": null, "vip_bequestor": null, "job_catering": null, "job_doorknocking": null, "job_events": "Trained", "job_handyman": null, "job_letterboxing": null, "job_nvda": null, "job_project_management": null, "job_research": null, "job_social_media": null, "job_stalls": null, "job_wilderness_trips": null, "job_writing": null, "job_phonebanking": null, "job_av_status": null, "job_office_status": null, "vip_contact": null }, "recruits_count": 0, "registered_address": null, "registered_at": null, "religion": "", "rule_violations_count": 0, "signup_sources": [], "spent_capital_amount_in_cents": 0, "submitted_address": "15 esplanade", "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": { "address1": "15 esplanade", "address2": null, "address3": null, "city": null, "county": null, "state": null, "country_code": "AU", "zip": null, "lat": "-25.274398", "lng": "133.775136", "fips": null }, "username": "paulinafernandez", "voter_updated_at": null, "warnings_count": 0, "website": null, "work_address": null, "circle_financial": null, "circle_volunteer": null, "do_not_ask_financial": null, "driver_licence_type": null, "driver_notes": null, "emergency_name": null, "emergency_relationship": null, "first_aid_qualified": null, "jobs_additional_notes": null, "job_advocacy_type": null, "vip_major_donor": null, "vip_celebrity": null, "vip_com_board": null, "campaign_centre": null, "job_advocacy_status": null, "job_arts_status": null, "job_arts_type": null, "job_av_type": null, "job_office_type": null, "lead_source": null, "emergency_phone": null, "tws_staff": null, "telemarketing_in_progress": null, "tws_member": null, "lead_source_detail": null, "vip_bequestor": null, "job_catering": null, "job_doorknocking": null, "job_events": null, "job_handyman": null, "job_letterboxing": null, "job_nvda": null, "job_project_management": null, "job_research": null, "job_social_media": null, "job_stalls": null, "job_wilderness_trips": null, "job_writing": null, "job_phonebanking": null, "job_av_status": null, "job_office_status": null, "vip_contact": null }, "precinct": null }
Regards
Paul
From: Pavel M. Penev [mailto:notifications@github.com] Sent: Tuesday, 26 January 2016 1:12 PM To: pavpen/NationBuilderAPI Cc: PaulVSmith Subject: Re: [NationBuilderAPI] Getting exceptions on deserialization of Person in ShowPerson (#1)
Hi, Paul.
I had that error before I created the new feature branch.
Can you make sure you are on the 'I-0002_support_custom_fields' branch, and you have the latest version? I did not get any errors parsing the JSON you sent.
I put a link to the new branch in the GitHub issue for supporting custom
fields. The
The issue link is: ( https://github.com/pavpen/NationBuilderAPI/issues/2)[https://github.com/pavpen/NationBuilderAPI/issues/2] https://github.com/pavpen/NationBuilderAPI/issues/2)%5Bhttps:/github.com/pavpen/NationBuilderAPI/issues/2%5D
The new branch is at:
https://github.com/pavpen/NationBuilderAPI/tree/I-0002_support_custom_fields
Pav
— Reply to this email directly or view it on GitHub https://github.com/pavpen/NationBuilderAPI/issues/1#issuecomment-174776901 .[image: Image removed by sender.]
Thank you for the wrapper.
The result of the exceptions is the person object is not populated.
Also do custom fields get loaded?
Regards
Paul