Add missing swimlane REST API
Missing API to retrieve extra details were missing: getSwimlane($project_id, $name) getAllSwimlanes($project_id)
This commit is contained in:
parent
23f8f2c576
commit
efbcc22f5a
|
|
@ -74,6 +74,22 @@ class Swimlane extends Base
|
|||
->findOneColumn('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a swimlane by the project and the name
|
||||
*
|
||||
* @access public
|
||||
* @param integer $project_id Project id
|
||||
* @param string $name Name
|
||||
* @return integer
|
||||
*/
|
||||
public function getByName($project_id, $name)
|
||||
{
|
||||
return $this->db->table(self::TABLE)
|
||||
->eq('project_id', $project_id)
|
||||
->eq('name', $name)
|
||||
->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get default swimlane properties
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1045,6 +1045,95 @@ Response example:
|
|||
}
|
||||
```
|
||||
|
||||
### getAllSwimlanes
|
||||
|
||||
- Purpose: **Get the list of all swimlanes of a project**
|
||||
- Parameters:
|
||||
- **project_id** (integer, required)
|
||||
- Result on success: **swimlane properties**
|
||||
- Result on failure: **null**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "getAllSwimlanes",
|
||||
"id": 1242049935,
|
||||
"params": [
|
||||
2
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1242049935,
|
||||
"result": [
|
||||
{
|
||||
"id": "0",
|
||||
"name": "Default"
|
||||
},
|
||||
{
|
||||
"id": "3",
|
||||
"name": "Version 1.0",
|
||||
"is_active" : "0",
|
||||
"position" : 1,
|
||||
"project_id" : 2
|
||||
},
|
||||
{
|
||||
"id": "2",
|
||||
"name": "Version 7.0",
|
||||
"is_active" : "1"
|
||||
"position" : 2,
|
||||
"project_id" : 2
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### getSwimlane
|
||||
|
||||
- Purpose: **Get the a swimlane**
|
||||
- Parameters:
|
||||
- **project_id** (integer, required)
|
||||
- **name** (string, required)
|
||||
- Result on success: **swimlane properties**
|
||||
- Result on failure: **null**
|
||||
|
||||
Request example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"method": "getSwimlane",
|
||||
"id": 1242049935,
|
||||
"params": [
|
||||
2,
|
||||
"Version 1.0"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Response example:
|
||||
|
||||
```json
|
||||
{
|
||||
"jsonrpc": "2.0",
|
||||
"id": 1242049935,
|
||||
"result": {
|
||||
"id": "3",
|
||||
"name": "Version 1.0",
|
||||
"is_active" : "0",
|
||||
"position" : 2,
|
||||
"project_id" : 2
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### moveSwimlaneUp
|
||||
|
||||
- Purpose: **Move up the swimlane position**
|
||||
|
|
|
|||
|
|
@ -68,6 +68,8 @@ $server->bind('removeColumn', $container['board'], 'removeColumn');
|
|||
* Swimlane procedures
|
||||
*/
|
||||
$server->bind('getSwimlanes', $container['swimlane'], 'getSwimlanes');
|
||||
$server->bind('getAllSwimlanes', $container['swimlane'], 'getAll');
|
||||
$server->bind('getSwimlane', $container['swimlane'], 'getByName');
|
||||
$server->bind('addSwimlane', $container['swimlane'], 'create');
|
||||
$server->bind('updateSwimlane', $container['swimlane'], 'rename');
|
||||
$server->bind('removeSwimlane', $container['swimlane'], 'remove');
|
||||
|
|
|
|||
Loading…
Reference in New Issue