Skip to content

Commit 9dbaf7c

Browse files
fix: use new api_client in oauth api handler (#5)
1 parent 4492332 commit 9dbaf7c

File tree

7 files changed

+12
-20
lines changed

7 files changed

+12
-20
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Plane REST API
44
Visit our quick start guide and full API documentation at [developers.plane.so](https://developers.plane.so/api-reference/introduction).
55

66
- API version: 0.0.1
7-
- Package version: 0.1.8
7+
- Package version: 0.1.9
88
- Generator version: 7.13.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010
For more information, please visit [https://plane.so](https://plane.so)

plane/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
""" # noqa: E501
1616

1717

18-
__version__ = "0.1.8"
18+
__version__ = "0.1.9"
1919

2020
# import apis into sdk package
2121
from plane.api.assets_api import AssetsApi

plane/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def __init__(
8686
self.default_headers[header_name] = header_value
8787
self.cookie = cookie
8888
# Set default User-Agent.
89-
self.user_agent = 'OpenAPI-Generator/0.1.8/python'
89+
self.user_agent = 'OpenAPI-Generator/0.1.9/python'
9090
self.client_side_validation = configuration.client_side_validation
9191

9292
def __enter__(self):

plane/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def to_debug_report(self) -> str:
548548
"OS: {env}\n"\
549549
"Python Version: {pyversion}\n"\
550550
"Version of the API: 0.0.1\n"\
551-
"SDK Package Version: 0.1.8".\
551+
"SDK Package Version: 0.1.9".\
552552
format(env=sys.platform, pyversion=sys.version)
553553

554554
def get_host_settings(self) -> List[HostSetting]:

plane/oauth/api.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ def exchange_code_for_token(
8181
try:
8282
response = self.api_client.call_api(
8383
"POST",
84-
"/auth/o/token/",
84+
f"{self.base_url}/auth/o/token/",
8585
header_params=headers,
86-
body=data,
86+
post_params=data,
8787
)
8888
response.read()
8989
json_response = json.loads(response.data)
@@ -112,15 +112,11 @@ def get_refresh_token(self, refresh_token: str) -> PlaneOAuthTokenResponse:
112112
}
113113

114114
try:
115-
response = self.rest_client.post_request(
116-
url=f"{self.base_url}/auth/o/token/", headers=headers, post_params=data
117-
)
118-
119115
response = self.api_client.call_api(
120116
"POST",
121-
"/auth/o/token/",
117+
f"{self.base_url}/auth/o/token/",
122118
header_params=headers,
123-
body=data,
119+
post_params=data,
124120
)
125121
response.read()
126122
json_response = json.loads(response.data)
@@ -148,15 +144,11 @@ def get_bot_token(self, app_installation_id: str) -> PlaneOAuthTokenResponse:
148144
}
149145

150146
try:
151-
response = self.rest_client.post_request(
152-
url=f"{self.base_url}/auth/o/token/", headers=headers, post_params=data
153-
)
154-
155147
response = self.api_client.call_api(
156148
"POST",
157-
"/auth/o/token/",
149+
f"{self.base_url}/auth/o/token/",
158150
header_params=headers,
159-
body=data,
151+
post_params=data,
160152
)
161153
response.read()
162154
json_response = json.loads(response.data)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "plane"
3-
version = "0.1.8"
3+
version = "0.1.9"
44
description = "The Plane REST API"
55
authors = ["Plane <[email protected]>"]
66
license = "GNU AGPLv3"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# prerequisite: setuptools
2323
# http://pypi.python.org/pypi/setuptools
2424
NAME = "plane-sdk"
25-
VERSION = "0.1.8"
25+
VERSION = "0.1.9"
2626
PYTHON_REQUIRES = ">= 3.9"
2727
REQUIRES = [
2828
"urllib3 >= 2.1.0, < 3.0.0",

0 commit comments

Comments
 (0)