| 4 | import gov.loc.Config; |
| 5 | |
| 6 | public class Bill { |
| 7 | |
| 8 | private static final String CHAMBER = Config.getBillChamber(); |
| 9 | private static final String NUMBER = Config.getBillNumber(); |
| 10 | private static final String URL = Config.getBillUrl(); |
| 11 | private static final String CONGRESS = Config.getBillCongress(); |
| 12 | |
| 13 | private static final String ROOT_URL = Config.getRootUrl(); |
| 14 | |
| 15 | /** |
| 16 | * runAllBillMethods |
| 17 | * |
| 18 | * Runs all the bill endpoints against the API |
| 19 | * |
| 20 | */ |
| 21 | public static void runAllBillMethods() { |
| 22 | getAllBills(); |
| 23 | getAllBillsForCongress(); |
| 24 | getAllBillsForCongressionalChamber(); |
| 25 | getABillsDetails(); |
| 26 | getABillsActions(); |
| 27 | getABillsAmendments(); |
| 28 | getABillsCommittees(); |
| 29 | getABillsCosponsors(); |
| 30 | getABillsRelatedBills(); |
| 31 | getABillsSubjects(); |
| 32 | getABillsSummaries(); |
| 33 | getABillsTexts(); |
| 34 | getABillsTitles(); |
| 35 | } |
| 36 | |
| 37 | /** |
| 38 | * getAllBills |
| 39 | * |
| 40 | * Gets all bills |
| 41 | * |
| 42 | */ |
| 43 | public static void getAllBills() { |
| 44 | String url = String.format("%s/%s", ROOT_URL, URL); |
| 45 | CDGClient.makeRequestAndOutputResponse(url); |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * getAllBillsForCongress |
| 50 | * |
| 51 | * Gets all bills for the specified congress |
| 52 | */ |
| 53 | public static void getAllBillsForCongress() { |
| 54 | String url = String.format("%s/%s/%s", ROOT_URL, URL, CONGRESS); |
| 55 | CDGClient.makeRequestAndOutputResponse(url); |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * getAllBillsForCongressionalChamber |
| 60 | * |
| 61 | * Gets all bills for the specified congress and chamber |
| 62 | * |
| 63 | */ |
nothing calls this directly
no test coverage detected