Closed davi17g closed 7 years ago
I will take all the points that you mentioned into my consideration
On Sat, Apr 1, 2017 at 1:36 PM, Ori Hoch notifications@github.com wrote:
@OriHoch commented on this pull request.
In knesset_data/dataservice/bills.py https://github.com/hasadna/knesset-data-python/pull/8#discussion_r109282606 :
+) +import constants + + +class Bill(BaseKnessetDataServiceCollectionObject):
- SERVICE_NAME = "api"
- METHOD_NAME = "KNS_Bill"
- ORDERED_FIELDS = [
- ("id", KnessetDataServiceSimpleField('BillID', "integer", "the primary key")),
- ("kns_num", KnessetDataServiceSimpleField('KnessetNum', "integer", "kneset number")),
- ("name", KnessetDataServiceSimpleField('Name', "string", "bill heb name")),
- ("type_id", KnessetDataServiceSimpleField('SubTypeID', "integer", "type id of the bill")),
- ("type_description",
- KnessetDataServiceSimpleField('SubTypeDesc', "string", "type description of the bill")),
- ("private_num", KnessetDataServiceSimpleField('PrivateNumber', "integer",)),
- ("committee_id", KnessetDataServiceSimpleField('CommitteeID', "integer",)),
maybe it's worth to create a new class for this type of fields something like: ("committee", KnessetdataServiceRelatedField("CommitteeID", dataservice_class=Committee)) which will handle it automatically but need to make sure by default it doesn't fetch the related object - only when user requests it so I'm not sure what's the best way to implement it..
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/hasadna/knesset-data-python/pull/8#discussion_r109282606, or mute the thread https://github.com/notifications/unsubscribe-auth/ALLijYV8VlNJ9_XfNKniX6UrRjqdIuQpks5rriirgaJpZM4Mvc8c .
Amazing!