-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove redundant code in bfxapi.rest._interface.
- Loading branch information
1 parent
5a458a2
commit 8814d18
Showing
4 changed files
with
91 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
from typing import TYPE_CHECKING, Any, Optional | ||
from typing import Optional | ||
|
||
from .middleware import Middleware | ||
|
||
if TYPE_CHECKING: | ||
from requests.sessions import _Params | ||
|
||
|
||
class Interface: | ||
def __init__( | ||
self, host: str, api_key: Optional[str] = None, api_secret: Optional[str] = None | ||
): | ||
self.__middleware = Middleware(host, api_key, api_secret) | ||
|
||
def _get(self, endpoint: str, params: Optional["_Params"] = None) -> Any: | ||
return self.__middleware.get(endpoint, params) | ||
|
||
def _post( | ||
self, | ||
endpoint: str, | ||
body: Optional[Any] = None, | ||
params: Optional["_Params"] = None, | ||
) -> Any: | ||
return self.__middleware.post(endpoint, body, params) | ||
self._m = Middleware(host, api_key, api_secret) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.