Skip to content

Commit

Permalink
Merge pull request #12 from lafritay/taylor/mocks
Browse files Browse the repository at this point in the history
Allow ProPublicaCongressApiClient to be mocked
  • Loading branch information
babelshift authored Aug 9, 2017
2 parents 5f218a0 + de9c045 commit 432bee9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions ProPublicaCongressAPI/IProPublicaCongressApiClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using ProPublicaCongressAPI.Contracts;

namespace ProPublicaCongressAPI
{
public interface IProPublicaCongressApiClient
{
Task<MemberBillSponsorshipComparisonContainer> CompareMemberBillSponsorships(string firstMemberId, string secondMemberId, int congress, Chamber chamber);
Task<IReadOnlyCollection<MemberVoteComparison>> CompareMemberVotes(string firstMemberId, string secondMemberId, int congress, Chamber chamber);
Task<BillCosponsorContainer> GetBillCosponsors(int congress, string billId);
Task<MemberBillsCosponsoredContainer> GetBillsCosponsoredByMember(string memberId, CosponsorBillType type);
Task<CommitteesContainer> GetCommitttees(int congress, Chamber chamber);
Task<IReadOnlyCollection<CurrentMember>> GetCurrentMembersAsync(Chamber chamber, string state, int? district = null);
Task<Member> GetMemberAsync(string memberId);
Task<MembersContainer> GetMembersAsync(int congress, Chamber chamber);
Task<MemberVotesContainer> GetMemberVotesAsync(string memberId);
Task<NewMembersContainer> GetNewMembersAsync();
Task<IReadOnlyCollection<NomineeByState>> GetNomineesByState(int congress, string state);
Task<RecentBillsContainer> GetRecentBills(int congress, Chamber chamber, RecentBillType billType, int? offset = null);
Task<RecentBillsByMemberContainer> GetRecentBillsByMember(string memberId, RecentBillByMemberType billType, int? offset = null);
Task<IReadOnlyCollection<RecentNomination>> GetRecentNominations(int congress, RecentNominationType nominationType);
Task<SenateNominationVoteContainer> GetSenateNominationVotes(int congress);
Task<SpecificBill> GetSpecificBill(int congress, string billId);
Task<SpecificBillDetail> GetSpecificBillDetail(int congress, string billId, SpecificBillDetailType billDetailType);
Task<SpecificCommittee> GetSpecificCommittee(int congress, Chamber chamber, string committeeId);
Task<SpecificNomination> GetSpecificNomination(int congress, string nominationId);
Task<RollCallVote> GetSpecificRollCallVote(int congress, Chamber chamber, Session session, int rollCallNumber);
Task<VoteByDateContainer> GetVotesByDate(Chamber chamber, int year, int month);
Task<VoteByTypeContainer> GetVotesByType(int congress, Chamber chamber, VoteAggregateCategory voteType);
}
}
2 changes: 1 addition & 1 deletion ProPublicaCongressAPI/ProPublicaCongressApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace ProPublicaCongressAPI
{
public class ProPublicaCongressApiClient
public class ProPublicaCongressApiClient : IProPublicaCongressApiClient
{
private readonly string apiKey;

Expand Down

0 comments on commit 432bee9

Please sign in to comment.