forked from python/typeshed
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrest.pyi
More file actions
49 lines (41 loc) · 2.06 KB
/
rest.pyi
File metadata and controls
49 lines (41 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from _typeshed import Incomplete
from collections.abc import Mapping
from typing import Final
import requests
from auth0.exceptions import Auth0Error as Auth0Error, RateLimitError as RateLimitError
from auth0.rest_async import RequestsResponse as RequestsResponse
from auth0.types import RequestData as RequestData, TimeoutType as TimeoutType
UNKNOWN_ERROR: Final[str]
class RestClientOptions:
telemetry: bool
timeout: TimeoutType
retries: int
def __init__(self, telemetry: bool = True, timeout: TimeoutType = 5.0, retries: int = 3) -> None: ...
class RestClient:
options: RestClientOptions
jwt: str | None
base_headers: dict[str, str]
telemetry: bool
timeout: TimeoutType
def __init__(
self, jwt: str | None, telemetry: bool = True, timeout: TimeoutType = 5.0, options: RestClientOptions | None = None
) -> None: ...
def MAX_REQUEST_RETRIES(self) -> int: ...
def MAX_REQUEST_RETRY_JITTER(self) -> int: ...
def MAX_REQUEST_RETRY_DELAY(self) -> int: ...
def MIN_REQUEST_RETRY_DELAY(self) -> int: ...
def get(self, url: str, params: dict[str, Incomplete] | None = None, headers: dict[str, str] | None = None): ...
def post(self, url: str, data: RequestData | None = None, headers: dict[str, str] | None = None): ...
def file_post(self, url: str, data: RequestData | None = None, files: dict[str, Incomplete] | None = None): ...
def patch(self, url: str, data: RequestData | None = None): ...
def put(self, url: str, data: RequestData | None = None): ...
def delete(self, url: str, params: dict[str, Incomplete] | None = None, data: RequestData | None = None): ...
class Response:
def __init__(self, status_code: int, content, headers: Mapping[str, str]) -> None: ...
def content(self): ...
class JsonResponse(Response):
def __init__(self, response: requests.Response | RequestsResponse) -> None: ...
class PlainResponse(Response):
def __init__(self, response: requests.Response | RequestsResponse) -> None: ...
class EmptyResponse(Response):
def __init__(self, status_code: int) -> None: ...