-
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 Senate Nomination Votes endpoint.
- Loading branch information
1 parent
27a3e79
commit ea7c7e6
Showing
9 changed files
with
150 additions
and
2 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,34 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
|
||
namespace ProPublicaCongressAPI.Contracts | ||
{ | ||
public class SenateNominationVote | ||
{ | ||
public int Congress { get; set; } | ||
|
||
public int Session { get; set; } | ||
|
||
public int RollCallNumber { get; set; } | ||
|
||
public string Question { get; set; } | ||
|
||
public string Description { get; set; } | ||
|
||
public string VoteType { get; set; } | ||
|
||
public DateTime DateTimeVoted { get; set; } | ||
|
||
public string Result { get; set; } | ||
|
||
public string NomineeDetailUrl { get; set; } | ||
|
||
public RollCallVoteSummaryDemocratic DemocraticVoteSummary { get; set; } | ||
|
||
public RollCallVoteSummaryRepublican RepublicanVoteSummary { get; set; } | ||
|
||
public RollCallVoteSummaryIndependent IndependentVoteSummary { get; set; } | ||
|
||
public RollCallVoteSummaryTotal TotalVoteSummary { get; set; } | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
ProPublicaCongressAPI/Contracts/SenateNominationVoteContainer.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,14 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace ProPublicaCongressAPI.Contracts | ||
{ | ||
public class SenateNominationVoteContainer | ||
{ | ||
public int TotalVotes { get; set; } | ||
|
||
public int Offset { get; set; } | ||
|
||
public IReadOnlyCollection<SenateNominationVote> 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
49 changes: 49 additions & 0 deletions
49
ProPublicaCongressAPI/InternalModels/SenateNominationVote.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,49 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ProPublicaCongressAPI.InternalModels | ||
{ | ||
internal class SenateNominationVote | ||
{ | ||
[JsonProperty("congress")] | ||
public int Congress { get; set; } | ||
|
||
[JsonProperty("session")] | ||
public int Session { get; set; } | ||
|
||
[JsonProperty("roll_call")] | ||
public int RollCallNumber { get; set; } | ||
|
||
[JsonProperty("question")] | ||
public string Question { get; set; } | ||
|
||
[JsonProperty("description")] | ||
public string Description { get; set; } | ||
|
||
[JsonProperty("vote_type")] | ||
public string VoteType { get; set; } | ||
|
||
[JsonProperty("date")] | ||
public string DateVoted { get; set; } | ||
|
||
[JsonProperty("time")] | ||
public string TimeVoted { get; set; } | ||
|
||
[JsonProperty("result")] | ||
public string Result { get; set; } | ||
|
||
[JsonProperty("nominee_uri")] | ||
public string NomineeDetailUrl { get; set; } | ||
|
||
[JsonProperty("democratic")] | ||
public RollCallVoteSummaryDemocratic DemocraticVoteSummary { get; set; } | ||
|
||
[JsonProperty("republican")] | ||
public RollCallVoteSummaryRepublican RepublicanVoteSummary { get; set; } | ||
|
||
[JsonProperty("independent")] | ||
public RollCallVoteSummaryIndependent IndependentVoteSummary { get; set; } | ||
|
||
[JsonProperty("total")] | ||
public RollCallVoteSummaryTotal TotalVoteSummary { get; set; } | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
ProPublicaCongressAPI/InternalModels/SenateNominationVoteContainer.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,17 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace ProPublicaCongressAPI.InternalModels | ||
{ | ||
internal class SenateNominationVoteContainer | ||
{ | ||
[JsonProperty("total_votes")] | ||
public int TotalVotes { get; set; } | ||
|
||
[JsonProperty("offset")] | ||
public int Offset { get; set; } | ||
|
||
[JsonProperty("votes")] | ||
public IReadOnlyCollection<SenateNominationVote> 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
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