Skip to content

Commit

Permalink
Adds async client as well
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgolec committed Apr 3, 2024
1 parent 62560f8 commit 3d49360
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions schwab/client/asynchronous.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .base import BaseClient
#from ..debug import register_redactions_from_response
from ..debug import register_redactions_from_response

This comment has been minimized.

Copy link
@james-coder

james-coder Jul 12, 2024

Was this intentional or unintentional? On line 5, it's redefined to pass.

from ..utils import LazyLog

def register_redactions_from_response(x):
Expand All @@ -16,7 +16,7 @@ async def close_async_session(self):
async def _get_request(self, path, params):
self.ensure_updated_refresh_token()

dest = 'https://api.tdameritrade.com' + path
dest = 'https://api.schwabapi.com' + path

req_num = self._req_num()
self.logger.debug('Req %s: GET to %s, params=%s',
Expand All @@ -30,7 +30,7 @@ async def _get_request(self, path, params):
async def _post_request(self, path, data):
self.ensure_updated_refresh_token()

dest = 'https://api.tdameritrade.com' + path
dest = 'https://api.schwabapi.com' + path

req_num = self._req_num()
self.logger.debug('Req %s: POST to %s, json=%s',
Expand All @@ -44,7 +44,7 @@ async def _post_request(self, path, data):
async def _put_request(self, path, data):
self.ensure_updated_refresh_token()

dest = 'https://api.tdameritrade.com' + path
dest = 'https://api.schwabapi.com' + path

req_num = self._req_num()
self.logger.debug('Req %s: PUT to %s, json=%s',
Expand All @@ -58,7 +58,7 @@ async def _put_request(self, path, data):
async def _patch_request(self, path, data):
self.ensure_updated_refresh_token()

dest = 'https://api.tdameritrade.com' + path
dest = 'https://api.schwabapi.com' + path

req_num = self._req_num()
self.logger.debug('Req %s: PATCH to %s, json=%s',
Expand All @@ -72,7 +72,7 @@ async def _patch_request(self, path, data):
async def _delete_request(self, path):
self.ensure_updated_refresh_token()

dest = 'https://api.tdameritrade.com' + path
dest = 'https://api.schwabapi.com' + path

req_num = self._req_num()
self.logger.debug('Req %s: DELETE to %s', req_num, dest)
Expand Down
2 changes: 1 addition & 1 deletion schwab/client/synchronous.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from .base import BaseClient
from ..utils import LazyLog
#from ..debug import register_redactions_from_response
from ..debug import register_redactions_from_response

def register_redactions_from_response(x):
pass
Expand Down

0 comments on commit 3d49360

Please sign in to comment.