-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added resolvers for DateTime and DateTime nullable.
Added endpoints for Specific Bill endpoint.
- Loading branch information
1 parent
5f32ef2
commit 4712cf7
Showing
13 changed files
with
295 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace ProPublicaCongressAPI.Contracts | ||
{ | ||
public class SpecificBill | ||
{ | ||
public int Congress { get; set; } | ||
public string BillNumber { get; set; } | ||
public string BillDetailUrl { get; set; } | ||
public string BillTitle { get; set; } | ||
public string SponsorMemberName { get; set; } | ||
public string SponsorMemberDetailUrl { get; set; } | ||
public string BillDocumentPdfUrl { get; set; } | ||
public DateTime DateIntroduced { get; set; } | ||
public int CosponsorCount { get; set; } | ||
public string PrimarySubject { get; set; } | ||
public string Committees { get; set; } | ||
public DateTime DateLatestMajorAction { get; set; } | ||
public string LatestMajorAction { get; set; } | ||
public DateTime? DateHousePassageVote { get; set; } | ||
public DateTime? DateSenatePassageVote { get; set; } | ||
public IReadOnlyCollection<SpecificBillAction> Actions { get; set; } | ||
public IReadOnlyCollection<SpecificBillVoteSummary> Votes { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using System; | ||
|
||
namespace ProPublicaCongressAPI.Contracts | ||
{ | ||
public class SpecificBillAction | ||
{ | ||
public DateTime DateTimeOccurred { get; set; } | ||
|
||
public string Description { get; set; } | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
ProPublicaCongressAPI/Contracts/SpecificBillVoteSummary.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
|
||
namespace ProPublicaCongressAPI.Contracts | ||
{ | ||
public class SpecificBillVoteSummary | ||
{ | ||
public string Chamber { get; set; } | ||
|
||
public DateTime DateTimeVoted { get; set; } | ||
|
||
public int RollCallNumber { get; set; } | ||
|
||
public string Question { get; set; } | ||
|
||
public string Result { get; set; } | ||
|
||
public int TotalYesVoteCount { get; set; } | ||
|
||
public int TotalNoVoteCount { get; set; } | ||
|
||
public int TotalNotVotingCount { get; set; } | ||
|
||
public string VoteDetailUrl { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace ProPublicaCongressAPI.InternalModels | ||
{ | ||
internal class SpecificBill | ||
{ | ||
[JsonProperty("datetime")] | ||
public int Congress { get; set; } | ||
|
||
[JsonProperty("bill")] | ||
public string BillNumber { get; set; } | ||
|
||
[JsonProperty("bill_uri")] | ||
public string BillDetailUrl { get; set; } | ||
|
||
[JsonProperty("title")] | ||
public string BillTitle { get; set; } | ||
|
||
[JsonProperty("sponsor")] | ||
public string SponsorMemberName { get; set; } | ||
|
||
[JsonProperty("sponsor_uri")] | ||
public string SponsorMemberDetailUrl { get; set; } | ||
|
||
[JsonProperty("gpo_pdf_uri")] | ||
public string BillDocumentPdfUrl { get; set; } | ||
|
||
[JsonProperty("introduced_date")] | ||
public string DateIntroduced { get; set; } | ||
|
||
[JsonProperty("cosponsors")] | ||
public int CosponsorCount { get; set; } | ||
|
||
[JsonProperty("primary_subject")] | ||
public string PrimarySubject { get; set; } | ||
|
||
[JsonProperty("committees")] | ||
public string Committees { get; set; } | ||
|
||
[JsonProperty("latest_major_action_date")] | ||
public string DateLatestMajorAction { get; set; } | ||
|
||
[JsonProperty("latest_major_action")] | ||
public string LatestMajorAction { get; set; } | ||
|
||
[JsonProperty("house_passage_vote")] | ||
public string DateHousePassageVote { get; set; } | ||
|
||
[JsonProperty("senate_passage_vote")] | ||
public string DateSenatePassageVote { get; set; } | ||
|
||
[JsonProperty("actions")] | ||
public IReadOnlyCollection<SpecificBillAction> Actions { get; set; } | ||
|
||
[JsonProperty("votes")] | ||
public IReadOnlyCollection<SpecificBillVoteSummary> Votes { get; set; } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
ProPublicaCongressAPI/InternalModels/SpecificBillAction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ProPublicaCongressAPI.InternalModels | ||
{ | ||
internal class SpecificBillAction | ||
{ | ||
[JsonProperty("datetime")] | ||
public string DateTimeOccurred { get; set; } | ||
|
||
[JsonProperty("description")] | ||
public string Description { get; set; } | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
ProPublicaCongressAPI/InternalModels/SpecificBillVoteSummary.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ProPublicaCongressAPI.InternalModels | ||
{ | ||
internal class SpecificBillVoteSummary | ||
{ | ||
[JsonProperty("chamber")] | ||
public string Chamber { get; set; } | ||
|
||
[JsonProperty("date")] | ||
public string DateVoted { get; set; } | ||
|
||
[JsonProperty("time")] | ||
public string TimeVoted { get; set; } | ||
|
||
[JsonProperty("roll_call")] | ||
public int RollCallNumber { get; set; } | ||
|
||
[JsonProperty("question")] | ||
public string Question { get; set; } | ||
|
||
[JsonProperty("result")] | ||
public string Result { get; set; } | ||
|
||
[JsonProperty("total_yes")] | ||
public int TotalYesVoteCount { get; set; } | ||
|
||
[JsonProperty("total_no")] | ||
public int TotalNoVoteCount { get; set; } | ||
|
||
[JsonProperty("total_not_voting")] | ||
public int TotalNotVotingCount { get; set; } | ||
|
||
[JsonProperty("api_url")] | ||
public string VoteDetailUrl { get; set; } | ||
} | ||
} |
Oops, something went wrong.