mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 19:29:58 +03:00
Improve display on ws.htm
git-svn-id: http://piwigo.org/svn/trunk@25394 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
aa85238878
commit
07b8dd5770
3 changed files with 122 additions and 89 deletions
|
@ -389,6 +389,15 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
|
|||
$signature = @$this->_methods[$methodName]['signature'];
|
||||
return isset($signature) ? $signature : array();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 2.6
|
||||
*/
|
||||
function getMethodOptions($methodName)
|
||||
{
|
||||
$options = @$this->_methods[$methodName]['options'];
|
||||
return isset($options) ? $options : array();
|
||||
}
|
||||
|
||||
static function isPost()
|
||||
{
|
||||
|
@ -628,6 +637,7 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
|
|||
'name' => $methodName,
|
||||
'description' => $service->getMethodDescription($methodName),
|
||||
'params' => array(),
|
||||
'options' => $service->getMethodOptions($methodName),
|
||||
);
|
||||
|
||||
foreach ($service->getMethodSignature($methodName) as $name => $options)
|
||||
|
@ -643,6 +653,10 @@ Request format: ".@$this->_requestFormat." Response format: ".@$this->_responseF
|
|||
{
|
||||
$param_data['defaultValue'] = $options['default'];
|
||||
}
|
||||
if (isset($options['maxValue']))
|
||||
{
|
||||
$param_data['maxValue'] = $options['maxValue'];
|
||||
}
|
||||
if (isset($options['info']))
|
||||
{
|
||||
$param_data['info'] = $options['info'];
|
||||
|
|
115
tools/ws.htm
115
tools/ws.htm
|
@ -1,12 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" dir="ltr">
|
||||
<html lang="en" dir="ltr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta charset="utf-8">
|
||||
<title>Piwigo web API (web-services) explorer</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="http://cdn.jsdelivr.net/tiptip/1.3/tipTip.css">
|
||||
<link rel="stylesheet" href="http://cdn.jsdelivr.net/tiptip/1.3/tipTip.css">
|
||||
|
||||
<style type="text/css">
|
||||
<style>
|
||||
/* BEGIN CSS RESET
|
||||
http://meyerweb.com/eric/tools/css/reset
|
||||
v2.0 | 20110126 | License: none (public domain) */
|
||||
|
@ -60,7 +60,7 @@
|
|||
#the_page {margin-left:252px;border-style:solid;border-color:#cdcdcd;border-width:1px 0 0 1px;}
|
||||
#the_content {padding:10px;}
|
||||
|
||||
#methodParams {display:inline-block;}
|
||||
#methodParams {margin-right:230px;}
|
||||
#methodParams thead td {background:#DEE3E9;font-weight:bold;padding:2px 5px;}
|
||||
#methodParams td {padding:2px;border:1px solid #cdcdcd;vertical-align:middle;}
|
||||
#methodParams tbody tr:nth-child(even) {background:#f7f7f7;}
|
||||
|
@ -73,7 +73,7 @@
|
|||
#methodParams .type {display:inline-block;width:16px;height:16px;font-size:12px;line-height:16px;background:#ddd;border-radius:8px;font-weight:bold;text-align:center;color:#222;}
|
||||
#methodParams .subtype {vertical-align:super;}
|
||||
|
||||
#testForm {display:inline-block;margin-left:15px;}
|
||||
#testForm {float:right;}
|
||||
#testForm td {padding:2px 0;}
|
||||
#testForm tr:last-child td {padding:8px 0 5px 0;}
|
||||
#testForm blockquote {width:200px;}
|
||||
|
@ -93,11 +93,14 @@
|
|||
|
||||
#iframeWrapper {width:100%;height:300px;padding:3px 3px 20px 3px;background:#F9F9F9;border:1px solid #cdcdcd;overflow:hidden;position:relative;}
|
||||
iframe {width:100%;height:100%;background:#fff;}
|
||||
|
||||
div.onlys {background:#faa;color:#fff;border:1px solid #f22;padding:.25em .5em;display:table;border-radius:4px;margin-bottom:0.5em;}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
|
||||
<div id="the_header">
|
||||
<h1>Piwigo web API (web-services) explorer</h1>
|
||||
|
@ -151,6 +154,40 @@
|
|||
<br>
|
||||
</div> <!-- methodDescription -->
|
||||
|
||||
<div id="testForm">
|
||||
<h3>Test</h3>
|
||||
<blockquote>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Request format :</td>
|
||||
<td>
|
||||
<select id="requestFormat">
|
||||
<option value="get" selected>GET</option>
|
||||
<option value="post">POST</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Response format :</td>
|
||||
<td>
|
||||
<select id="responseFormat">
|
||||
<option value="rest" selected>REST (xml)</option>
|
||||
<option value="json">JSON</option>
|
||||
<option value="php">PHP serial</option>
|
||||
<option value="xmlrpc">XML RPC</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="#" class="button" id="invokeMethod">INVOKE</a>
|
||||
<a href="#" class="button" id="invokeMethodBlank">INVOKE (new window)</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</blockquote>
|
||||
</div> <!-- testForm -->
|
||||
|
||||
<div id="methodParams">
|
||||
<h3>Method parameters</h3>
|
||||
<table>
|
||||
|
@ -178,47 +215,14 @@
|
|||
</table>
|
||||
</div> <!-- methodParams -->
|
||||
|
||||
<div id="testForm">
|
||||
<h3>Test</h3>
|
||||
<blockquote>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Request format :</td>
|
||||
<td>
|
||||
<select id="requestFormat">
|
||||
<option value="get" selected="selected">GET</option>
|
||||
<option value="post">POST</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Response format :</td>
|
||||
<td>
|
||||
<select id="responseFormat">
|
||||
<option value="rest" selected="selected">REST (xml)</option>
|
||||
<option value="json">JSON</option>
|
||||
<option value="php">PHP serial</option>
|
||||
<option value="xmlrpc">XML RPC</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="#" class="button" id="invokeMethod">INVOKE</a>
|
||||
<a href="#" class="button" id="invokeMethodBlank">INVOKE (new window)</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</blockquote>
|
||||
</div> <!-- testForm -->
|
||||
|
||||
<br><br>
|
||||
|
||||
<h3>Result</h3>
|
||||
<div id="iframeWrapper">
|
||||
<iframe src="" id="invokeFrame" name="invokeFrame"></iframe>
|
||||
<a href="#bottom" id="increaseIframe"><b>↓</b> increase height</a> • <a href="#bottom" id="decreaseIframe"><b>↑</b> decrease height</a>
|
||||
<a name="bottom"></a>
|
||||
<a href="#iframe-bottom" id="increaseIframe"><b>↓</b> increase height</a> •
|
||||
<a href="#iframe-bottom" id="decreaseIframe"><b>↑</b> decrease height</a>
|
||||
<a name="iframe-bottom"></a>
|
||||
</div>
|
||||
</form> <!-- iframeWrapper -->
|
||||
|
||||
|
@ -233,10 +237,10 @@
|
|||
Copyright © 2002-2013 <a href="http://piwigo.org">Piwigo Team</a>
|
||||
</div> <!-- the_footer -->
|
||||
|
||||
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/tiptip/1.3/jquery.tipTip.minified.js"></script>
|
||||
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/tiptip/1.3/jquery.tipTip.minified.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
// global vars
|
||||
var cachedMethods = new Array;
|
||||
var ws_url = "http://";
|
||||
|
@ -286,6 +290,7 @@ function resetDisplay() {
|
|||
$("#methodWrapper").hide();
|
||||
$("#methodName").hide();
|
||||
$("#urlForm").hide();
|
||||
$("#methodDescription blockquote").empty();
|
||||
$("#methodDescription").hide();
|
||||
$("#invokeFrame").attr('src','');
|
||||
}
|
||||
|
@ -352,7 +357,7 @@ function getMethodList() {
|
|||
var ml = '';
|
||||
for (var i=0; i<methods.length; i++)
|
||||
{
|
||||
ml += '<li><a href="#">'+ methods[i]+'</a></li>';
|
||||
ml += '<li><a href="#top">'+ methods[i]+'</a></li>';
|
||||
}
|
||||
$("#methodsList").html(ml).show();
|
||||
|
||||
|
@ -361,7 +366,6 @@ function getMethodList() {
|
|||
// trigger method selection
|
||||
$("#methodsList li a").click(function() {
|
||||
selectMethod($(this).html());
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}).error(function(jqXHR, textStatus, errorThrown) {
|
||||
|
@ -403,11 +407,26 @@ function fillNewMethod(methodName) {
|
|||
|
||||
$("#methodName").html(method.name).show();
|
||||
|
||||
if (method.options.post_only || method.options.admin_only) {
|
||||
var onlys = '<div class="onlys">';
|
||||
if (method.options.post_only) {
|
||||
onlys+= 'POST only. ';
|
||||
}
|
||||
if (method.options.admin_only) {
|
||||
onlys+= 'Admin only. ';
|
||||
}
|
||||
onlys+= '</div>';
|
||||
|
||||
method.description = onlys + method.description;
|
||||
}
|
||||
|
||||
if (method.description != "") {
|
||||
$("#methodDescription blockquote").html(method.description);
|
||||
$("#methodDescription").show();
|
||||
}
|
||||
|
||||
$("#requestFormat").val(method.options.post_only ? 'post' : 'get');
|
||||
|
||||
var methodParams = '';
|
||||
if (method.params && method.params.length>0) {
|
||||
for (var i=0; i<method.params.length; i++) {
|
||||
|
@ -530,4 +549,4 @@ function invokeMethod(methodName, newWindow) {
|
|||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
82
ws.php
82
ws.php
|
@ -137,7 +137,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'pwg.getInfos',
|
||||
'ws_getInfos',
|
||||
null,
|
||||
'<b>Admin only.</b> Returns general informations.',
|
||||
'Returns general informations.',
|
||||
$ws_functions_root . 'pwg.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -149,7 +149,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'image_id'=> array('flags'=>WS_PARAM_FORCE_ARRAY,
|
||||
'type'=>WS_TYPE_ID),
|
||||
),
|
||||
'<b>Admin only.</b> Adds elements to the caddie. Returns the number of elements added.',
|
||||
'Adds elements to the caddie. Returns the number of elements added.',
|
||||
$ws_functions_root . 'pwg.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -212,7 +212,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'prev_page' => array('default'=>null,
|
||||
'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
|
||||
), $f_params),
|
||||
'<b>Admin only.</b> Returns a list of derivatives to build.',
|
||||
'Returns a list of derivatives to build.',
|
||||
$ws_functions_root . 'pwg.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -226,7 +226,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'content' => array(),
|
||||
'key' => array(),
|
||||
),
|
||||
'<b>POST only.</b> Adds a comment to an image.',
|
||||
'Adds a comment to an image.',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('post_only'=>true)
|
||||
);
|
||||
|
@ -283,7 +283,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'level' => array('maxValue'=>max($conf['available_permission_levels']),
|
||||
'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Sets the privacy levels for the images.',
|
||||
'Sets the privacy levels for the images.',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -296,7 +296,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'category_id' => array('type'=>WS_TYPE_ID),
|
||||
'rank' => array('type'=>WS_TYPE_INT|WS_TYPE_POSITIVE|WS_TYPE_NOTNULL)
|
||||
),
|
||||
'<b>Admin & POST only.</b> Sets the rank of a photo for a given album.',
|
||||
'Sets the rank of a photo for a given album.',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -308,7 +308,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'user_id' => array('type'=>WS_TYPE_ID),
|
||||
'anonymous_id' => array('default'=>null),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Deletes all rates for a user.',
|
||||
'Deletes all rates for a user.',
|
||||
$ws_functions_root . 'pwg.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -325,7 +325,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'pwg.session.login',
|
||||
'ws_session_login',
|
||||
array('username', 'password'),
|
||||
'<b>POST only.</b> Tries to login the user.',
|
||||
'Tries to login the user.',
|
||||
$ws_functions_root . 'pwg.php',
|
||||
array('post_only'=>true)
|
||||
);
|
||||
|
@ -384,7 +384,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'info'=>'Must be "file", for backward compatiblity "high" and "thumb" are allowed.'),
|
||||
'position' => array()
|
||||
),
|
||||
'<b>Admin & POST only.</b> Add a chunk of a file.',
|
||||
'Add a chunk of a file.',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -398,7 +398,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'info'=>'Must be "file", for backward compatiblity "high" and "thumb" are allowed.'),
|
||||
'sum' => array(),
|
||||
),
|
||||
'<b>Admin only.</b> Add or update a file for an existing photo.
|
||||
'Add or update a file for an existing photo.
|
||||
<br>pwg.images.addChunk must have been called before (maybe several times).',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('admin_only'=>true)
|
||||
|
@ -430,7 +430,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'image_id' => array('default'=>null,
|
||||
'type'=>WS_TYPE_ID),
|
||||
),
|
||||
'<b>Admin only.</b> Add an image.
|
||||
'Add an image.
|
||||
<br>pwg.images.addChunk must have been called before (maybe several times).
|
||||
<br>Don\'t use "thumbnail_sum" and "high_sum", these parameters are here for backward compatibility.',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
|
@ -455,7 +455,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'image_id' => array('default'=>null,
|
||||
'type'=>WS_TYPE_ID),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Add an image.
|
||||
'Add an image.
|
||||
<br>Use the <b>$_FILES[image]</b> field for uploading file.
|
||||
<br>Set the form encoding to "form-data".
|
||||
<br>You can update an existing photo if you define an existing image_id.',
|
||||
|
@ -470,7 +470,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'image_id' => array('flags'=>WS_PARAM_ACCEPT_ARRAY),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Deletes image(s).',
|
||||
'Deletes image(s).',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -479,7 +479,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'pwg.categories.getAdminList',
|
||||
'ws_categories_getAdminList',
|
||||
null,
|
||||
'<b>Admin only.</b>',
|
||||
'Get albums list as displayed on admin page.',
|
||||
$ws_functions_root . 'pwg.categories.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -499,7 +499,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'commentable' => array('default'=>true,
|
||||
'type'=>WS_TYPE_BOOL),
|
||||
),
|
||||
'<b>Admin only.</b> Adds an album.',
|
||||
'Adds an album.',
|
||||
$ws_functions_root . 'pwg.categories.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -512,7 +512,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'photo_deletion_mode' => array('default'=>'delete_orphans'),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Deletes album(s).
|
||||
'Deletes album(s).
|
||||
<br><b>photo_deletion_mode</b> can be "no_delete" (may create orphan photos), "delete_orphans"
|
||||
(default mode, only deletes photos linked to no other album) or "force_delete" (delete all photos, even those linked to other albums)',
|
||||
$ws_functions_root . 'pwg.categories.php',
|
||||
|
@ -527,7 +527,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'parent' => array('type'=>WS_TYPE_INT|WS_TYPE_POSITIVE),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Move album(s).
|
||||
'Move album(s).
|
||||
<br>Set parent as 0 to move to gallery root. Only virtual categories can be moved.',
|
||||
$ws_functions_root . 'pwg.categories.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
|
@ -540,7 +540,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'category_id' => array('type'=>WS_TYPE_ID),
|
||||
'image_id' => array('type'=>WS_TYPE_ID),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Sets the representative photo for an album. The photo doesn\'t have to belong to the album.',
|
||||
'Sets the representative photo for an album. The photo doesn\'t have to belong to the album.',
|
||||
$ws_functions_root . 'pwg.categories.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -558,7 +558,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'pwg.tags.add',
|
||||
'ws_tags_add',
|
||||
array('name'),
|
||||
'<b>Admin only.</b> Adds a new tag.',
|
||||
'Adds a new tag.',
|
||||
$ws_functions_root . 'pwg.tags.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -570,7 +570,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'md5sum_list' => array('default'=>null),
|
||||
'filename_list' => array('default'=>null),
|
||||
),
|
||||
'<b>Admin only.</b> Checks existence of images.
|
||||
'Checks existence of images.
|
||||
<br>Give <b>md5sum_list</b> if $conf[uniqueness_mode]==md5sum. Give <b>filename_list</b> if $conf[uniqueness_mode]==filename.',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('admin_only'=>true)
|
||||
|
@ -585,7 +585,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'thumbnail_sum' => array('default'=>null),
|
||||
'high_sum' => array('default'=>null),
|
||||
),
|
||||
'<b>Admin only.</b> Checks if you have updated version of your files for a given photo, the answer can be "missing", "equals" or "differs".
|
||||
'Checks if you have updated version of your files for a given photo, the answer can be "missing", "equals" or "differs".
|
||||
<br>Don\'t use "thumbnail_sum" and "high_sum", these parameters are here for backward compatibility.',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('admin_only'=>true)
|
||||
|
@ -595,7 +595,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'pwg.images.checkUpload',
|
||||
'ws_images_checkUpload',
|
||||
null,
|
||||
'<b>Admin only.</b> Checks if Piwigo is ready for upload.',
|
||||
'Checks if Piwigo is ready for upload.',
|
||||
$ws_functions_root . 'pwg.images.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -620,7 +620,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'single_value_mode' => array('default'=>'fill_if_empty'),
|
||||
'multiple_value_mode' => array('default'=>'append'),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Changes properties of an image.
|
||||
'Changes properties of an image.
|
||||
<br><b>single_value_mode</b> can be "fill_if_empty" (only use the input value if the corresponding values is currently empty) or "replace"
|
||||
(overwrite any existing value) and applies to single values properties like name/author/date_creation/comment.
|
||||
<br><b>multiple_value_mode</b> can be "append" (no change on existing values, add the new values) or "replace" and applies to multiple values properties like tag_ids/categories.',
|
||||
|
@ -636,7 +636,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'name' => array('default'=>null),
|
||||
'comment' => array('default'=>null),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Changes properties of an album.',
|
||||
'Changes properties of an album.',
|
||||
$ws_functions_root . 'pwg.categories.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -645,7 +645,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'pwg.plugins.getList',
|
||||
'ws_plugins_getList',
|
||||
null,
|
||||
'<b>Admin only.</b> Gets the list of plugins with id, name, version, state and description.',
|
||||
'Gets the list of plugins with id, name, version, state and description.',
|
||||
$ws_functions_root . 'pwg.extensions.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -658,7 +658,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'plugin' => array(),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'<b>Admin only.</b>',
|
||||
null,
|
||||
$ws_functions_root . 'pwg.extensions.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -671,7 +671,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'theme' => array(),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'<b>Admin only.</b>',
|
||||
null,
|
||||
$ws_functions_root . 'pwg.extensions.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -711,7 +711,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'pwg.extensions.checkUpdates',
|
||||
'ws_extensions_checkupdates',
|
||||
null,
|
||||
'<b>Admin only.</b> Checks if piwigo or extensions are up to date.',
|
||||
'Checks if piwigo or extensions are up to date.',
|
||||
$ws_functions_root . 'pwg.extensions.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -732,7 +732,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'order' => array('default'=>'name',
|
||||
'info'=>'id, name, nb_users, is_default'),
|
||||
),
|
||||
'<b>Admin only.</b> Retrieves a list of all groups. The list can be filtered.',
|
||||
'Retrieves a list of all groups. The list can be filtered.',
|
||||
$ws_functions_root . 'pwg.groups.php',
|
||||
array('admin_only'=>true)
|
||||
);
|
||||
|
@ -745,7 +745,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'is_default' => array('default'=>false,
|
||||
'type'=>WS_TYPE_BOOL),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Creates a group and returns the new group record.',
|
||||
'Creates a group and returns the new group record.',
|
||||
$ws_functions_root . 'pwg.groups.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -758,7 +758,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'type'=>WS_TYPE_ID),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Deletes a or more groups. Users and photos are not deleted.',
|
||||
'Deletes a or more groups. Users and photos are not deleted.',
|
||||
$ws_functions_root . 'pwg.groups.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -772,7 +772,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'is_default' => array('flags'=>WS_PARAM_OPTIONAL,
|
||||
'type'=>WS_TYPE_BOOL),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Updates a group. Leave a field blank to keep the current value.',
|
||||
'Updates a group. Leave a field blank to keep the current value.',
|
||||
$ws_functions_root . 'pwg.groups.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -785,7 +785,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'user_id' => array('flags'=>WS_PARAM_FORCE_ARRAY,
|
||||
'type'=>WS_TYPE_ID),
|
||||
),
|
||||
'<b>Admin only.</b> Adds one or more users to a group.',
|
||||
'Adds one or more users to a group.',
|
||||
$ws_functions_root . 'pwg.groups.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -798,7 +798,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'user_id' => array('flags'=>WS_PARAM_FORCE_ARRAY,
|
||||
'type'=>WS_TYPE_ID),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Removes one or more users from a group.',
|
||||
'Removes one or more users from a group.',
|
||||
$ws_functions_root . 'pwg.groups.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -828,7 +828,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'display' => array('default'=>'basics',
|
||||
'info'=>'all,basics,none,username,email,status,level,groups,language,theme,nb_image_page,recent_period,expand,show_nb_comments,show_nb_hits,enabled_high'),
|
||||
),
|
||||
'<b>Admin only.</b> Retrieves a list of all the users.
|
||||
'Retrieves a list of all the users.
|
||||
<br>"display" controls which data are returned, "basics" stands for "username,email,status,level,groups"',
|
||||
$ws_functions_root . 'pwg.users.php',
|
||||
array('admin_only'=>true)
|
||||
|
@ -844,7 +844,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'email' => array('default'=>null),
|
||||
'send_password_by_mail' => array('default'=>false, 'type'=>WS_TYPE_BOOL),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Registers a new user.',
|
||||
'Registers a new user.',
|
||||
$ws_functions_root . 'pwg.users.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -857,7 +857,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'type'=>WS_TYPE_ID),
|
||||
'pwg_token' => array(),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Deletes on or more users. Photos owned by this user are not deleted.',
|
||||
'Deletes on or more users. Photos owned by this user are not deleted.',
|
||||
$ws_functions_root . 'pwg.users.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -892,7 +892,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'enabled_high' => array('flags'=>WS_PARAM_OPTIONAL,
|
||||
'type'=>WS_TYPE_BOOL),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Updates a user. Leave a field blank to keep the current value.
|
||||
'Updates a user. Leave a field blank to keep the current value.
|
||||
<br>"username", "password" and "email" are ignored if "user_id" is an array.',
|
||||
$ws_functions_root . 'pwg.users.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
|
@ -909,7 +909,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'user_id' => array('flags'=>WS_PARAM_FORCE_ARRAY|WS_PARAM_OPTIONAL,
|
||||
'type'=>WS_TYPE_ID),
|
||||
),
|
||||
'<b>Admin only.</b> Returns permissions: user ids and group ids having access to each album ; this list can be filtered.
|
||||
'Returns permissions: user ids and group ids having access to each album ; this list can be filtered.
|
||||
<br>Provide only one parameter!',
|
||||
$ws_functions_root . 'pwg.permissions.php',
|
||||
array('admin_only'=>true)
|
||||
|
@ -928,7 +928,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'recursive' => array('default'=>false,
|
||||
'type'=>WS_TYPE_BOOL),
|
||||
),
|
||||
'<b>Admin only.</b> Adds permissions to an album.',
|
||||
'Adds permissions to an album.',
|
||||
$ws_functions_root . 'pwg.permissions.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
@ -944,7 +944,7 @@ function ws_addDefaultMethods( $arr )
|
|||
'user_id' => array('flags'=>WS_PARAM_FORCE_ARRAY|WS_PARAM_OPTIONAL,
|
||||
'type'=>WS_TYPE_ID),
|
||||
),
|
||||
'<b>Admin & POST only.</b> Removes permissions from an album.',
|
||||
'Removes permissions from an album.',
|
||||
$ws_functions_root . 'pwg.permissions.php',
|
||||
array('admin_only'=>true, 'post_only'=>true)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue