summaryrefslogtreecommitdiff
path: root/app/Api
diff options
context:
space:
mode:
Diffstat (limited to 'app/Api')
-rw-r--r--app/Api/Board.php35
-rw-r--r--app/Api/Column.php42
2 files changed, 42 insertions, 35 deletions
diff --git a/app/Api/Board.php b/app/Api/Board.php
index d615b1dc..185ac51a 100644
--- a/app/Api/Board.php
+++ b/app/Api/Board.php
@@ -15,39 +15,4 @@ class Board extends Base
$this->checkProjectPermission($project_id);
return $this->board->getBoard($project_id);
}
-
- public function getColumns($project_id)
- {
- return $this->board->getColumns($project_id);
- }
-
- public function getColumn($column_id)
- {
- return $this->board->getColumn($column_id);
- }
-
- public function moveColumnUp($project_id, $column_id)
- {
- return $this->board->moveUp($project_id, $column_id);
- }
-
- public function moveColumnDown($project_id, $column_id)
- {
- return $this->board->moveDown($project_id, $column_id);
- }
-
- public function updateColumn($column_id, $title, $task_limit = 0, $description = '')
- {
- return $this->board->updateColumn($column_id, $title, $task_limit, $description);
- }
-
- public function addColumn($project_id, $title, $task_limit = 0, $description = '')
- {
- return $this->board->addColumn($project_id, $title, $task_limit, $description);
- }
-
- public function removeColumn($column_id)
- {
- return $this->board->removeColumn($column_id);
- }
}
diff --git a/app/Api/Column.php b/app/Api/Column.php
new file mode 100644
index 00000000..ddc3a5d0
--- /dev/null
+++ b/app/Api/Column.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace Kanboard\Api;
+
+/**
+ * Column API controller
+ *
+ * @package api
+ * @author Frederic Guillot
+ */
+class Column extends Base
+{
+ public function getColumns($project_id)
+ {
+ return $this->column->getAll($project_id);
+ }
+
+ public function getColumn($column_id)
+ {
+ return $this->column->getById($column_id);
+ }
+
+ public function updateColumn($column_id, $title, $task_limit = 0, $description = '')
+ {
+ return $this->column->update($column_id, $title, $task_limit, $description);
+ }
+
+ public function addColumn($project_id, $title, $task_limit = 0, $description = '')
+ {
+ return $this->column->create($project_id, $title, $task_limit, $description);
+ }
+
+ public function removeColumn($column_id)
+ {
+ return $this->column->remove($column_id);
+ }
+
+ public function changeColumnPosition($project_id, $column_id, $position)
+ {
+ return $this->column->changePosition($project_id, $column_id, $position);
+ }
+}