99)
1010from ...page_params_utils import build_page_batch_params
1111from ...job_status_utils import is_default_terminal_job_status
12+ from ...web_route_constants import BATCH_FETCH_JOB_ROUTE_PREFIX
1213from ...web_payload_utils import build_batch_fetch_start_payload
1314from ...web_payload_utils import build_batch_fetch_get_params
1415from ...web_pagination_utils import (
3435
3536
3637class BatchFetchManager :
38+ _ROUTE_PREFIX = BATCH_FETCH_JOB_ROUTE_PREFIX
39+
3740 def __init__ (self , client ):
3841 self ._client = client
3942
4043 def start (self , params : StartBatchFetchJobParams ) -> StartBatchFetchJobResponse :
4144 payload = build_batch_fetch_start_payload (params )
4245
4346 response = self ._client .transport .post (
44- self ._client ._build_url ("/web/batch-fetch" ),
47+ self ._client ._build_url (self . _ROUTE_PREFIX ),
4548 data = payload ,
4649 )
4750 return parse_response_model (
@@ -52,7 +55,7 @@ def start(self, params: StartBatchFetchJobParams) -> StartBatchFetchJobResponse:
5255
5356 def get_status (self , job_id : str ) -> BatchFetchJobStatusResponse :
5457 response = self ._client .transport .get (
55- self ._client ._build_url (f"/web/batch-fetch /{ job_id } /status" )
58+ self ._client ._build_url (f"{ self . _ROUTE_PREFIX } /{ job_id } /status" )
5659 )
5760 return parse_response_model (
5861 response .data ,
@@ -65,7 +68,7 @@ def get(
6568 ) -> BatchFetchJobResponse :
6669 query_params = build_batch_fetch_get_params (params )
6770 response = self ._client .transport .get (
68- self ._client ._build_url (f"/web/batch-fetch /{ job_id } " ),
71+ self ._client ._build_url (f"{ self . _ROUTE_PREFIX } /{ job_id } " ),
6972 params = query_params ,
7073 )
7174 return parse_response_model (
0 commit comments