mirror of
https://github.com/kennethreitz/neon-api-python.git
synced 2026-06-05 22:50:18 +00:00
Update NeonAPI class documentation
This commit is contained in:
@@ -15,11 +15,14 @@ neon = NeonApi(api_key='your_api_key')
|
||||
Methods of the `NeonAPI` class:
|
||||
|
||||
- `me()`: Returns the current user.
|
||||
|
||||
**Manage API keys**:
|
||||
|
||||
- `api_keys()`: Returns a list of API keys.
|
||||
- `api_key_create(**json)`: Creates an API key.
|
||||
- `api_key_delete(key_id)`: Deletes a given API key.
|
||||
|
||||
Manage projects:
|
||||
**Manage projects**:
|
||||
|
||||
- `projects()`: Returns a list of projects.
|
||||
- `project(project_id)`: Returns a specific project.
|
||||
@@ -27,7 +30,7 @@ Manage projects:
|
||||
- `project_update(project_id, **json)`: Updates a given project.
|
||||
- `project_delete(project_id)`: Deletes a given project.
|
||||
|
||||
Manage branches:
|
||||
**Manage branches**:
|
||||
|
||||
- `branches(project_id)`: Returns a list of branches for a given project.
|
||||
- `branch(project_id, branch_id)`: Returns a specific branch.
|
||||
@@ -36,7 +39,7 @@ Manage branches:
|
||||
- `branch_delete(project_id, branch_id)`: Deletes a given branch.
|
||||
- `branch_set_as_primary(project_id, branch_id)`: Sets a given branch as primary.
|
||||
|
||||
Manage databases:
|
||||
**Manage databases**:
|
||||
|
||||
- `databases(project_id, branch_id)`: Returns a list of databases for a given project and branch.
|
||||
- `database(project_id, branch_id, database_id)`: Returns a specific database.
|
||||
@@ -44,7 +47,7 @@ Manage databases:
|
||||
- `database_update(project_id, branch_id, **json)`: Updates a given database.
|
||||
- `database_delete(project_id, branch_id, database_id)`: Deletes a given database.
|
||||
|
||||
Manage endpoints:
|
||||
**Manage endpoints**:
|
||||
|
||||
- `endpoints(project_id, branch_id)`: Returns a list of endpoints for a given project and branch.
|
||||
- `endpoint_create(project_id, branch_id, **json)`: Creates a new endpoint.
|
||||
@@ -53,7 +56,7 @@ Manage endpoints:
|
||||
- `endpoint_start(project_id, branch_id, endpoint_id)`: Starts a given endpoint.
|
||||
- `endpoint_suspend(project_id, branch_id, endpoint_id)`: Suspends a given endpoint.
|
||||
|
||||
Manage roles:
|
||||
**Manage roles**:
|
||||
|
||||
- `roles(project_id, branch_id)`: Returns a list of roles for a given project and branch.
|
||||
- `role(project_id, branch_id, role_name)`: Returns a specific role.
|
||||
@@ -62,7 +65,7 @@ Manage roles:
|
||||
- `role_password_reveal(project_id, branch_id, role_name)`: Reveals the password for a given role.
|
||||
- `role_password_reset(project_id, branch_id, role_name)`: Resets the password for a given role.
|
||||
|
||||
Manage operations:
|
||||
**Manage operations**:
|
||||
|
||||
- `operations(project_id)`: Returns a list of operations for a given project.
|
||||
- `operation(project_id, operation_id)`: Returns a specific operation.
|
||||
|
||||
Reference in New Issue
Block a user