Exemplo n.º 1
0
def member_votes():
    """Recent votes by a member of congress"""

    r = twiml.Response()
    bioguide = g.request_params['bioguide_id']
    legislator = read_context('legislator', load_member_for(bioguide))
    votes = data.recent_votes(legislator)
    script = " ".join("On %(question)s. Voted %(voted)s. . The vote %(result)s.\t" % v for v in votes)
    with r.gather(numDigits=1, timeout=1, action=url_for('.member_votes', bioguide_id=bioguide)) as rg:
        rg.say("Recent votes for %s. %s" % (legislator['fullname'], script))

    return next_action(r, default=url_for('.member', bioguide_id=bioguide))
Exemplo n.º 2
0
def test_method():
    r = data.recent_votes({'bioguide_id': 'V000128'})
    return str(r)