Skip to content

Commit

Permalink
Adding new properties to SpecificBill
Browse files Browse the repository at this point in the history
  • Loading branch information
lafritay committed Jun 26, 2017
1 parent 5250b52 commit 0505294
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ProPublicaCongressAPI.Contracts/SpecificBill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,39 @@ namespace ProPublicaCongressAPI.Contracts
{
public class SpecificBill
{
public string BillId { get; set; }
public int Congress { get; set; }
public string BillNumber { get; set; }
public string BillType { get; set; }
public string BillDetailUrl { get; set; }
public string BillTitle { get; set; }
public string SponsorMemberName { get; set; }
public string SponsorId { get; set; }
public string SponsorMemberDetailUrl { get; set; }
public string SponsorParty { get; set; }
public string SponsorState { get; set; }
public string BillDocumentPdfUrl { get; set; }
public string CongressDotGovUrl { get; set; }
public string GovTrackUrl { get; set; }
public DateTime DateIntroduced { get; set; }
public bool Active { get; set; }
public string HousePassage { get; set; }
public string SenatePassage { get; set; }
public string Enacted { get; set; }
public string Vetoed { get; set; }
public int CosponsorCount { get; set; }
public int WithdrawnCosponsorCount { get; set; }
public string PrimarySubject { get; set; }
public string Committees { get; set; }
public string[] CommitteeCodes { get; set; }
public string[] SubcommitteeCodes { get; set; }
public DateTime DateLatestMajorAction { get; set; }
public string LatestMajorAction { get; set; }
public DateTime? DateLastVote { get; set; }
public DateTime? DateHousePassageVote { get; set; }
public DateTime? DateSenatePassageVote { get; set; }
public string Summary { get; set; }
public string SummaryShort { get; set; }
public IReadOnlyCollection<SpecificBillAction> Actions { get; set; }
public IReadOnlyCollection<SpecificBillVoteSummary> Votes { get; set; }
}
Expand Down
2 changes: 2 additions & 0 deletions ProPublicaCongressAPI/AutoMapperConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ public static void Initialize()
x.CreateMap<InternalModels.SpecificBill, Contracts.SpecificBill>()
.ForMember(dest => dest.DateIntroduced,
opts => opts.ResolveUsing<DateTimeResolver, string>(s => s.DateIntroduced))
.ForMember(dest => dest.DateLastVote,
opts => opts.ResolveUsing<NullableDateTimeResolver, string>(s => s.DateLastVote))
.ForMember(dest => dest.DateHousePassageVote,
opts => opts.ResolveUsing<NullableDateTimeResolver, string>(s => s.DateHousePassageVote))
.ForMember(dest => dest.DateSenatePassageVote,
Expand Down
54 changes: 54 additions & 0 deletions ProPublicaCongressAPI/InternalModels/SpecificBill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ namespace ProPublicaCongressAPI.InternalModels
{
internal class SpecificBill
{
[JsonProperty("bill_id")]
public string BillId { get; set; }

[JsonProperty("datetime")]
public int Congress { get; set; }

[JsonProperty("bill")]
public string BillNumber { get; set; }

[JsonProperty("bill_type")]
public string BillType { get; set; }

[JsonProperty("bill_uri")]
public string BillDetailUrl { get; set; }

Expand All @@ -20,36 +26,84 @@ internal class SpecificBill
[JsonProperty("sponsor")]
public string SponsorMemberName { get; set; }

[JsonProperty("sponsor_id")]
public string SponsorId { get; set; }

[JsonProperty("sponsor_uri")]
public string SponsorMemberDetailUrl { get; set; }

[JsonProperty("sponsor_party")]
public string SponsorParty { get; set; }

[JsonProperty("sponsor_state")]
public string SponsorState { get; set; }

[JsonProperty("gpo_pdf_uri")]
public string BillDocumentPdfUrl { get; set; }

[JsonProperty("congressdotgov_url")]
public string CongressDotGovUrl { get; set; }

[JsonProperty("govtrack_url")]
public string GovTrackUrl { get; set; }

[JsonProperty("introduced_date")]
public string DateIntroduced { get; set; }

[JsonProperty("active")]
public bool Active { get; set; }

[JsonProperty("house_passage")]
public string HousePassage { get; set; }

[JsonProperty("senate_passage")]
public string SenatePassage { get; set; }

[JsonProperty("enacted")]
public string Enacted { get; set; }

[JsonProperty("vetoed")]
public string Vetoed { get; set; }

[JsonProperty("cosponsors")]
public int CosponsorCount { get; set; }

[JsonProperty("withdrawn_cosponsors")]
public int WithdrawnCosponsorCount { get; set; }

[JsonProperty("primary_subject")]
public string PrimarySubject { get; set; }

[JsonProperty("committees")]
public string Committees { get; set; }

[JsonProperty("committee_codes")]
public string[] CommitteeCodes { get; set; }

[JsonProperty("subcommittee_codes")]
public string[] SubcommitteeCodes { get; set; }

[JsonProperty("latest_major_action_date")]
public string DateLatestMajorAction { get; set; }

[JsonProperty("latest_major_action")]
public string LatestMajorAction { get; set; }

[JsonProperty("last_vote_date")]
public string DateLastVote { get; set; }

[JsonProperty("house_passage_vote")]
public string DateHousePassageVote { get; set; }

[JsonProperty("senate_passage_vote")]
public string DateSenatePassageVote { get; set; }

[JsonProperty("summary")]
public string Summary { get; set; }

[JsonProperty("summary_short")]
public string SummaryShort { get; set; }

[JsonProperty("actions")]
public IReadOnlyCollection<SpecificBillAction> Actions { get; set; }

Expand Down

0 comments on commit 0505294

Please sign in to comment.