-
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 member bill cosponsorship endpoint.
- Loading branch information
1 parent
7317789
commit 4480a11
Showing
8 changed files
with
154 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace ProPublicaCongressAPI.Contracts | ||
{ | ||
public enum CosponsorBillType | ||
{ | ||
Unknown, | ||
Cosponsored, | ||
Withdrawn | ||
} | ||
} |
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,30 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace ProPublicaCongressAPI.Contracts | ||
{ | ||
public class MemberBillCosponsored | ||
{ | ||
public int Congress { get; set; } | ||
|
||
public string Number { get; set; } | ||
|
||
public string BillDetailUrl { get; set; } | ||
|
||
public string Title { get; set; } | ||
|
||
public DateTime DateCosponsored { get; set; } | ||
|
||
public string SponsorMemberId { get; set; } | ||
|
||
public DateTime DateIntroduced { get; set; } | ||
|
||
public int CosponsorCount { get; set; } | ||
|
||
public string PrimarySubject { get; set; } | ||
|
||
public DateTime DateLastMajorAction { get; set; } | ||
|
||
public string LastMajorAction { get; set; } | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
ProPublicaCongressAPI/Contracts/MemberBillsCosponsoredContainer.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,20 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace ProPublicaCongressAPI.Contracts | ||
{ | ||
public class MemberBillsCosponsoredContainer | ||
{ | ||
public string MemberId { get; set; } | ||
|
||
public string MemberDetailUrl { get; set; } | ||
|
||
public string MemberName { get; set; } | ||
|
||
public int NumberOfResults { get; set; } | ||
|
||
public int Offset { get; set; } | ||
|
||
public IReadOnlyCollection<MemberBillCosponsored> Bills { get; set; } | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
ProPublicaCongressAPI/InternalModels/MemberBillCosponsored.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,41 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace ProPublicaCongressAPI.InternalModels | ||
{ | ||
internal class MemberBillCosponsored | ||
{ | ||
[JsonProperty("congress")] | ||
public int Congress { get; set; } | ||
|
||
[JsonProperty("number")] | ||
public string Number { get; set; } | ||
|
||
[JsonProperty("bill_uri")] | ||
public string BillDetailUrl { get; set; } | ||
|
||
[JsonProperty("title")] | ||
public string Title { get; set; } | ||
|
||
[JsonProperty("cosponsored_date")] | ||
public DateTime DateCosponsored { get; set; } | ||
|
||
[JsonProperty("sponsor_id")] | ||
public string SponsorMemberId { get; set; } | ||
|
||
[JsonProperty("introduced_date")] | ||
public DateTime DateIntroduced { get; set; } | ||
|
||
[JsonProperty("cosponsors")] | ||
public int CosponsorCount { get; set; } | ||
|
||
[JsonProperty("primary_subject")] | ||
public string PrimarySubject { get; set; } | ||
|
||
[JsonProperty("latest_major_action_date")] | ||
public DateTime DateLastMajorAction { get; set; } | ||
|
||
[JsonProperty("latest_major_action")] | ||
public string LastMajorAction { get; set; } | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
ProPublicaCongressAPI/InternalModels/MemberBillsCosponsoredContainer.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,26 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace ProPublicaCongressAPI.InternalModels | ||
{ | ||
internal class MemberBillsCosponsoredContainer | ||
{ | ||
[JsonProperty("id")] | ||
public string MemberId { get; set; } | ||
|
||
[JsonProperty("member_uri")] | ||
public string MemberDetailUrl { get; set; } | ||
|
||
[JsonProperty("name")] | ||
public string MemberName { get; set; } | ||
|
||
[JsonProperty("num_results")] | ||
public int NumberOfResults { get; set; } | ||
|
||
[JsonProperty("offset")] | ||
public int Offset { get; set; } | ||
|
||
[JsonProperty("bills")] | ||
public IReadOnlyCollection<MemberBillCosponsored> Bills { 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
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