mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 01:03:31 +02:00
API call to add/remove favorites (#810)
add API methods pwg.users.addFavorite and pwg.users.removeFavorite
This commit is contained in:
committed by
Pierrick Le Gall
parent
d406a12d45
commit
1d113c002b
@@ -1077,6 +1077,26 @@ enabled_high, registration_date, registration_date_string, registration_date_sin
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
||||
$service->addMethod(
|
||||
'pwg.users.addFavorite',
|
||||
'ws_addFavorite',
|
||||
array(
|
||||
'image_id' => array('type'=>WS_TYPE_ID)
|
||||
),
|
||||
'Adds the indicated image to the current user\'s favorite images.',
|
||||
$ws_functions_root . 'pwg.users.php'
|
||||
);
|
||||
|
||||
$service->addMethod(
|
||||
'pwg.users.removeFavorite',
|
||||
'ws_removeFavorite',
|
||||
array(
|
||||
'image_id' => array('type'=>WS_TYPE_ID)
|
||||
),
|
||||
'Removes the indicated image from the current user\'s favorite images.',
|
||||
$ws_functions_root . 'pwg.users.php'
|
||||
);
|
||||
|
||||
$service->addMethod(
|
||||
'pwg.users.getFavorites',
|
||||
'ws_getFavorites',
|
||||
|
||||
Reference in New Issue
Block a user