forked from GithubBackups/vichan
api.php — translateBoards()
This commit is contained in:
parent
2c57e84ac5
commit
90a47bbb8b
20
inc/api.php
20
inc/api.php
@ -208,4 +208,24 @@ class Api {
|
|||||||
|
|
||||||
return $apiCatalog;
|
return $apiCatalog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function translateBoard(Board $board) {
|
||||||
|
$apiBoard = [];
|
||||||
|
|
||||||
|
foreach ($boards as $board) {
|
||||||
|
$apiBoard['uri'] = $board['uri'];
|
||||||
|
$apiBoard['title'] = $board['title'];
|
||||||
|
$apiBoard['subtitle'] = $board['subtitle'];
|
||||||
|
}
|
||||||
|
|
||||||
|
return $apiBoard;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function translateBoards($boards) {
|
||||||
|
$apiBoards = [];
|
||||||
|
foreach ($boards as $board) {
|
||||||
|
$apiBoards[] = $this->translateBoard($board);
|
||||||
|
}
|
||||||
|
return $apiBoards;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user