Skip to content

Commit

Permalink
Merge pull request #3182 from vitormattos/import-from-trello
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Dec 30, 2021
2 parents 4e5537f + ccd5bce commit b58913e
Show file tree
Hide file tree
Showing 29 changed files with 3,306 additions and 30 deletions.
1 change: 1 addition & 0 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
</background-jobs>
<commands>
<command>OCA\Deck\Command\UserExport</command>
<command>OCA\Deck\Command\BoardImport</command>
</commands>
<activity>
<settings>
Expand Down
4 changes: 4 additions & 0 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
['name' => 'board_api#deleteAcl', 'url' => '/api/v{apiVersion}/boards/{boardId}/acl/{aclId}', 'verb' => 'DELETE'],
['name' => 'board_api#updateAcl', 'url' => '/api/v{apiVersion}/boards/{boardId}/acl/{aclId}', 'verb' => 'PUT'],

['name' => 'board_import_api#getAllowedSystems', 'url' => '/api/v{apiVersion}/boards/import/getSystems','verb' => 'GET'],
['name' => 'board_import_api#getConfigSchema', 'url' => '/api/v{apiVersion}/boards/import/config/schema/{name}','verb' => 'GET'],
['name' => 'board_import_api#import', 'url' => '/api/v{apiVersion}/boards/import','verb' => 'POST'],


['name' => 'stack_api#index', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks', 'verb' => 'GET'],
['name' => 'stack_api#getArchived', 'url' => '/api/v{apiVersion}/boards/{boardId}/stacks/archived', 'verb' => 'GET'],
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
}
],
"require": {
"cogpowered/finediff": "0.3.*"
"cogpowered/finediff": "0.3.*",
"justinrainbow/json-schema": "^5.2"
},
"require-dev": {
"roave/security-advisories": "dev-master",
Expand Down
120 changes: 95 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 43 additions & 0 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,49 @@ For now only `deck_file` is supported as an attachment type.

##### 200 Success

### GET /boards/import/getSystems - Import a board

#### Request parameters

| Parameter | Type | Description |
| ------------ | ------- | --------------------------------------------- |
| system | Integer | The system name. Example: trello |

#### Response

Make a request to see the json schema of system

```json
{
}
```

### GET /boards/import/config/system/{schema} - Import a board

#### Request parameters

#### Response

```json
[
"trello"
]
```

### POST /boards/import - Import a board

#### Request parameters

| Parameter | Type | Description |
| ------------ | ------- | --------------------------------------------- |
| system | string | The allowed name of system to import from |
| config | Object | The config object (JSON) |
| data | Object | The data object to import (JSON) |

#### Response

##### 200 Success

# OCS API

The following endpoints are available through the Nextcloud OCS endpoint, which is available at `/ocs/v2.php/apps/deck/api/v1.0/`.
Expand Down
Loading

0 comments on commit b58913e

Please sign in to comment.