Returns information about a specific file. Args: extra_headers: Send extra headers extra_query: Add additional query parameters to the request extra_body: Add additional JSON properties to the request timeout: Override the client-level def
(
self,
file_id: str,
*,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
)
| 152 | ) |
| 153 | |
| 154 | def retrieve( |
| 155 | self, |
| 156 | file_id: str, |
| 157 | *, |
| 158 | class="cm"># Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 159 | class="cm"># The extra values given here take precedence over values defined on the client or passed to this method. |
| 160 | extra_headers: Headers | None = None, |
| 161 | extra_query: Query | None = None, |
| 162 | extra_body: Body | None = None, |
| 163 | timeout: float | httpx.Timeout | None | NotGiven = not_given, |
| 164 | ) -> FileObject: |
| 165 | class="st">""" |
| 166 | Returns information about a specific file. |
| 167 | |
| 168 | Args: |
| 169 | extra_headers: Send extra headers |
| 170 | |
| 171 | extra_query: Add additional query parameters to the request |
| 172 | |
| 173 | extra_body: Add additional JSON properties to the request |
| 174 | |
| 175 | timeout: Override the client-level default timeout for this request, in seconds |
| 176 | class="st">""" |
| 177 | if not file_id: |
| 178 | raise ValueError(fclass="st">"Expected a non-empty value for `file_id` but received {file_id!r}") |
| 179 | return self._get( |
| 180 | path_template(class="st">"/files/{file_id}", file_id=file_id), |
| 181 | options=make_request_options( |
| 182 | extra_headers=extra_headers, |
| 183 | extra_query=extra_query, |
| 184 | extra_body=extra_body, |
| 185 | timeout=timeout, |
| 186 | security={class="st">"bearer_auth": True}, |
| 187 | ), |
| 188 | cast_to=FileObject, |
| 189 | ) |
| 190 | |
| 191 | def list( |
| 192 | self, |