MCPcopy Create free account
hub / github.com/LibraryOfCongress/api.congress.gov / Bill

Class Bill

api_client/java/src/sample/Bill.java:6–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import gov.loc.Config;
5
6public 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 */

Callers

nothing calls this directly

Calls 5

getBillChamberMethod · 0.95
getBillNumberMethod · 0.95
getBillUrlMethod · 0.95
getBillCongressMethod · 0.95
getRootUrlMethod · 0.95

Tested by

no test coverage detected