hasadna / knesset-data-python

python module that provides api to access Israeli Parliament (Knesset) data
https://github.com/hasadna/knesset-data
1 stars 16 forks source link

should add committee membership data from the new knesset API #10

Open OriHoch opened 7 years ago

OriHoch commented 7 years ago

expected outcome

this is only a suggestion, feel free to implement it another way

from knesset_data.dataservice.persons import PersonPosition
for person_position in PersonPosition.get_all():
    peson_position.PersonID
    person_position.CommitteeID
    # all other fields..

    # mk = Member of Knesset
    # this method should return the standard member id, like:
    # 901 = איציק שמולי
    person_position.get_mk_id()

    # given person_position.CommitteeId
    # fetch and return a dataservice.committees.Committee object
    person_position.get_committee()

relevant documentation and details:

OriHoch commented 7 years ago

the basic data is there, but some follow-up is needed: