Changeset 25077 for trunk/ws.php
- Timestamp:
- Oct 22, 2013, 2:58:58 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ws.php
r20817 r25077 104 104 include_once(PHPWG_ROOT_PATH.'include/ws_functions.inc.php'); 105 105 106 $f_params = array( 107 'f_min_rate' => array('default'=>null, 108 'type'=>WS_TYPE_FLOAT), 109 'f_max_rate' => array('default'=>null, 110 'type'=>WS_TYPE_FLOAT), 111 'f_min_hit' => array('default'=>null, 112 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 113 'f_max_hit' => array('default'=>null, 114 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 115 'f_min_ratio' => array('default'=>null, 116 'type'=>WS_TYPE_FLOAT|WS_TYPE_POSITIVE), 117 'f_max_ratio' => array('default'=>null, 118 'type'=>WS_TYPE_FLOAT|WS_TYPE_POSITIVE), 119 'f_max_level' => array('default'=>null, 120 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 121 'f_min_date_available' => array('default'=>null), 122 'f_max_date_available' => array('default'=>null), 123 'f_min_date_created' => array('default'=>null), 124 'f_max_date_created' => array('default'=>null), 125 ); 126 106 127 $service->addMethod( 107 128 'pwg.getVersion', 108 129 'ws_getVersion', 109 130 null, 110 ' retrieves the PWG version'131 'Returns the Piwigo version.' 111 132 ); 112 133 … … 115 136 'ws_getInfos', 116 137 null, 117 ' retrieves general informations'138 '<b>Admin only.</b> Returns general informations.' 118 139 ); 119 140 … … 122 143 'ws_caddie_add', 123 144 array( 124 'image_id'=> array('flags'=>WS_PARAM_FORCE_ARRAY), 125 ), 126 'adds the elements to the caddie' 145 'image_id'=> array('flags'=>WS_PARAM_FORCE_ARRAY, 146 'type'=>WS_TYPE_ID), 147 ), 148 '<b>Admin only.</b> Adds elements to the caddie. Returns the number of elements added.' 127 149 ); 128 150 … … 130 152 'pwg.categories.getImages', 131 153 'ws_categories_getImages', 132 array( 133 'cat_id' => array('default'=>0, 134 'flags'=>WS_PARAM_FORCE_ARRAY), 135 'recursive' => array('default'=>false ), 136 'per_page' => array('default'=>100, 137 'maxValue'=>$conf['ws_max_images_per_page']), 138 'page' => array('default'=>0), 139 'order' => array('default'=>null), 140 'f_min_rate' => array('default'=>null), 141 'f_max_rate' => array('default'=>null), 142 'f_min_hit' => array('default'=>null), 143 'f_max_hit' => array('default'=>null), 144 'f_min_date_available' => array('default'=>null), 145 'f_max_date_available' => array('default'=>null), 146 'f_min_date_created' => array('default'=>null), 147 'f_max_date_created' => array('default'=>null), 148 'f_min_ratio' => array('default'=>null), 149 'f_max_ratio' => array('default'=>null), 150 'f_max_level' => array('default'=>null), 151 ), 154 array_merge(array( 155 'cat_id' => array('default'=>null, 156 'flags'=>WS_PARAM_FORCE_ARRAY, 157 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 158 'recursive' => array('default'=>false, 159 'type'=>WS_TYPE_BOOL), 160 'per_page' => array('default'=>100, 161 'maxValue'=>$conf['ws_max_images_per_page'], 162 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 163 'page' => array('default'=>0, 164 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 165 'order' => array('default'=>null, 166 'info'=>'id, file, name, hit, rating_score, date_creation, date_available, random'), 167 ), $f_params), 152 168 'Returns elements for the corresponding categories. 153 <br><b>cat_id</b> can be empty if <b>recursive</b> is true. Can be sent as an array.154 <br><b>order</b> comma separated fields for sorting (file,id, rating_score,...)'169 <br><b>cat_id</b> can be empty if <b>recursive</b> is true. 170 <br><b>order</b> comma separated fields for sorting' 155 171 ); 156 172 … … 159 175 'ws_categories_getList', 160 176 array( 161 'cat_id' => array('default'=>0), 162 'recursive' => array('default'=>false), 163 'public' => array('default'=>false), 164 'tree_output' => array('default'=>false), 165 'fullname' => array('default'=>false), 166 ), 167 'retrieves a list of categories (tree_output option only compatible with json/php output format' 177 'cat_id' => array('default'=>null, 178 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE, 179 'info'=>'Parent category. "0" or empty for root.'), 180 'recursive' => array('default'=>false, 181 'type'=>WS_TYPE_BOOL), 182 'public' => array('default'=>false, 183 'type'=>WS_TYPE_BOOL), 184 'tree_output' => array('default'=>false, 185 'type'=>WS_TYPE_BOOL), 186 'fullname' => array('default'=>false, 187 'type'=>WS_TYPE_BOOL), 188 ), 189 'Returns a list of categories.' 168 190 ); 169 191 … … 171 193 'pwg.getMissingDerivatives', 172 194 'ws_getMissingDerivatives', 173 array( 174 'types' => array('default'=>array(), 175 'flags'=>WS_PARAM_FORCE_ARRAY), 176 'ids' => array('default'=>array(), 177 'flags'=>WS_PARAM_FORCE_ARRAY), 178 'max_urls' => array('default'=>200), 179 'prev_page' => array('default'=>null), 180 'f_min_rate' => array('default'=>null), 181 'f_max_rate' => array('default'=>null), 182 'f_min_hit' => array('default'=>null), 183 'f_max_hit' => array('default'=>null), 184 'f_min_date_available' => array('default'=>null), 185 'f_max_date_available' => array('default'=>null), 186 'f_min_date_created' => array('default'=>null), 187 'f_max_date_created' => array('default'=>null), 188 'f_min_ratio' => array('default'=>null), 189 'f_max_ratio' => array('default'=>null), 190 'f_max_level' => array('default'=>null), 191 ), 192 'retrieves a list of derivatives to build' 195 array_merge(array( 196 'types' => array('default'=>null, 197 'flags'=>WS_PARAM_FORCE_ARRAY, 198 'info'=>'square, thumb, 2small, xsmall, small, medium, large, xlarge, xxlarge'), 199 'ids' => array('default'=>null, 200 'flags'=>WS_PARAM_FORCE_ARRAY, 201 'type'=>WS_TYPE_ID), 202 'max_urls' => array('default'=>200, 203 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 204 'prev_page' => array('default'=>null, 205 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 206 ), $f_params), 207 '<b>Admin only.</b> Returns a list of derivatives to build.' 193 208 ); 194 209 … … 197 212 'ws_images_addComment', 198 213 array( 199 'image_id' => array( ),214 'image_id' => array('type'=>WS_TYPE_ID), 200 215 'author' => array('default'=>is_a_guest()?'guest':$user['username']), 201 216 'content' => array(), 202 217 'key' => array(), 203 218 ), 204 ' add a comment to an image'219 '<b>POST only.</b> Adds a comment to an image.' 205 220 ); 206 221 … … 209 224 'ws_images_getInfo', 210 225 array( 211 'image_id' => array(), 212 'comments_page' => array('default'=>0 ), 213 'comments_per_page' => array('default' => $conf['nb_comment_page'], 214 'maxValue' => 2*$conf['nb_comment_page']), 215 ), 216 'retrieves information about the given photo' 226 'image_id' => array('type'=>WS_TYPE_ID), 227 'comments_page' => array('default'=>0, 228 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 229 'comments_per_page' => array('default'=>$conf['nb_comment_page'], 230 'maxValue'=>2*$conf['nb_comment_page'], 231 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 232 ), 233 'Returns information about an image.' 217 234 ); 218 235 … … 220 237 'pwg.images.rate', 221 238 'ws_images_rate', 222 array('image_id', 'rate'), 223 'rate the image' 239 array( 240 'image_id' => array('type'=>WS_TYPE_ID), 241 'rate' => array('type'=>WS_TYPE_FLOAT), 242 ), 243 'Rates an image.' 224 244 ); 225 245 … … 227 247 'pwg.images.search', 228 248 'ws_images_search', 229 array( 230 'query' => array(), 231 'per_page' => array('default'=>100, 232 'maxValue'=>$conf['ws_max_images_per_page']), 233 'page' => array('default'=>0), 234 'order' => array('default'=>null), 235 'f_min_rate' => array('default'=>null), 236 'f_max_rate' => array('default'=>null), 237 'f_min_hit' => array('default'=>null), 238 'f_max_hit' => array('default'=>null), 239 'f_min_date_available' => array('default'=>null), 240 'f_max_date_available' => array('default'=>null), 241 'f_min_date_created' => array('default'=>null), 242 'f_max_date_created' => array('default'=>null), 243 'f_min_ratio' => array('default'=>null), 244 'f_max_ratio' => array('default'=>null), 245 'f_max_level' => array('default'=>null), 246 ), 249 array_merge(array( 250 'query' => array(), 251 'per_page' => array('default'=>100, 252 'maxValue'=>$conf['ws_max_images_per_page'], 253 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 254 'page' => array('default'=>0, 255 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 256 'order' => array('default'=>null, 257 'info'=>'id, file, name, hit, rating_score, date_creation, date_available, random'), 258 ), $f_params), 247 259 'Returns elements for the corresponding query search.' 248 260 ); … … 252 264 'ws_images_setPrivacyLevel', 253 265 array( 254 'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY), 255 'level' => array('maxValue'=>$conf['available_permission_levels']), 256 ), 257 'sets the privacy levels for the images (POST method only)' 266 'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY, 267 'type'=>WS_TYPE_ID), 268 'level' => array('maxValue'=>max($conf['available_permission_levels']), 269 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 270 ), 271 '<b>Admin & POST only.</b> Sets the privacy levels for the images.' 258 272 ); 259 273 … … 261 275 'pwg.images.setRank', 262 276 'ws_images_setRank', 263 array('image_id', 'category_id', 'rank'), 264 'sets the rank of a photo for a given album (POST method only, for admins)' 277 array( 278 'image_id' => array('type'=>WS_TYPE_ID), 279 'category_id' => array('type'=>WS_TYPE_ID), 280 'rank' => array('type'=>WS_TYPE_INT|WS_TYPE_POSITIVE|WS_TYPE_NOTNULL) 281 ), 282 '<b>Admin & POST only.</b> Sets the rank of a photo for a given album.' 265 283 ); 266 284 … … 269 287 'ws_rates_delete', 270 288 array( 271 'user_id' => array( ),289 'user_id' => array('type'=>WS_TYPE_ID), 272 290 'anonymous_id' => array('default'=>null), 273 291 ), 274 ' deletes all rates for a user (POST method only, admins only)'292 '<b>Admin & POST only.</b> Deletes all rates for a user.' 275 293 ); 276 294 … … 279 297 'ws_session_getStatus', 280 298 null, 281 null299 'Gets information about the current session. Also provides a token useable with admin methods.' 282 300 ); 283 301 … … 286 304 'ws_session_login', 287 305 array('username', 'password'), 288 ' POST method only'306 '<b>POST only.</b> Tries to login the user.' 289 307 ); 290 308 … … 293 311 'ws_session_logout', 294 312 null, 295 null313 'Ends the current session.' 296 314 ); 297 315 … … 300 318 'ws_tags_getList', 301 319 array( 302 'sort_by_counter' => array('default' =>false), 303 ), 304 'retrieves a list of available tags' 320 'sort_by_counter' => array('default'=>false, 321 'type'=>WS_TYPE_BOOL), 322 ), 323 'Retrieves a list of available tags.' 305 324 ); 306 325 … … 308 327 'pwg.tags.getImages', 309 328 'ws_tags_getImages', 310 array (329 array_merge(array( 311 330 'tag_id' => array('default'=>null, 312 'flags'=>WS_PARAM_FORCE_ARRAY), 331 'flags'=>WS_PARAM_FORCE_ARRAY, 332 'type'=>WS_TYPE_ID), 313 333 'tag_url_name' => array('default'=>null, 314 334 'flags'=>WS_PARAM_FORCE_ARRAY), 315 335 'tag_name' => array('default'=>null, 316 336 'flags'=>WS_PARAM_FORCE_ARRAY), 317 'tag_mode_and' => array('default'=>false), 337 'tag_mode_and' => array('default'=>false, 338 'type'=>WS_TYPE_BOOL), 318 339 'per_page' => array('default'=>100, 319 'maxValue'=>$conf['ws_max_images_per_page']), 320 'page' => array('default'=>0), 321 'order' => array('default'=>null), 322 'f_min_rate' => array('default'=>null), 323 'f_max_rate' => array('default'=>null), 324 'f_min_hit' => array('default'=>null), 325 'f_max_hit' => array('default'=>null), 326 'f_min_date_available' => array('default'=>null), 327 'f_max_date_available' => array('default'=>null), 328 'f_min_date_created' => array('default'=>null), 329 'f_max_date_created' => array('default'=>null), 330 'f_min_ratio' => array('default'=>null), 331 'f_max_ratio' => array('default'=>null), 332 'f_max_level' => array('default'=>null), 333 ), 334 'Returns elements for the corresponding tags. Note that tag_id, tag_url_name, tag_name an be arrays. Fill at least one of them. ' 340 'maxValue'=>$conf['ws_max_images_per_page'], 341 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 342 'page' => array('default'=>0, 343 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 344 'order' => array('default'=>null, 345 'info'=>'id, file, name, hit, rating_score, date_creation, date_available, random'), 346 ), $f_params), 347 'Returns elements for the corresponding tags. Fill at least tag_id, tag_url_name or tag_name.' 335 348 ); 336 349 … … 338 351 'pwg.images.addChunk', 339 352 'ws_images_add_chunk', 340 array('data', 'original_sum', 'type', 'position'), 341 'POST method only. For admin only.' 353 array( 354 'data' => array(), 355 'original_sum' => array(), 356 'type' => array('default'=>'file', 357 'info'=>'Must be "file", for backward compatiblity "high" and "thumb" are allowed.'), 358 'position' => array() 359 ), 360 '<b>Admin & POST only.</b> Add a chunk of a file.' 342 361 ); 343 362 … … 345 364 'pwg.images.addFile', 346 365 'ws_images_addFile', 347 array('image_id', 'type', 'sum'), 348 'Add or update a file for an existing photo. pwg.images.addChunk must have been called before (maybe several times)' 366 array( 367 'image_id' => array('type'=>WS_TYPE_ID), 368 'type' => array('default'=>'file', 369 'info'=>'Must be "file", for backward compatiblity "high" and "thumb" are allowed.'), 370 'sum' => array(), 371 ), 372 '<b>Admin only.</b> Add or update a file for an existing photo. 373 <br>pwg.images.addChunk must have been called before (maybe several times).' 349 374 ); 350 375 … … 354 379 'ws_images_add', 355 380 array( 356 'file_sum' => array(),357 381 'thumbnail_sum' => array('default'=>null), 358 382 'high_sum' => array('default'=>null), 359 383 'original_sum' => array(), 360 'original_filename' => array('default'=>null), 384 'original_filename' => array('default'=>null, 385 'Provide it if "check_uniqueness" is true and $conf["uniqueness_mode"] is "filename".'), 361 386 'name' => array('default'=>null), 362 387 'author' => array('default'=>null), 363 388 'date_creation' => array('default'=>null), 364 389 'comment' => array('default'=>null), 365 'categories' => array('default'=>null), 366 'tag_ids' => array('default'=>null), 390 'categories' => array('default'=>null, 391 'info'=>'String list "category_id[,rank];category_id[,rank]".<br>The rank is optional and is equivalent to "auto" if not given.'), 392 'tag_ids' => array('default'=>null, 393 'info'=>'Comma separated ids'), 367 394 'level' => array('default'=>0, 368 'maxValue'=>$conf['available_permission_levels']), 369 'check_uniqueness' => array('default'=>true), 370 'image_id' => array('default'=>null), 371 ), 372 'POST method only. 373 <br><b>categories</b> is a string list "category_id[,rank];category_id[,rank]" 374 The rank is optional and is equivalent to "auto" if not given.' 395 'maxValue'=>max($conf['available_permission_levels']), 396 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 397 'check_uniqueness' => array('default'=>true, 398 'type'=>WS_TYPE_BOOL), 399 'image_id' => array('default'=>null, 400 'type'=>WS_TYPE_ID), 401 ), 402 '<b>Admin only.</b> Add an image. 403 <br>pwg.images.addChunk must have been called before (maybe several times). 404 <br>Don\'t use "thumbnail_sum" and "high_sum", these parameters are here for backward compatibility.' 375 405 ); 376 406 … … 379 409 'ws_images_addSimple', 380 410 array( 381 'category' => array('default'=>null), 411 'category' => array('default'=>null, 412 'flags'=>WS_PARAM_FORCE_ARRAY, 413 'type'=>WS_TYPE_ID), 382 414 'name' => array('default'=>null), 383 415 'author' => array('default'=>null), 384 416 'comment' => array('default'=>null), 385 417 'level' => array('default'=>0, 386 'maxValue'=>$conf['available_permission_levels']), 418 'maxValue'=>max($conf['available_permission_levels']), 419 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 387 420 'tags' => array('default'=>null, 388 421 'flags'=>WS_PARAM_ACCEPT_ARRAY), 389 'image_id' => array('default'=>null), 390 ), 391 'POST method only.<br>Use the <b>image</b> field for uploading file. 392 <br>Set the form encoding to "form-data"<br><b>category</b> is the numeric identifier of the destination category. 422 'image_id' => array('default'=>null, 423 'type'=>WS_TYPE_ID), 424 ), 425 '<b>Admin & POST only.</b> Add an image. 426 <br>Use the <b>$_FILES[image]</b> field for uploading file. 427 <br>Set the form encoding to "form-data". 393 428 <br>You can update an existing photo if you define an existing image_id.' 394 429 ); … … 398 433 'ws_images_delete', 399 434 array( 400 'image_id' => array(' default'=>0),435 'image_id' => array('flags'=>WS_PARAM_ACCEPT_ARRAY), 401 436 'pwg_token' => array(), 402 437 ), 403 ' Delete photos. You can give several image_ids, comma separated'438 '<b>Admin & POST only.</b> Deletes image(s).' 404 439 ); 405 440 … … 408 443 'ws_categories_getAdminList', 409 444 null, 410 ' administration method only'445 '<b>Admin only.</b>' 411 446 ); 412 447 … … 416 451 array( 417 452 'name' => array(), 418 'parent' => array('default'=>null), 453 'parent' => array('default'=>null, 454 'type'=>WS_TYPE_ID), 419 455 'comment' => array('default'=>null), 420 'visible' => array('default'=>null), 421 'status' => array('default'=>null), 422 'commentable' => array('default'=>'true'), 423 ), 424 'administration method only' 456 'visible' => array('default'=>true, 457 'type'=>WS_TYPE_BOOL), 458 'status' => array('default'=>null, 459 'info'=>'public, private'), 460 'commentable' => array('default'=>true, 461 'type'=>WS_TYPE_BOOL), 462 ), 463 '<b>Admin only.</b> Adds an album.' 425 464 ); 426 465 … … 429 468 'ws_categories_delete', 430 469 array( 431 'category_id'=> array('default'=>0), 470 'category_id'=> array('flags'=>WS_PARAM_ACCEPT_ARRAY), 471 'photo_deletion_mode' => array('default'=>'delete_orphans'), 432 472 'pwg_token' => array(), 433 'photo_deletion_mode' => array('default'=>'delete_orphans'), 434 ), 435 'Delete categories. You can give several category_ids, comma separated. 473 ), 474 '<b>Admin & POST only.</b> Deletes album(s). 436 475 <br><b>photo_deletion_mode</b> can be "no_delete" (may create orphan photos), "delete_orphans" 437 476 (default mode, only deletes photos linked to no other album) or "force_delete" (delete all photos, even those linked to other albums)' … … 442 481 'ws_categories_move', 443 482 array( 444 'category_id' => array(' default'=>0),445 'parent' => array(' default'=>0),483 'category_id' => array('flags'=>WS_PARAM_ACCEPT_ARRAY), 484 'parent' => array('type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 446 485 'pwg_token' => array(), 447 486 ), 448 'Move categories. You can give several category_ids, comma separated. Set parent as 0 to move to gallery root. Only virtual categories can be moved.' 487 '<b>Admin & POST only.</b> Move album(s). 488 <br>Set parent as 0 to move to gallery root. Only virtual categories can be moved.' 449 489 ); 450 490 … … 453 493 'ws_categories_setRepresentative', 454 494 array( 455 'category_id' => array(' default'=>0),456 'image_id' => array(' default'=>0),457 ), 458 ' Set the representative photo for an album. The photo doesn\'t have to belong to the album. POST method only. Administration method only.'495 'category_id' => array('type'=>WS_TYPE_ID), 496 'image_id' => array('type'=>WS_TYPE_ID), 497 ), 498 '<b>Admin & POST only.</b> Sets the representative photo for an album. The photo doesn\'t have to belong to the album.' 459 499 ); 460 500 … … 463 503 'ws_tags_getAdminList', 464 504 null, 465 ' administration method only'466 ); 467 468 $service->addMethod( 505 '<b>Admin only.</b> ' 506 ); 507 508 $service->addMethod( // TODO: create multiple tags 469 509 'pwg.tags.add', 470 510 'ws_tags_add', 471 511 array('name'), 472 ' administration method only'512 '<b>Admin only.</b> Adds a new tag.' 473 513 ); 474 514 … … 480 520 'filename_list' => array('default'=>null), 481 521 ), 482 'check existence of a photo list' 522 '<b>Admin only.</b> Checks existence of images. 523 <br>Give <b>md5sum_list</b> if $conf[uniqueness_mode]==md5sum. Give <b>filename_list</b> if $conf[uniqueness_mode]==filename.' 483 524 ); 484 525 … … 487 528 'ws_images_checkFiles', 488 529 array( 489 'image_id' => array(), 530 'image_id' => array('type'=>WS_TYPE_ID), 531 'file_sum' => array('default'=>null), 490 532 'thumbnail_sum' => array('default'=>null), 491 'file_sum' => array('default'=>null),492 533 'high_sum' => array('default'=>null), 493 534 ), 494 'check if you have updated version of your files for a given photo, for each requested file type, the answer can be "missing", "equals" or "differs"' 535 '<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". 536 <br>Don\'t use "thumbnail_sum" and "high_sum", these parameters are here for backward compatibility.' 495 537 ); 496 538 … … 499 541 'ws_images_checkUpload', 500 542 null, 501 ' check if Piwigo is ready for upload'543 '<b>Admin only.</b> Checks if Piwigo is ready for upload.' 502 544 ); 503 545 … … 506 548 'ws_images_setInfo', 507 549 array( 508 'image_id' => array( ),550 'image_id' => array('type'=>WS_TYPE_ID), 509 551 'file' => array('default'=>null), 510 552 'name' => array('default'=>null), … … 512 554 'date_creation' => array('default'=>null), 513 555 'comment' => array('default'=>null), 514 'categories' => array('default'=>null), 515 'tag_ids' => array('default'=>null), 556 'categories' => array('default'=>null, 557 'info'=>'String list "category_id[,rank];category_id[,rank]".<br>The rank is optional and is equivalent to "auto" if not given.'), 558 'tag_ids' => array('default'=>null, 559 'info'=>'Comma separated ids'), 516 560 'level' => array('default'=>null, 517 'maxValue'=>$conf['available_permission_levels']), 561 'maxValue'=>max($conf['available_permission_levels']), 562 'type'=>WS_TYPE_INT|WS_TYPE_POSITIVE), 518 563 'single_value_mode' => array('default'=>'fill_if_empty'), 519 564 'multiple_value_mode' => array('default'=>'append'), 520 565 ), 521 'POST method only. Admin only 522 <br><b>categories</b> is a string list "category_id[,rank];category_id[,rank]" The rank is optional and is equivalent to "auto" if not given. 566 '<b>Admin & POST only.</b> Changes properties of an image. 523 567 <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" 524 (overwrite any existing value) and applies to single values properties like name/author/date_creation/comment 525 <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 '568 (overwrite any existing value) and applies to single values properties like name/author/date_creation/comment. 569 <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.' 526 570 ); 527 571 … … 530 574 'ws_categories_setInfo', 531 575 array( 532 'category_id' => array( ),576 'category_id' => array('type'=>WS_TYPE_ID), 533 577 'name' => array('default'=>null), 534 578 'comment' => array('default'=>null), 535 579 ), 536 ' POST method only.'580 '<b>Admin & POST only.</b> Changes properties of an album.' 537 581 ); 538 582 … … 541 585 'ws_plugins_getList', 542 586 null, 543 'Admin only 544 <br>get the list of plugin with id, name, version, state and description' 587 '<b>Admin only.</b> Gets the list of plugins with id, name, version, state and description.' 545 588 ); 546 589 … … 548 591 'pwg.plugins.performAction', 549 592 'ws_plugins_performAction', 550 array('action', 'plugin', 'pwg_token'), 551 'Admin only 552 <br>install/activate/deactivate/uninstall/delete a plugin' 593 array( 594 'action' => array('info'=>'install, activate, deactivate, uninstall, delete'), 595 'plugin' => array(), 596 'pwg_token' => array(), 597 ), 598 '<b>Admin only.</b>' 553 599 ); 554 600 … … 556 602 'pwg.themes.performAction', 557 603 'ws_themes_performAction', 558 array('action', 'theme', 'pwg_token'), 559 'activate/deactivate/delete/set_default a theme<br>administration status required' 604 array( 605 'action' => array('info'=>'activate, deactivate, delete, set_default'), 606 'theme' => array(), 607 'pwg_token' => array(), 608 ), 609 '<b>Admin only.</b>' 560 610 ); 561 611 … … 563 613 'pwg.extensions.update', 564 614 'ws_extensions_update', 565 array('type', 'id', 'revision', 'pwg_token'), 566 'Update an extension. Webmaster only. 567 <br>Parameter type must be "plugins", "languages" or "themes".' 615 array( 616 'type' => array('info'=>'plugins, languages, themes'), 617 'id' => array(), 618 'revision' => array(), 619 'pwg_token' => array(), 620 ), 621 '<b>Webmaster only.</b>' 568 622 ); 569 623 … … 572 626 'ws_extensions_ignoreupdate', 573 627 array( 574 'type' => array('default'=>null), 628 'type' => array('default'=>null, 629 'info'=>'plugins, languages, themes'), 575 630 'id' => array('default'=>null), 576 'reset' => array('default'=>null), 631 'reset' => array('default'=>false, 632 'type'=>WS_TYPE_BOOL, 633 'info'=>'If true, all ignored extensions will be reinitilized.'), 577 634 'pwg_token' => array(), 578 635 ), 579 'Ignore an extension if it need update. 580 <br>Parameter type must be "plugins", "languages" or "themes". 581 <br>If reset parameter is true, all ignored extensions will be reinitilized.' 636 '<b>Webmaster only.</b> Ignores an extension if it needs update.' 582 637 ); 583 638 … … 586 641 'ws_extensions_checkupdates', 587 642 null, 588 ' Checkif piwigo or extensions are up to date.'643 '<b>Admin only.</b> Checks if piwigo or extensions are up to date.' 589 644 ); 590 645 }
Note: See TracChangeset
for help on using the changeset viewer.