Rename RestAuthenticatedEndpoints to RestAuthEndpoints (and bfxapi.rest.endpoints.rest_authenticated_endpoints to rest_auth_endpoints).

This commit is contained in:
Davide Casale
2023-06-12 15:45:28 +02:00
parent f343fce20f
commit d63c2c63c3
5 changed files with 7 additions and 6 deletions

View File

@@ -1,2 +1,2 @@
from .endpoints import BfxRestInterface, RestPublicEndpoints, RestAuthenticatedEndpoints, \
from .endpoints import BfxRestInterface, RestPublicEndpoints, RestAuthEndpoints, \
RestMerchantEndpoints

View File

@@ -1,5 +1,5 @@
from .bfx_rest_interface import BfxRestInterface
from .rest_public_endpoints import RestPublicEndpoints
from .rest_authenticated_endpoints import RestAuthenticatedEndpoints
from .rest_auth_endpoints import RestAuthEndpoints
from .rest_merchant_endpoints import RestMerchantEndpoints

View File

@@ -1,5 +1,5 @@
from .rest_public_endpoints import RestPublicEndpoints
from .rest_authenticated_endpoints import RestAuthenticatedEndpoints
from .rest_auth_endpoints import RestAuthEndpoints
from .rest_merchant_endpoints import RestMerchantEndpoints
class BfxRestInterface:
@@ -9,5 +9,5 @@ class BfxRestInterface:
api_key, api_secret = (credentials['api_key'], credentials['api_secret']) if credentials else (None, None)
self.public = RestPublicEndpoints(host=host)
self.auth = RestAuthenticatedEndpoints(host=host, api_key=api_key, api_secret=api_secret)
self.auth = RestAuthEndpoints(host=host, api_key=api_key, api_secret=api_secret)
self.merchant = RestMerchantEndpoints(host=host, api_key=api_key, api_secret=api_secret)

View File

@@ -24,7 +24,7 @@ from ...types.serializers import _Notification
from ...utils.json_encoder import JSON
class RestAuthenticatedEndpoints(Middleware):
class RestAuthEndpoints(Middleware):
def get_user_info(self) -> UserInfo:
return serializers.UserInfo \
.parse(*self._post("auth/r/info/user"))

View File

@@ -95,4 +95,5 @@ class BfxWebSocketInputs:
await self.__handle_websocket_input("foc", { "id": id })
async def calc(self, *args: str) -> None:
await self.__handle_websocket_input("calc", list(map(lambda arg: [arg], args)))
await self.__handle_websocket_input("calc",
list(map(lambda arg: [arg], args)))