Skip to content

Latest commit

 

History

History
141 lines (92 loc) · 3.52 KB

WorkspacesApi.md

File metadata and controls

141 lines (92 loc) · 3.52 KB

dub.api.WorkspacesApi

Load the API package

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

createWorkspace

WorkspaceSchema createWorkspace(createWorkspaceRequest)

Create a workspace

Create a new workspace for the authenticated user.

Example

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');
}

Parameters

Name Type Description Notes
createWorkspaceRequest CreateWorkspaceRequest [optional]

Return type

WorkspaceSchema

Authorization

token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkspace

WorkspaceSchema getWorkspace(idOrSlug)

Retrieve a workspace

Retrieve a workspace for the authenticated user.

Example

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');
}

Parameters

Name Type Description Notes
idOrSlug String The ID or slug of the workspace.

Return type

WorkspaceSchema

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getWorkspaces

List getWorkspaces()

Retrieve a list of workspaces

Retrieve a list of workspaces for the authenticated user.

Example

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');
}

Parameters

This endpoint does not need any parameter.

Return type

List<WorkspaceSchema>

Authorization

token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]