Skip to content

Commit

Permalink
Update README: url string to create an instance of Bill()
Browse files Browse the repository at this point in the history
  • Loading branch information
KipCrossing committed Feb 24, 2020
1 parent 3a0220d commit 01b7564
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ print(all_bills)
bill_five = all_bills.data[5]
```

`all_bills.data` is a list of all current bills and some basic data in the form of a dict. The rest of the data may be obtained via the **Bill** object. To initialise a **Bill** object:
`all_bills.data` is a list of all current bills and some basic data in the form of a dict. The rest of the data may be obtained via the **Bill()** object. To an instance of **Bill()**:

```python
bill = Bill(bill_five)
Expand All @@ -44,7 +44,13 @@ bill.bill_text_links
bill.explanatory_memoranda_links
```

or you can get the data dump:
_or_ you can use the url string to create an instance of **Bill()**:

```python
bill = Bill(bill_five["URL"])
```

and you can get the data dump as a dict:

```python
bill.data
Expand All @@ -58,5 +64,4 @@ I decided (for now) to add functions to obtain relevant data via the [TheyVoteFo

### Todo

- bills in All_Bills ?
- get more bill data

0 comments on commit 01b7564

Please sign in to comment.