55import httpx
66
77from ..._types import Body , Query , Headers , NotGiven , not_given
8+ from ..._utils import path_template
89from ..._compat import cached_property
910from ..._resource import SyncAPIResource , AsyncAPIResource
1011from ..._response import (
@@ -42,7 +43,7 @@ def get(
4243 self ,
4344 response_id : str ,
4445 * ,
45- account_id : str ,
46+ account_id : str | None = None ,
4647 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
4748 # The extra values given here take precedence over values defined on the client or passed to this method.
4849 extra_headers : Headers | None = None ,
@@ -68,13 +69,19 @@ def get(
6869
6970 timeout: Override the client-level default timeout for this request, in seconds
7071 """
72+ if account_id is None :
73+ account_id = self ._client ._get_account_id_path_param ()
7174 if not account_id :
7275 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
7376 if not response_id :
7477 raise ValueError (f"Expected a non-empty value for `response_id` but received { response_id !r} " )
7578 extra_headers = {"Accept" : "text/plain" , ** (extra_headers or {})}
7679 return self ._get (
77- f"/accounts/{ account_id } /urlscanner/v2/responses/{ response_id } " ,
80+ path_template (
81+ "/accounts/{account_id}/urlscanner/v2/responses/{response_id}" ,
82+ account_id = account_id ,
83+ response_id = response_id ,
84+ ),
7885 options = make_request_options (
7986 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
8087 ),
@@ -106,7 +113,7 @@ async def get(
106113 self ,
107114 response_id : str ,
108115 * ,
109- account_id : str ,
116+ account_id : str | None = None ,
110117 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
111118 # The extra values given here take precedence over values defined on the client or passed to this method.
112119 extra_headers : Headers | None = None ,
@@ -132,13 +139,19 @@ async def get(
132139
133140 timeout: Override the client-level default timeout for this request, in seconds
134141 """
142+ if account_id is None :
143+ account_id = self ._client ._get_account_id_path_param ()
135144 if not account_id :
136145 raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
137146 if not response_id :
138147 raise ValueError (f"Expected a non-empty value for `response_id` but received { response_id !r} " )
139148 extra_headers = {"Accept" : "text/plain" , ** (extra_headers or {})}
140149 return await self ._get (
141- f"/accounts/{ account_id } /urlscanner/v2/responses/{ response_id } " ,
150+ path_template (
151+ "/accounts/{account_id}/urlscanner/v2/responses/{response_id}" ,
152+ account_id = account_id ,
153+ response_id = response_id ,
154+ ),
142155 options = make_request_options (
143156 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
144157 ),
0 commit comments