import 'package:dub/api.dart';
All URIs are relative to https://api.dub.co
Method | HTTP request | Description |
---|---|---|
createWorkspace | POST /workspaces | Create a workspace |
getWorkspace | GET /workspaces/{idOrSlug} | Retrieve a workspace |
getWorkspaces | GET /workspaces | Retrieve a list of workspaces |
WorkspaceSchema createWorkspace(createWorkspaceRequest)
Create a workspace
Create a new workspace for the authenticated user.
import 'package:dub/api.dart';
final api = Dub().getWorkspacesApi();
final CreateWorkspaceRequest createWorkspaceRequest = ; // CreateWorkspaceRequest |
try {
final response = api.createWorkspace(createWorkspaceRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkspacesApi->createWorkspace: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
createWorkspaceRequest | CreateWorkspaceRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WorkspaceSchema getWorkspace(idOrSlug)
Retrieve a workspace
Retrieve a workspace for the authenticated user.
import 'package:dub/api.dart';
final api = Dub().getWorkspacesApi();
final String idOrSlug = idOrSlug_example; // String | The ID or slug of the workspace.
try {
final response = api.getWorkspace(idOrSlug);
print(response);
} catch on DioException (e) {
print('Exception when calling WorkspacesApi->getWorkspace: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
idOrSlug | String | The ID or slug of the workspace. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List getWorkspaces()
Retrieve a list of workspaces
Retrieve a list of workspaces for the authenticated user.
import 'package:dub/api.dart';
final api = Dub().getWorkspacesApi();
try {
final response = api.getWorkspaces();
print(response);
} catch on DioException (e) {
print('Exception when calling WorkspacesApi->getWorkspaces: $e\n');
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]