Add get_connection_string method to Branch class

This commit is contained in:
2024-01-18 12:14:44 -05:00
parent 802a9c4a76
commit 4826714e33
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -234,6 +234,19 @@ class Branch(NeonResource):
return cls(client=client, obj=r, data_model=schema.BranchResponse)
# @classmethod
# def get_connection_string(cls, client, project_id: str, branch_id: str):
# """Get a connection string for a branch."""
# # Construct the request path.
# r_path = client.url_join("projects", project_id, "branches", branch_id, "connection_string")
# # Make the request.
# obj = client.request("GET", r_path, response_model=schema.BranchConnectionStringResponse)
# # Deserialize the response.
# return obj.connection_string
class Operation(NeonResource):
@classmethod
+1 -1
View File
@@ -85,7 +85,7 @@ class ProjectResource(Resource):
*,
cursor: int | None = None,
limit: int | None = None,
shared: bool = False
shared: bool = False,
):
"""Get a list of projects."""