Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added search routes to user_friendly, updated routes with limit, offs…
…et, order_by (#21) * Create models for the corresponding section Create models representing the routes responses for each section. Added models for new section 'user_friendly' * Remove redundant classes related to the response * Remove redundant classes related to the response * Create an enum file for multiple enum types * Examples of errors in HTTP responses. * Update getting data and streaming data Added methods for getting data for 'user_friendly' section routes: 'get_members()' and 'get_members_info()'. Added Helper function for checking if some member Knesset id exists: 'is_mk_individual_exist()' Added streaming data option for large values of 'limit' and 'offset' when they are used. Added method for serialize jsons: 'json_serialize()' * Update routes info, new routes added Update routes errors responses and success response. Handle errors with 'HTTPException()' . Added 'user_friendly' section to routes. Simplified response by removing 'success' field, now returning only data. * Update queries.py Added new queries for 'get_members()','get_members_presence()' ,'get_members_votes()','get_members_attended_committee_meetings()','get_members_bills()'. Try query optimization for 'get_members()'. * Added errors.py to docker * Fixing PEP 8 * Adding get_member() query for returning single Knesset member user friendly * - Added get_member() - Added get_member_by_committee() - Added get_member_by_faction() - Added get_member_by_faction_chairperson() - Added get_member_by_govministries() - Added get_member_by_name() - Removing get_members_info() - Added is_knesset_term_exist() - Added is_mk_individual_exist() - Added named placeholders where needed - Added docstring to functions - Added logger.critical() when unknown execption is thrown - Updated create_query_list() logic, fixing order_by logic - Added option for disable named cursor in get_db_cursor() * - Added '/members/{mk_individual_id}' route - Added '/members/search/by-committee/{committee}' route - Added '/members/search/by-faction/{faction}' route - Added '/members/search/by-faction_chairperson/{faction}' route - Added '/members/search/by-govministries/{govministry}' route - Added '/members/search/by-name/{name}' route - Updated these user friendly routes with limit, offset, pagination, streaming : /members/{mk_individual_id}/presence /members/{mk_individual_id}/attended_committee_meetings /members/{mk_individual_id}/votes /members/{mk_individual_id}/bills - Order by logic was updated in routes which have limit and offset - The code is organized better, routes are grouped together per common section * Fixed field type in 'MkIndividualIDs' model
- Loading branch information