nitishragu12 / Capstone-Project

0 stars 0 forks source link

modifying the code to get the totalcount after searching #72

Closed ziqichen55555 closed 3 weeks ago

ziqichen55555 commented 3 weeks ago

Implemented functions: When searching for papers, the function of getting the total number has been added. The fetch_papers method has been modified to call get_total_count to get the total number of papers that meet the criteria. Reason for modification: The previous code could only return the list of searched papers, but the front-end requirement required the total number of all papers that meet the criteria to be displayed. Therefore, the logic of getting the total number has been added. Specific changes: In ElsevierService.fetch_papers, a call to ElsevierService.get_total_count has been added. A total_count field has been added to the returned result to indicate the total number of papers. Related tests: Local tests have been conducted to confirm that the functions of getting and returning the total number work properly.