Skip to content

Commit

Permalink
fix: renaming the post method
Browse files Browse the repository at this point in the history
  • Loading branch information
noble-varghese committed Dec 4, 2023
1 parent 2131dd1 commit 28e711a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion portkey_ai/api_resources/apis/api_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def __init__(self, client: APIClient) -> None:
# self._delete = client.delete

def _post(self, *args, **kwargs):
return self._client.post(*args, **kwargs)
return self._client._post(*args, **kwargs)
8 changes: 4 additions & 4 deletions portkey_ai/api_resources/base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def custom_auth(self) -> Optional[httpx.Auth]:
return None

@overload
def post(
def _post(
self,
path: str,
*,
Expand All @@ -113,7 +113,7 @@ def post(
...

@overload
def post(
def _post(
self,
path: str,
*,
Expand All @@ -127,7 +127,7 @@ def post(
...

@overload
def post(
def _post(
self,
path: str,
*,
Expand All @@ -140,7 +140,7 @@ def post(
) -> Union[ResponseT, StreamT]:
...

def post(
def _post(
self,
path: str,
*,
Expand Down
2 changes: 1 addition & 1 deletion portkey_ai/api_resources/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def copy(
**kwargs,
)

def _post(self, url: str, **kwargs):
def post(self, url: str, **kwargs):
return apis.Post(self).create(url=url, **kwargs)

with_options = copy

0 comments on commit 28e711a

Please sign in to comment.