From 07b8dd5770c1bdcaac799df76c324a2baf2e2c66 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Fri, 8 Nov 2013 12:16:14 +0000 Subject: Improve display on ws.htm git-svn-id: http://piwigo.org/svn/trunk@25394 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/ws_core.inc.php | 14 +++++++ tools/ws.htm | 105 ++++++++++++++++++++++++++++-------------------- ws.php | 82 ++++++++++++++++++------------------- 3 files changed, 117 insertions(+), 84 deletions(-) diff --git a/include/ws_core.inc.php b/include/ws_core.inc.php index 704e383ea..6c01d9769 100644 --- a/include/ws_core.inc.php +++ b/include/ws_core.inc.php @@ -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']; diff --git a/tools/ws.htm b/tools/ws.htm index de23c3e67..567bee5d5 100644 --- a/tools/ws.htm +++ b/tools/ws.htm @@ -1,12 +1,12 @@ - + - + Piwigo web API (web-services) explorer - + - +

Piwigo web API (web-services) explorer

@@ -151,33 +154,6 @@
-
-

Method parameters

- - - - - - - - - - - - - - - - - - - -
NameExtraTypeValueSend
- *: required, ?: optional, []: can be an array (use a pipe | to split values)
- B: boolean, I: integer, F: float, +: positive, ø: not null -
-
-

Test

@@ -186,7 +162,7 @@ Request format : @@ -195,7 +171,7 @@ Response format :