-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove feature flags * nice rename api * align name for list workspaces * workspace create * align list for branches * cursor and next page methods * prep release 1.0.0a3
- Loading branch information
Showing
24 changed files
with
254 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
def ${operation_id}(self, db_name: str, new_name: str, workspace_id: str = None) -> ApiResponse: | ||
""" | ||
% for line in description : | ||
${line} | ||
% endfor | ||
|
||
Path: ${path} | ||
Method: ${http_method} | ||
Response status codes: | ||
% for rc in params['response_codes']: | ||
- ${rc["code"]}: ${rc["description"]} | ||
% endfor | ||
% if len(params['response_content_types']) > 1 : | ||
Responses: | ||
% for rc in params['response_content_types']: | ||
- ${rc["content_type"]} | ||
% endfor | ||
% elif len(params['response_content_types']) == 1 : | ||
Response: ${params['response_content_types'][0]["content_type"]} | ||
% endif | ||
|
||
:param db_name: str Current database name | ||
:param new_name: str New database name | ||
:param workspace_id: str = None The workspace identifier. Default: workspace Id from the client. | ||
|
||
:return Response | ||
""" | ||
if workspace_id is None: | ||
workspace_id = self.client.get_workspace_id() | ||
payload = {"newName": new_name} | ||
url_path = f"${path}" | ||
headers = {"content-type": "application/json"} | ||
return self.request("${http_method}", url_path, headers, payload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
def ${operation_id}(self, name: str, slug: str = None) -> ApiResponse: | ||
""" | ||
% for line in description : | ||
${line} | ||
% endfor | ||
|
||
Path: ${path} | ||
Method: ${http_method} | ||
Response status codes: | ||
% for rc in params['response_codes']: | ||
- ${rc["code"]}: ${rc["description"]} | ||
% endfor | ||
% if len(params['response_content_types']) > 1 : | ||
Responses: | ||
% for rc in params['response_content_types']: | ||
- ${rc["content_type"]} | ||
% endfor | ||
% elif len(params['response_content_types']) == 1 : | ||
Response: ${params['response_content_types'][0]["content_type"]} | ||
% endif | ||
|
||
:param name: str Workspace name | ||
:param slug: str = None Slug to use | ||
|
||
:return Response | ||
""" | ||
payload = {"name": name} | ||
if slug: | ||
payload["slug"] = slug | ||
url_path = "${path}" | ||
headers = {"content-type": "application/json"} | ||
return self.request("${http_method}", url_path, headers, payload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ Xata Client | |
.. autoclass:: Branch | ||
:members: | ||
.. autoclass:: Databases | ||
:members: | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.