From e7c7e6b540e4b3aee1ad8485e834aaa836581c62 Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Fri, 22 Jan 2016 22:42:16 -0500 Subject: [PATCH 1/7] I-0002: Initial implementation of custom field support. --- NationBuilderAPI.v12.suo | Bin 266752 -> 266752 bytes .../V1/Donations/DonationTransportObject.cs | 4 +- NationBuilderAPI/V1/People/PersonResponse.cs | 4 +- .../V1/People/PersonTransportObject.cs | 4 +- NationBuilderAPI/V1/Session/Contacts.cs | 2 +- NationBuilderAPI/V1/Session/Donations.cs | 25 ++++---- NationBuilderAPI/V1/Session/Lists.cs | 8 +-- .../V1/Session/NationBuilderSession.cs | 23 ++++++- NationBuilderAPI/V1/Session/People.cs | 44 ++++++++------ NationBuilderAPI/V1/Session/PeopleTags.cs | 8 +-- NationBuilderAPI/V1/Session/Webhooks.cs | 2 +- .../NationBuilderAPIv1UnitTests.csproj | 8 ++- .../CustomFieldsSession/CustomPeopleTests.cs | 56 ++++++++++++++++++ .../NationBuilderSessionTests.cs | 6 +- .../V1/Serialization/Person.cs | 6 +- .../V1/Session/Contacts.cs | 4 +- .../V1/Session/Lists.cs | 4 +- .../{PeopleTags.cs => PeopleTagsTests.cs} | 6 +- .../V1/Session/{People.cs => PeopleTests.cs} | 5 +- 19 files changed, 158 insertions(+), 61 deletions(-) create mode 100644 NationBuilderAPIv1UnitTests/V1/CustomFieldsSession/CustomPeopleTests.cs rename NationBuilderAPIv1UnitTests/V1/{Session => }/NationBuilderSessionTests.cs (87%) rename NationBuilderAPIv1UnitTests/V1/Session/{PeopleTags.cs => PeopleTagsTests.cs} (78%) rename NationBuilderAPIv1UnitTests/V1/Session/{People.cs => PeopleTests.cs} (95%) diff --git a/NationBuilderAPI.v12.suo b/NationBuilderAPI.v12.suo index 7ebaa81f75c9168ebad631c386948e04bc73f5ef..9a66bf5d8940503d158a8aeeb58c87a637316e9c 100644 GIT binary patch delta 6909 zcmd5=30Razn(nIlX&Pvtf$jzo5nALDwLzlBcr@Bkf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cFh(R7|E0(MDLQ>={WM0yt;^Ddm7 zY$|8jYIYj~u0}L1W8=AL>O8*x>v;8rD7KiWP34S$b7j&ey)i~Z6L}SMtZJ!X?KCpK zBsQz8Xu2ouC+FGo@MS3U=Y>{lc77@0kI-Oob|o98I##f+DCTotfWNQbe0yPWQC`XN zx$$#Uhl7=o#|w*%nI*-G^5@%2dzBV(Nl8iny|nmrEtVEvF_&toW)3Qv9$_(}^VckF z(}!%K=-fwrRofbtNrYuBa|p|?m`hAs$AZPFUxLDLF%^z$ELp6+!4f?Q8vfJIZm}@% z5N0H8Jue-h;?wo4qt65Ni*Wc#{m4Kpp865JAg{A3;W*A5+_rU*x+sxt3KnnsOXGdA zi)~u0|5u2*wQS-)^lh~vi&?(s4eI~n#aV4UMl&Ven2^@%n&*B-gG9(ix=S>sP>Guh zBhKp-Y?vr{p3W5p3;4kB ZBKBkTu!~I~`itOo-*fj>c{eMX|6gVc@mBx< diff --git a/NationBuilderAPI/V1/Donations/DonationTransportObject.cs b/NationBuilderAPI/V1/Donations/DonationTransportObject.cs index ba883b0..02a7bbf 100644 --- a/NationBuilderAPI/V1/Donations/DonationTransportObject.cs +++ b/NationBuilderAPI/V1/Donations/DonationTransportObject.cs @@ -5,9 +5,9 @@ namespace NationBuilderAPI.V1 { [DataContract] - class DonationTransportObject + class DonationTransportObject { [DataMember] - public Donation donation; + public DonationType donation; } } diff --git a/NationBuilderAPI/V1/People/PersonResponse.cs b/NationBuilderAPI/V1/People/PersonResponse.cs index da41396..947a606 100644 --- a/NationBuilderAPI/V1/People/PersonResponse.cs +++ b/NationBuilderAPI/V1/People/PersonResponse.cs @@ -9,10 +9,10 @@ namespace NationBuilderAPI.V1 { [DataContract] - public class PersonResponse : MemberwiseCloneableComparable + public class PersonResponse : MemberwiseCloneableComparable { [DataMember] - public Person person; + public PersonType person; [DataMember] public Precinct precinct; diff --git a/NationBuilderAPI/V1/People/PersonTransportObject.cs b/NationBuilderAPI/V1/People/PersonTransportObject.cs index 46f8927..ef530e2 100644 --- a/NationBuilderAPI/V1/People/PersonTransportObject.cs +++ b/NationBuilderAPI/V1/People/PersonTransportObject.cs @@ -6,9 +6,9 @@ namespace NationBuilderAPI.V1 { [DataContract] - class PersonTransportObject + class PersonTransportObject { [DataMember] - public Person person; + public PersonType person; } } diff --git a/NationBuilderAPI/V1/Session/Contacts.cs b/NationBuilderAPI/V1/Session/Contacts.cs index fd01dad..3d7cc5f 100644 --- a/NationBuilderAPI/V1/Session/Contacts.cs +++ b/NationBuilderAPI/V1/Session/Contacts.cs @@ -7,7 +7,7 @@ namespace NationBuilderAPI.V1 { - public partial class NationBuilderSession + public partial class NationBuilderSession { /// /// The index endpoint provides a paginated view of the contacts made to a person. diff --git a/NationBuilderAPI/V1/Session/Donations.cs b/NationBuilderAPI/V1/Session/Donations.cs index c43a4d0..5ef5ea2 100644 --- a/NationBuilderAPI/V1/Session/Donations.cs +++ b/NationBuilderAPI/V1/Session/Donations.cs @@ -6,20 +6,20 @@ namespace NationBuilderAPI.V1 { - public partial class NationBuilderSession : NationBuilderHttpTransport + public partial class NationBuilderSession { /// /// The index endpoint provides a paginated view of the donations in a nation. /// /// Number of results to show on each page of results (max 100). /// The requested page of results, and result information. - public ResultsPageResponse GetDonations(int limit = 100) + public ResultsPageResponse GetDonations(int limit = 100) { StringBuilder reqUrlBuilder = RequestUrlBuilderAppendQuery( MakeRequestUrlBuilder("donations"), "&limit=", limit.ToString()); var req = MakeHttpRequest(reqUrlBuilder); - var res = DeserializeHttpResponse>(req); + var res = DeserializeHttpResponse>(req); return res; } @@ -29,7 +29,7 @@ public ResultsPageResponse GetDonations(int limit = 100) /// /// Number of results to retrieve on each page of results (max 100). /// All the donations in the nation. - public IEnumerable GetDonationsResults(int limit = 100) + public IEnumerable GetDonationsResults(int limit = 100) { return AllResultsFrom(GetDonations(limit)); } @@ -53,11 +53,13 @@ public IEnumerable GetDonationsResults(int limit = 100) /// /// The resource of the donation to be created. /// The newly-created donation. - public Donation CreateDonation(Donation donation) + public DonationType CreateDonation(DonationType donation) { StringBuilder reqUrlBuilder = MakeRequestUrlBuilder("donations"); - var req = MakeHttpPostRequest(reqUrlBuilder, new DonationTransportObject() { donation = donation }); - DonationTransportObject res = DeserializeHttpResponse(req); + var req = MakeHttpPostRequest>( + reqUrlBuilder, + new DonationTransportObject() { donation = donation }); + var res = DeserializeHttpResponse>(req); return res.donation; } @@ -70,11 +72,14 @@ public Donation CreateDonation(Donation donation) /// ID of the donation to update. /// The resource attributes of the donation to change. /// A full representation of the updated donation. - public Donation UpdateDonation(long id, Donation donation) + public DonationType UpdateDonation(long id, DonationType donation) { StringBuilder reqUrlBuilder = MakeRequestUrlBuilder("donations/", id.ToString()); - var req = MakeHttpPostRequest(reqUrlBuilder, new DonationTransportObject() { donation = donation }, "PUT"); - DonationTransportObject res = DeserializeHttpResponse(req); + var req = MakeHttpPostRequest>( + reqUrlBuilder, + new DonationTransportObject() { donation = donation }, + "PUT"); + DonationTransportObject res = DeserializeHttpResponse>(req); return res.donation; } diff --git a/NationBuilderAPI/V1/Session/Lists.cs b/NationBuilderAPI/V1/Session/Lists.cs index 14c8cc0..2ab0d46 100644 --- a/NationBuilderAPI/V1/Session/Lists.cs +++ b/NationBuilderAPI/V1/Session/Lists.cs @@ -7,7 +7,7 @@ namespace NationBuilderAPI.V1 { - public partial class NationBuilderSession + public partial class NationBuilderSession { /// /// The index endpoint shows a paginated list of custom lists. @@ -41,13 +41,13 @@ public IEnumerable GetListsResults(int limit = 100) /// ID of the list to get people from. /// Maximum number of results to show in one page of results. (Default: 10, max: 100.) /// A page of s. - public ResultsPageResponse GetPeopleInList(long listId, int limit = 10) + public ResultsPageResponse GetPeopleInList(long listId, int limit = 10) { StringBuilder reqUrlBuilder = RequestUrlBuilderAppendQuery( MakeRequestUrlBuilder("lists/", listId.ToString(), "/people"), "&limit=", limit.ToString()); var req = MakeHttpRequest(reqUrlBuilder); - var res = DeserializeHttpResponse>(req); + var res = DeserializeHttpResponse>(req); return res; } @@ -58,7 +58,7 @@ public ResultsPageResponse GetPeopleInList(long listId, int limit = 10) /// ID of the list to get people from. /// The number of result to fetch in each HTTP request. The maximum is 100. /// An enumeration of all the people in the given list. - public IEnumerable GetPeopleInListResults(long listId, int limit = 100) + public IEnumerable GetPeopleInListResults(long listId, int limit = 100) { return AllResultsFrom(GetPeopleInList(listId, limit)); } diff --git a/NationBuilderAPI/V1/Session/NationBuilderSession.cs b/NationBuilderAPI/V1/Session/NationBuilderSession.cs index d88a2d7..4c1bd86 100644 --- a/NationBuilderAPI/V1/Session/NationBuilderSession.cs +++ b/NationBuilderAPI/V1/Session/NationBuilderSession.cs @@ -8,8 +8,29 @@ namespace NationBuilderAPI.V1 { /// /// A session object used to access a nation's API. + /// + /// + /// The type of Person objects returned by Nation Builder for the accessed nation. + /// + /// Use this to access custom `Person` fields. + /// + /// + /// + /// The type of Donation objects returned by Nation Builder for the accessed nation. + /// + /// Use this to access custom `Donation` fields. + /// /// - public partial class NationBuilderSession : NationBuilderHttpTransport, IDisposable + public class NationBuilderSession : NationBuilderSession + { + public NationBuilderSession(string slug, string accessToken) : base(slug, accessToken) + { } + } + + /// + /// A session object used to access a nation's API. + /// + public partial class NationBuilderSession : NationBuilderHttpTransport, IDisposable { /// /// Create a new Nation Builder session for accessing a nation's API. diff --git a/NationBuilderAPI/V1/Session/People.cs b/NationBuilderAPI/V1/Session/People.cs index c2a4afb..d9c7e48 100644 --- a/NationBuilderAPI/V1/Session/People.cs +++ b/NationBuilderAPI/V1/Session/People.cs @@ -8,7 +8,7 @@ namespace NationBuilderAPI.V1 { - public partial class NationBuilderSession + public partial class NationBuilderSession { /// /// The index endpoint provides a paginated view of the people in a nation. Each person's data is abbreviated for the Index view. @@ -47,7 +47,7 @@ public IEnumerable GetPeopleResults(int limit = 100) /// ID of the person to retrieve. /// Type of ID to use, set to "external" to show the person based on their external ID. Leave as null to use NationBuilder's ID. /// The full person information. - public PersonResponse ShowPerson(long id, string idType = null) + public PersonResponse ShowPerson(long id, string idType = null) { StringBuilder reqUrlBuilder = MakeRequestUrlBuilder("people/", id.ToString()); if (null != idType) @@ -56,7 +56,7 @@ public PersonResponse ShowPerson(long id, string idType = null) } var req = MakeHttpRequest(reqUrlBuilder); - PersonResponse res = DeserializeHttpResponse(req); + var res = DeserializeHttpResponse>(req); return res; } @@ -68,13 +68,13 @@ public PersonResponse ShowPerson(long id, string idType = null) /// /// The external ID of the person to retrieve. /// The full person information. - public PersonResponse ShowPersonWithExternalId(string externalId) + public PersonResponse ShowPersonWithExternalId(string externalId) { StringBuilder reqUrlBuilder = MakeRequestUrlBuilder("people/", WebUtility.UrlEncode(externalId)); reqUrlBuilder = RequestUrlBuilderAppendQuery(reqUrlBuilder, "&id_type=external"); var req = MakeHttpRequest(reqUrlBuilder); - PersonResponse res = DeserializeHttpResponse(req); + var res = DeserializeHttpResponse>(req); return res; } @@ -213,14 +213,14 @@ public IEnumerable SearchPeopleResults(string first_name = nu /// The radius in miles for which to include results. (Optional, default: 1 mile.) /// Number of results to show per page. (Default: 10, max: 100.) /// The specified page of people in the specified search radius. - public ResultsPageResponse NearbyPeople(string location, double distance = 1.0, int limit = 10) + public ResultsPageResponse NearbyPeople(string location, double distance = 1.0, int limit = 10) { StringBuilder reqUrlBuilder = RequestUrlBuilderAppendMethodNonNullParameters( MakeRequestUrlBuilder("people/nearby"), MethodBase.GetCurrentMethod().GetParameters(), location, distance.ToString(), limit.ToString()); var req = MakeHttpRequest(reqUrlBuilder); - var res = DeserializeHttpResponse>(req); + var res = DeserializeHttpResponse>(req); return res; } @@ -232,7 +232,7 @@ public ResultsPageResponse NearbyPeople(string location, double distance /// The radius in miles for which to include results. (optional, default: 1 mile) /// Number of results to retireve per page. (default: 100, max: 100) /// The people in the specified search radius. - public IEnumerable NearbyPeopleResults(string location, double distance = 1.0, int limit = 100) + public IEnumerable NearbyPeopleResults(string location, double distance = 1.0, int limit = 100) { return AllResultsFrom(NearbyPeople(location, distance, limit)); } @@ -249,11 +249,11 @@ public IEnumerable NearbyPeopleResults(string location, double distance /// If a person you create does not meet these criteria you will receive an error for a field called identity. /// /// The person created. - public PersonResponse CreatePerson(Person person) + public PersonResponse CreatePerson(PersonType person) { StringBuilder reqUrlBuilder = MakeRequestUrlBuilder("people"); - var req = MakeHttpPostRequest(reqUrlBuilder, new PersonTransportObject() { person = person }); - PersonResponse res = DeserializeHttpResponse(req, HttpStatusCode.Created); + var req = MakeHttpPostRequest>(reqUrlBuilder, new PersonTransportObject() { person = person }); + var res = DeserializeHttpResponse>(req, HttpStatusCode.Created); return res; } @@ -266,11 +266,14 @@ public PersonResponse CreatePerson(Person person) /// ID of the person to update. /// The resource attributes of the person to change. /// The updated person. - public PersonResponse UpdatePerson(long id, Person person) + public PersonResponse UpdatePerson(long id, PersonType person) { StringBuilder reqUrlBuilder = MakeRequestUrlBuilder("people/", id.ToString()); - var req = MakeHttpPostRequest(reqUrlBuilder, new PersonTransportObject() { person = person }, HttpMethodNames.Put); - PersonResponse res = DeserializeHttpResponse(req); + var req = MakeHttpPostRequest>( + reqUrlBuilder, + new PersonTransportObject() { person = person }, + HttpMethodNames.Put); + var res = DeserializeHttpResponse>(req); return res; } @@ -281,11 +284,14 @@ public PersonResponse UpdatePerson(long id, Person person) /// /// The resource attributes of the person to push. /// The new, or updated person. - public PersonResponse PushPerson(Person person) + public PersonResponse PushPerson(PersonType person) { StringBuilder reqUrlBuilder = MakeRequestUrlBuilder("people/push"); - var req = MakeHttpPostRequest(reqUrlBuilder, new PersonTransportObject() { person = person }, HttpMethodNames.Put); - PersonResponse res = DeserializeHttpResponse(req); + var req = MakeHttpPostRequest>( + reqUrlBuilder, + new PersonTransportObject() { person = person }, + HttpMethodNames.Put); + var res = DeserializeHttpResponse>(req); return res; } @@ -321,11 +327,11 @@ public RegisterResponse RegisterPerson(long id) /// This endpoint returns the access token's resource owner's representation. /// /// - public PersonResponse PersonMe() + public PersonResponse PersonMe() { StringBuilder reqUrlBuilder = MakeRequestUrlBuilder("people/me"); var req = MakeHttpRequest(reqUrlBuilder); - PersonResponse res = DeserializeHttpResponse(req); + var res = DeserializeHttpResponse>(req); return res; } diff --git a/NationBuilderAPI/V1/Session/PeopleTags.cs b/NationBuilderAPI/V1/Session/PeopleTags.cs index b445b5a..9676658 100644 --- a/NationBuilderAPI/V1/Session/PeopleTags.cs +++ b/NationBuilderAPI/V1/Session/PeopleTags.cs @@ -6,7 +6,7 @@ namespace NationBuilderAPI.V1 { - public partial class NationBuilderSession + public partial class NationBuilderSession { /// /// Show the tags that have been used before in a nation. @@ -40,7 +40,7 @@ public IEnumerable GetPeopleTagsResults(int limit = 100) /// The tag to search by. /// Max number of results to show in one page of results. (Default: 10, max: 100.) /// A results page of people tagged with the given tag. - public ResultsPageResponse GetPeopleWithTag(string tagName, int limit = 10) + public ResultsPageResponse GetPeopleWithTag(string tagName, int limit = 10) { StringBuilder reqUrlBuilder = RequestUrlBuilderAppendQuery( // WebUtility.UrlEncode(tagName) does not work here for .NET 4.5, since the Nation Builder service @@ -48,7 +48,7 @@ public ResultsPageResponse GetPeopleWithTag(string tagName, int limit = MakeRequestUrlBuilder("tags/", Uri.EscapeDataString(tagName), "/people"), "&limit=", limit.ToString()); var req = MakeHttpRequest(reqUrlBuilder); - var res = DeserializeHttpResponse>(req); + var res = DeserializeHttpResponse>(req); return res; } @@ -59,7 +59,7 @@ public ResultsPageResponse GetPeopleWithTag(string tagName, int limit = /// The tag to search by. /// The number of result to fetch in each HTTP request. The maximum is 100. /// An enumeration of all the people with a given tag. - public IEnumerable GetPeopleWithTagResults(string tagName, int limit = 100) + public IEnumerable GetPeopleWithTagResults(string tagName, int limit = 100) { return AllResultsFrom(GetPeopleWithTag(tagName, limit)); } diff --git a/NationBuilderAPI/V1/Session/Webhooks.cs b/NationBuilderAPI/V1/Session/Webhooks.cs index 441dddf..38ff73b 100644 --- a/NationBuilderAPI/V1/Session/Webhooks.cs +++ b/NationBuilderAPI/V1/Session/Webhooks.cs @@ -7,7 +7,7 @@ namespace NationBuilderAPI.V1 { - public partial class NationBuilderSession : Http.NationBuilderHttpTransport + public partial class NationBuilderSession { /// /// Returns a paginated list of the webhooks the nation has already registered with this endpoint. diff --git a/NationBuilderAPIv1UnitTests/NationBuilderAPIv1UnitTests.csproj b/NationBuilderAPIv1UnitTests/NationBuilderAPIv1UnitTests.csproj index e966a85..6e9ec56 100644 --- a/NationBuilderAPIv1UnitTests/NationBuilderAPIv1UnitTests.csproj +++ b/NationBuilderAPIv1UnitTests/NationBuilderAPIv1UnitTests.csproj @@ -39,6 +39,7 @@ + @@ -65,6 +66,7 @@ Settings.settings + True True @@ -73,10 +75,10 @@ - - + + - + diff --git a/NationBuilderAPIv1UnitTests/V1/CustomFieldsSession/CustomPeopleTests.cs b/NationBuilderAPIv1UnitTests/V1/CustomFieldsSession/CustomPeopleTests.cs new file mode 100644 index 0000000..53feb2b --- /dev/null +++ b/NationBuilderAPIv1UnitTests/V1/CustomFieldsSession/CustomPeopleTests.cs @@ -0,0 +1,56 @@ +using System; +using System.Net; +using System.Runtime.Serialization; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +using NationBuilderAPI.V1; +using NationBuilderAPIv1UnitTests.V1; + +namespace NationBuilderAPIv1UnitTests.V1.CustomFieldsSession +{ + [TestClass] + public class CustomPeopleTests : NationBuilderSessionTests + { + [DataContract] + class CustomPerson : Person + { + [DataMember] + double height; + } + + [DataContract] + class CustomDonation : Donation + { + [DataMember] + string in_memory_of; + } + + + [TestMethod] + public void ShowPerson() + { + using (var session = new NationBuilderSession(TestNationSlug, TestNationAccessToken)) + { + var personMeResponse = session.PersonMe(); + var personMe = personMeResponse.person; + + Assert.IsTrue(personMe.id.HasValue); + + var shownPersonResponse = session.ShowPerson(personMe.id.Value); + var shownPerson = shownPersonResponse.person; + + Assert.AreEqual(personMe, shownPerson); + + // Make sure equality testing is, possibly, functioning: + shownPerson.first_name += "suff"; + Assert.AreNotEqual(shownPerson, personMe); + + shownPerson.first_name = personMe.first_name; + Assert.AreEqual(shownPerson, personMe); + + shownPerson.author_id += "suff"; + Assert.AreNotEqual(shownPerson, personMe); + } + } + } +} diff --git a/NationBuilderAPIv1UnitTests/V1/Session/NationBuilderSessionTests.cs b/NationBuilderAPIv1UnitTests/V1/NationBuilderSessionTests.cs similarity index 87% rename from NationBuilderAPIv1UnitTests/V1/Session/NationBuilderSessionTests.cs rename to NationBuilderAPIv1UnitTests/V1/NationBuilderSessionTests.cs index fe4b571..43e9683 100644 --- a/NationBuilderAPIv1UnitTests/V1/Session/NationBuilderSessionTests.cs +++ b/NationBuilderAPIv1UnitTests/V1/NationBuilderSessionTests.cs @@ -4,10 +4,10 @@ namespace NationBuilderAPIv1UnitTests.V1 { [TestClass] - public partial class NationBuilderSessionTests + public class NationBuilderSessionTests { - string TestNationSlug; - string TestNationAccessToken; + protected string TestNationSlug; + protected string TestNationAccessToken; public NationBuilderSessionTests() { diff --git a/NationBuilderAPIv1UnitTests/V1/Serialization/Person.cs b/NationBuilderAPIv1UnitTests/V1/Serialization/Person.cs index 21efcd4..51462a4 100644 --- a/NationBuilderAPIv1UnitTests/V1/Serialization/Person.cs +++ b/NationBuilderAPIv1UnitTests/V1/Serialization/Person.cs @@ -15,13 +15,13 @@ public void ShowPersonDeserialization() { string personJson; var httpTransport = new NationBuilderHttpTransport(); - PersonResponse res; + PersonResponse res; personJson = DeserializationTestCases.ShowPersonResponse_withNullDonationFields_json; - res = httpTransport.DeserializeNationBuilderObject(personJson.ToMemoryStream()); + res = httpTransport.DeserializeNationBuilderObject>(personJson.ToMemoryStream()); personJson = DeserializationTestCases.ShowPersonResponse_withAuthorField_json; - res = httpTransport.DeserializeNationBuilderObject(personJson.ToMemoryStream()); + res = httpTransport.DeserializeNationBuilderObject>(personJson.ToMemoryStream()); } } } diff --git a/NationBuilderAPIv1UnitTests/V1/Session/Contacts.cs b/NationBuilderAPIv1UnitTests/V1/Session/Contacts.cs index 62893eb..9c134e9 100644 --- a/NationBuilderAPIv1UnitTests/V1/Session/Contacts.cs +++ b/NationBuilderAPIv1UnitTests/V1/Session/Contacts.cs @@ -4,10 +4,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using NationBuilderAPI.V1; +using NationBuilderAPIv1UnitTests.V1; namespace NationBuilderAPIv1UnitTests.V1 { - public partial class NationBuilderSessionTests + [TestClass] + public class ContactsTests : NationBuilderSessionTests { [TestMethod] public void GetContactsToPersonResults() diff --git a/NationBuilderAPIv1UnitTests/V1/Session/Lists.cs b/NationBuilderAPIv1UnitTests/V1/Session/Lists.cs index 40be11c..237bb90 100644 --- a/NationBuilderAPIv1UnitTests/V1/Session/Lists.cs +++ b/NationBuilderAPIv1UnitTests/V1/Session/Lists.cs @@ -4,10 +4,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using NationBuilderAPI.V1; +using NationBuilderAPIv1UnitTests.V1; namespace NationBuilderAPIv1UnitTests.V1 { - public partial class NationBuilderSessionTests + [TestClass] + public class ListsTests : NationBuilderSessionTests { [TestMethod] public void GetListsResults() diff --git a/NationBuilderAPIv1UnitTests/V1/Session/PeopleTags.cs b/NationBuilderAPIv1UnitTests/V1/Session/PeopleTagsTests.cs similarity index 78% rename from NationBuilderAPIv1UnitTests/V1/Session/PeopleTags.cs rename to NationBuilderAPIv1UnitTests/V1/Session/PeopleTagsTests.cs index 059842b..d4e919c 100644 --- a/NationBuilderAPIv1UnitTests/V1/Session/PeopleTags.cs +++ b/NationBuilderAPIv1UnitTests/V1/Session/PeopleTagsTests.cs @@ -3,10 +3,12 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using NationBuilderAPI.V1; +using NationBuilderAPIv1UnitTests.V1; -namespace NationBuilderAPIv1UnitTests.V1 +namespace NationBuilderAPIv1UnitTests.V1.Session { - public partial class NationBuilderSessionTests + [TestClass] + public class PeopleTagsTests : NationBuilderSessionTests { [TestMethod] public void GetPeopleTagResults_GetPeopleWithTagResults() diff --git a/NationBuilderAPIv1UnitTests/V1/Session/People.cs b/NationBuilderAPIv1UnitTests/V1/Session/PeopleTests.cs similarity index 95% rename from NationBuilderAPIv1UnitTests/V1/Session/People.cs rename to NationBuilderAPIv1UnitTests/V1/Session/PeopleTests.cs index be2fbd1..d06625e 100644 --- a/NationBuilderAPIv1UnitTests/V1/Session/People.cs +++ b/NationBuilderAPIv1UnitTests/V1/Session/PeopleTests.cs @@ -4,9 +4,10 @@ using NationBuilderAPI.V1; -namespace NationBuilderAPIv1UnitTests.V1 +namespace NationBuilderAPIv1UnitTests.V1.Session { - public partial class NationBuilderSessionTests + [TestClass] + public class PeopleTests : NationBuilderSessionTests { [TestMethod] public void GetPeopleResults() From a0fcf62f4515704848735c9a8470962cc1031c97 Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Fri, 22 Jan 2016 22:46:06 -0500 Subject: [PATCH 2/7] I-0002: Added a custom fields example to . --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/README.md b/README.md index 9f3b104..98a29e9 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,36 @@ private bool NationBuilder_WebhookRequest_CheckAccess( ``` +### Use Custom Fields + +```C# +[DataContract] +class CustomPerson : Person +{ + [DataMember] + double height; +} + +[DataContract] +class CustomDonation : Donation +{ + [DataMember] + string in_memory_of; +} + + +public void UseCustomFields() +{ + using (var session = new NationBuilderSession(nationSlug, nationAccessToken)) + { + var shownPersonResponse = session.ShowPerson("123"); + CustomPerson shownPerson = shownPersonResponse.person; + // . . . + } +} +``` + + License ------- From 04e5ab187b54a10c145f2483956d51daf30f408b Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Fri, 22 Jan 2016 22:48:02 -0500 Subject: [PATCH 3/7] I-0002: Stylistic fixes to . --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 98a29e9..3fa2619 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,8 @@ class CustomPerson : Person { [DataMember] double height; + + // . . . } [DataContract] @@ -85,6 +87,8 @@ class CustomDonation : Donation { [DataMember] string in_memory_of; + + // . . . } @@ -94,7 +98,8 @@ public void UseCustomFields() { var shownPersonResponse = session.ShowPerson("123"); CustomPerson shownPerson = shownPersonResponse.person; - // . . . + + // . . . } } ``` From 350849fcfc3570f71770dc7edad7df5dc3215100 Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Fri, 22 Jan 2016 23:02:48 -0500 Subject: [PATCH 4/7] I-0002: Updated WebhookPayload types to support custom fields types. --- NationBuilderAPI/V1/Webhooks/V4/DonationWebhookPayload.cs | 8 ++++++-- NationBuilderAPI/V1/Webhooks/V4/PersonWebhookPayload.cs | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/NationBuilderAPI/V1/Webhooks/V4/DonationWebhookPayload.cs b/NationBuilderAPI/V1/Webhooks/V4/DonationWebhookPayload.cs index 178851a..710c249 100644 --- a/NationBuilderAPI/V1/Webhooks/V4/DonationWebhookPayload.cs +++ b/NationBuilderAPI/V1/Webhooks/V4/DonationWebhookPayload.cs @@ -6,9 +6,13 @@ namespace NationBuilderAPI.V1.Webhooks.V4 { [DataContract] - public class DonationWebhookPayload + public class DonationWebhookPayload { [DataMember] - public Donation donation; + public DonationType donation; } + + [DataContract] + public class DonationWebhookPayload : DonationWebhookPayload + { } } diff --git a/NationBuilderAPI/V1/Webhooks/V4/PersonWebhookPayload.cs b/NationBuilderAPI/V1/Webhooks/V4/PersonWebhookPayload.cs index fa79b82..00374f2 100644 --- a/NationBuilderAPI/V1/Webhooks/V4/PersonWebhookPayload.cs +++ b/NationBuilderAPI/V1/Webhooks/V4/PersonWebhookPayload.cs @@ -10,9 +10,13 @@ namespace NationBuilderAPI.V1.Webhooks.V4 /// The payload structure submitted in "Person created", "Person changed", "Person contacted", "Person destroyed" webhook call-back posts. /// [DataContract] - public class PersonWebhookPayload + public class PersonWebhookPayload { [DataMember] - public WebhookPerson person; + public WebhookPersonType person; } + + [DataContract] + public class PersonWebhookPayload : PersonWebhookPayload + { } } From f0ed55112a0df235f10e8aba5085c9e782a06b61 Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Fri, 12 Feb 2016 12:11:13 -0500 Subject: [PATCH 5/7] Added magration intsructions from pre-custom-field versions to . --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 3fa2619..0a19ec6 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,21 @@ public void UseCustomFields() ``` +Migration from v. 1.2 and Earlier +--------------------------------- + +* Since the addition of custom fields, methods returning `PersonResponse` now take a type parameter for the + custom `Person` type: + +```C# +// Convert: +NationBuilderAPI.V1.PersonResponse res; + +// into: +NationBuilderAPI.V1.PersonResponse res; +``` + + License ------- From ebc2ea4263b7829b8ee94dbbda99ae6633eb6b63 Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Fri, 12 Feb 2016 12:12:12 -0500 Subject: [PATCH 6/7] Increased assembly version number. --- NationBuilderAPI.v12.suo | Bin 266752 -> 299520 bytes NationBuilderAPI/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NationBuilderAPI.v12.suo b/NationBuilderAPI.v12.suo index 9a66bf5d8940503d158a8aeeb58c87a637316e9c..5d6a4fb6eef03995776065a3d880f5e95600a224 100644 GIT binary patch delta 10974 zcmeHN3tW_Cx}WELKZY3?hY<)-2?qisBS1n#MIFFcB}7p3N;oKx7y-g)gck<0?S_c+ z8c%C&(Zp)Mwk_9b{p_+WUba)Nt5}`gvWu*xr`%3U9yB$Tecl;vl9rv_J!kiK&d2XR z@8x@M-~0Zb|9ivUVzRgRH>SW1n;Iko~^`Dyl8(R5F1l@@Sw>|qlq?A6g?&Z%8=R# z)m2Jv0fD^k=PmN*5P}Hd1U+F6VF=+i!Yzc|pwSE>*P9Sa*h}I0zET46=92F^N_i`}zoX_^$c-XQCG4TFj@*%iiG-Pi*@O{dyR7u0hXu0m9u`P{Hw)aAN)pJpFmeZyz>DI(j|2sj zMv_35AsIPL8P@WA_VR`PCGV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ca$)%?${U#rzVJE`Sh-iX=}@Pb3n1B$A1V__n(Y-yTTWrOP4N|(J4@*2 KtC<}z Date: Fri, 12 Feb 2016 12:31:56 -0500 Subject: [PATCH 7/7] Updated year, and changelog in the <.nuspec>. --- NationBuilderAPI.1.3.0.nuspec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NationBuilderAPI.1.3.0.nuspec b/NationBuilderAPI.1.3.0.nuspec index 917cc24..f192f2b 100644 --- a/NationBuilderAPI.1.3.0.nuspec +++ b/NationBuilderAPI.1.3.0.nuspec @@ -17,6 +17,8 @@ Changes since v. 1.2.0: ## Improvements +* Added alpha support for custom fields. + * Added convenience methods for working with a person's e-mail IDs. * Added deserialization of `validation_errors` in Nation Builder remote exceptions. @@ -97,7 +99,7 @@ Changes since v. 1.0.0: * Added data structures for receiving webhook HTTP requests from Nation Builder in .NET WCF services. - Copyright 2014-2015 Pavel M. Penev. + Copyright 2014-2016 Pavel M. Penev.