From 7645f2f45dd8d3618f269797a5fb81a4078b10a1 Mon Sep 17 00:00:00 2001 From: oscatcher Date: Mon, 16 Mar 2026 20:13:53 +0100 Subject: [PATCH] fix: update latest_headlines calls to use standardized .post() method name --- src/newscatcher/client.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/newscatcher/client.py b/src/newscatcher/client.py index b71b6aa..c8b63bb 100644 --- a/src/newscatcher/client.py +++ b/src/newscatcher/client.py @@ -769,7 +769,7 @@ def get_all_headlines( ) # This creates "1d", "2h", etc. # Make the first request - first_response = self.latest_headlines.latest_headlines_post( + first_response = self.latest_headlines.post( when=when_param, page=1, **request_params ) @@ -808,10 +808,8 @@ def get_all_headlines( break try: - page_response = ( - self.latest_headlines.latest_headlines_post( - when=when_param, page=page, **request_params - ) + page_response = self.latest_headlines.post( + when=when_param, page=page, **request_params ) # Get articles safely from page response @@ -1050,7 +1048,7 @@ async def get_all_headlines( when_param = calculate_when_param(chunk_end, chunk_start) # Make the first request - first_response = await self.latest_headlines.latest_headlines_post( + first_response = await self.latest_headlines.post( when=when_param, page=1, **request_params ) @@ -1090,7 +1088,7 @@ async def get_all_headlines( async def fetch_page(page_num): async with semaphore: try: - return await self.latest_headlines.latest_headlines_post( + return await self.latest_headlines.post( when=when_param, page=page_num, **request_params ) except Exception as e: