зеркало из https://github.com/nextcloud/news.git
add api annotations
This commit is contained in:
Родитель
b11cd6e058
Коммит
4affc4f485
|
@ -61,6 +61,7 @@ class FeedAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function getAll() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
@ -89,6 +90,7 @@ class FeedAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function create() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
@ -125,6 +127,7 @@ class FeedAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function delete() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
@ -145,6 +148,7 @@ class FeedAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function read() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
@ -161,6 +165,7 @@ class FeedAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function move() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
|
|
@ -57,6 +57,7 @@ class FolderAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function getAll() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
@ -77,6 +78,7 @@ class FolderAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function create() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
@ -102,6 +104,7 @@ class FolderAPI extends Controller {
|
|||
* @IsAdminExemption
|
||||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @API
|
||||
* @Ajax
|
||||
*/
|
||||
public function delete() {
|
||||
|
@ -123,6 +126,7 @@ class FolderAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function update() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
@ -149,6 +153,7 @@ class FolderAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function read() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
|
|
@ -52,6 +52,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function getAll() {
|
||||
$result = array(
|
||||
|
@ -93,6 +94,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function getUpdated() {
|
||||
$result = array(
|
||||
|
@ -152,6 +154,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function read() {
|
||||
return $this->setRead(true);
|
||||
|
@ -163,6 +166,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function unread() {
|
||||
return $this->setRead(false);
|
||||
|
@ -174,6 +178,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function star() {
|
||||
return $this->setStarred(true);
|
||||
|
@ -185,6 +190,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function unstar() {
|
||||
return $this->setStarred(false);
|
||||
|
@ -196,6 +202,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function readAll() {
|
||||
$userId = $this->api->getUserId();
|
||||
|
@ -227,6 +234,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function readMultiple() {
|
||||
return $this->setMultipleRead(true);
|
||||
|
@ -238,6 +246,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function unreadMultiple() {
|
||||
return $this->setMultipleRead(false);
|
||||
|
@ -266,6 +275,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function starMultiple() {
|
||||
return $this->setMultipleStarred(true);
|
||||
|
@ -277,6 +287,7 @@ class ItemAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function unstarMultiple() {
|
||||
return $this->setMultipleStarred(false);
|
||||
|
|
|
@ -44,6 +44,7 @@ class NewsAPI extends Controller {
|
|||
* @IsSubAdminExemption
|
||||
* @CSRFExemption
|
||||
* @Ajax
|
||||
* @API
|
||||
*/
|
||||
public function version() {
|
||||
$version = $this->api->getAppValue('installed_version');
|
||||
|
|
|
@ -85,7 +85,7 @@ class FeedAPITest extends ControllerTestUtility {
|
|||
|
||||
private function assertDefaultAnnotations($methodName){
|
||||
$annotations = array('IsAdminExemption', 'IsSubAdminExemption',
|
||||
'Ajax', 'CSRFExemption');
|
||||
'Ajax', 'CSRFExemption', 'API');
|
||||
$this->assertAnnotations($this->feedAPI, $methodName, $annotations);
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ class FolderAPITest extends ControllerTestUtility {
|
|||
|
||||
private function assertDefaultAnnotations($methodName){
|
||||
$annotations = array('IsAdminExemption', 'IsSubAdminExemption',
|
||||
'Ajax', 'CSRFExemption');
|
||||
'Ajax', 'CSRFExemption', 'API');
|
||||
$this->assertAnnotations($this->folderAPI, $methodName, $annotations);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ class ItemAPITest extends ControllerTestUtility {
|
|||
|
||||
private function assertDefaultAnnotations($methodName){
|
||||
$annotations = array('IsAdminExemption', 'IsSubAdminExemption',
|
||||
'Ajax', 'CSRFExemption');
|
||||
'Ajax', 'CSRFExemption', 'API');
|
||||
$this->assertAnnotations($this->itemAPI, $methodName, $annotations);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class NewsAPITest extends ControllerTestUtility {
|
|||
|
||||
private function assertDefaultAnnotations($methodName){
|
||||
$annotations = array('IsAdminExemption', 'IsSubAdminExemption',
|
||||
'Ajax', 'CSRFExemption');
|
||||
'Ajax', 'CSRFExemption', 'API');
|
||||
$this->assertAnnotations($this->newsAPI, $methodName, $annotations);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче