用于govtrack.us API v2的Python库。
govtrack的Python项目详细描述
#govtrack python
govtrack.us api v2版的python库。
>基于https://github.com/markgx/govtrack/govtrack-node/
>完整的api文档请访问http://www.govtrack.us/developers/api(https://www.govtrack.us/developers/api)
35;用法
###实例化govTrackClient,如下所示:
```
from govTrack.api import govTrackClient
````
Choose an endpoint
```
client.bill()
client.cosponsorship()
client.person()
client.role()
client.vote()
client.vote_voter()
```
##### 2a. Filter the results
```
client.person({'lastname': 'Kennedy'})
```
##### 2b. Filter with a 'id' to get a single result (or get none if the “ID”不存在(BR/>‘BR/>客户。人({ ID):123 })
‘BR/>< BR/>如果您使用的是“id”:
````
{
{
‘id’:65,
‘bill'u type’:‘reso‘解决’,
‘国会’:113
`````
````如果您使用的是过滤器,多个响应如果您使用的是过滤器:
````
{
{‘meta’:{
{‘meta’一些meta'u-meta'u-key:123,
<<
<收到一个响应:如果您使用的是‘id’单个响应
<
<'
},
‘对象’:[
{
‘id’:65,
‘bill\u type:'resolution',
‘国会’:113
},
{
‘id’:66,
‘bill\u type':'resolution',
‘国会’:114
}
]
}
}
````
govtrack.us api v2版的python库。
>基于https://github.com/markgx/govtrack/govtrack-node/
>完整的api文档请访问http://www.govtrack.us/developers/api(https://www.govtrack.us/developers/api)
35;用法
###实例化govTrackClient,如下所示:
```
from govTrack.api import govTrackClient
Choose an endpoint
```
client.bill()
client.cosponsorship()
client.person()
client.role()
client.vote()
client.vote_voter()
```
##### 2a. Filter the results
```
client.person({'lastname': 'Kennedy'})
```
##### 2b. Filter with a 'id' to get a single result (or get none if the “ID”不存在(BR/>‘BR/>客户。人({ ID):123 })
‘BR/>< BR/>如果您使用的是“id”:
````
{
{
‘id’:65,
‘bill'u type’:‘reso‘解决’,
‘国会’:113
`````
````如果您使用的是过滤器,多个响应如果您使用的是过滤器:
````
{
{‘meta’:{
{‘meta’一些meta'u-meta'u-key:123,
<<
<收到一个响应:如果您使用的是‘id’单个响应
<
<'
},
‘对象’:[
{
‘id’:65,
‘bill\u type:'resolution',
‘国会’:113
},
{
‘id’:66,
‘bill\u type':'resolution',
‘国会’:114
}
]
}
}
````