Changeset 20817 for trunk/ws.php
- Timestamp:
- Feb 18, 2013, 9:02:55 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ws.php
r20815 r20817 104 104 include_once(PHPWG_ROOT_PATH.'include/ws_functions.inc.php'); 105 105 106 $service->addMethod('pwg.getVersion', 'ws_getVersion', 106 $service->addMethod( 107 'pwg.getVersion', 108 'ws_getVersion', 107 109 null, 108 110 'retrieves the PWG version' 109 111 ); 110 112 111 $service->addMethod('pwg.getInfos', 'ws_getInfos', 113 $service->addMethod( 114 'pwg.getInfos', 115 'ws_getInfos', 112 116 null, 113 117 'retrieves general informations' 114 118 ); 115 119 116 $service->addMethod('pwg.caddie.add', 'ws_caddie_add', 120 $service->addMethod( 121 'pwg.caddie.add', 122 'ws_caddie_add', 117 123 array( 118 124 'image_id'=> array('flags'=>WS_PARAM_FORCE_ARRAY), … … 121 127 ); 122 128 123 $service->addMethod('pwg.categories.getImages', 'ws_categories_getImages', 129 $service->addMethod( 130 'pwg.categories.getImages', 131 'ws_categories_getImages', 124 132 array( 125 133 'cat_id' => array('default'=>0, … … 147 155 ); 148 156 149 $service->addMethod('pwg.categories.getList', 'ws_categories_getList', 157 $service->addMethod( 158 'pwg.categories.getList', 159 'ws_categories_getList', 150 160 array( 151 161 'cat_id' => array('default'=>0), … … 158 168 ); 159 169 160 $service->addMethod('pwg.getMissingDerivatives', 'ws_getMissingDerivatives', 170 $service->addMethod( 171 'pwg.getMissingDerivatives', 172 'ws_getMissingDerivatives', 161 173 array( 162 174 'types' => array('default'=>array(), … … 181 193 ); 182 194 183 $service->addMethod('pwg.images.addComment', 'ws_images_addComment', 195 $service->addMethod( 196 'pwg.images.addComment', 197 'ws_images_addComment', 184 198 array( 185 199 'image_id' => array(), … … 191 205 ); 192 206 193 $service->addMethod('pwg.images.getInfo', 'ws_images_getInfo', 207 $service->addMethod( 208 'pwg.images.getInfo', 209 'ws_images_getInfo', 194 210 array( 195 211 'image_id' => array(), … … 201 217 ); 202 218 203 $service->addMethod('pwg.images.rate', 'ws_images_rate', 219 $service->addMethod( 220 'pwg.images.rate', 221 'ws_images_rate', 204 222 array('image_id', 'rate'), 205 223 'rate the image' 206 224 ); 207 225 208 $service->addMethod('pwg.images.search', 'ws_images_search', 226 $service->addMethod( 227 'pwg.images.search', 228 'ws_images_search', 209 229 array( 210 230 'query' => array(), … … 228 248 ); 229 249 230 $service->addMethod('pwg.images.setPrivacyLevel', 'ws_images_setPrivacyLevel', 250 $service->addMethod( 251 'pwg.images.setPrivacyLevel', 252 'ws_images_setPrivacyLevel', 231 253 array( 232 254 'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY), … … 236 258 ); 237 259 238 $service->addMethod('pwg.images.setRank', 'ws_images_setRank', 260 $service->addMethod( 261 'pwg.images.setRank', 262 'ws_images_setRank', 239 263 array('image_id', 'category_id', 'rank'), 240 264 'sets the rank of a photo for a given album (POST method only, for admins)' 241 265 ); 242 266 243 $service->addMethod('pwg.rates.delete', 'ws_rates_delete', 267 $service->addMethod( 268 'pwg.rates.delete', 269 'ws_rates_delete', 244 270 array( 245 271 'user_id' => array(), … … 249 275 ); 250 276 251 $service->addMethod('pwg.session.getStatus', 'ws_session_getStatus', null, ''); 252 253 $service->addMethod('pwg.session.login', 'ws_session_login', 277 $service->addMethod( 278 'pwg.session.getStatus', 279 'ws_session_getStatus', 280 null, 281 null 282 ); 283 284 $service->addMethod( 285 'pwg.session.login', 286 'ws_session_login', 254 287 array('username', 'password'), 255 288 'POST method only' 256 289 ); 257 290 258 $service->addMethod('pwg.session.logout', 'ws_session_logout', null, ''); 259 260 $service->addMethod('pwg.tags.getList', 'ws_tags_getList', 291 $service->addMethod( 292 'pwg.session.logout', 293 'ws_session_logout', 294 null, 295 null 296 ); 297 298 $service->addMethod( 299 'pwg.tags.getList', 300 'ws_tags_getList', 261 301 array( 262 302 'sort_by_counter' => array('default' =>false), … … 265 305 ); 266 306 267 $service->addMethod('pwg.tags.getImages', 'ws_tags_getImages', 307 $service->addMethod( 308 'pwg.tags.getImages', 309 'ws_tags_getImages', 268 310 array( 269 311 'tag_id' => array('default'=>null, … … 293 335 ); 294 336 295 $service->addMethod('pwg.images.addChunk', 'ws_images_add_chunk', 337 $service->addMethod( 338 'pwg.images.addChunk', 339 'ws_images_add_chunk', 296 340 array('data', 'original_sum', 'type', 'position'), 297 341 'POST method only. For admin only.' 298 342 ); 299 343 300 $service->addMethod('pwg.images.addFile', 'ws_images_addFile', 344 $service->addMethod( 345 'pwg.images.addFile', 346 'ws_images_addFile', 301 347 array('image_id', 'type', 'sum'), 302 348 'Add or update a file for an existing photo. pwg.images.addChunk must have been called before (maybe several times)' … … 304 350 305 351 306 $service->addMethod('pwg.images.add', 'ws_images_add', 352 $service->addMethod( 353 'pwg.images.add', 354 'ws_images_add', 307 355 array( 308 356 'file_sum' => array(), … … 327 375 ); 328 376 329 $service->addMethod('pwg.images.addSimple', 'ws_images_addSimple', 377 $service->addMethod( 378 'pwg.images.addSimple', 379 'ws_images_addSimple', 330 380 array( 331 381 'category' => array('default'=>null), … … 344 394 ); 345 395 346 $service->addMethod('pwg.images.delete', 'ws_images_delete', 396 $service->addMethod( 397 'pwg.images.delete', 398 'ws_images_delete', 347 399 array( 348 400 'image_id' => array('default'=>0), … … 352 404 ); 353 405 354 $service->addMethod('pwg.categories.getAdminList', 'ws_categories_getAdminList', 406 $service->addMethod( 407 'pwg.categories.getAdminList', 408 'ws_categories_getAdminList', 355 409 null, 356 410 'administration method only' 357 411 ); 358 412 359 $service->addMethod('pwg.categories.add', 'ws_categories_add', 413 $service->addMethod( 414 'pwg.categories.add', 415 'ws_categories_add', 360 416 array( 361 417 'name' => array(), … … 369 425 ); 370 426 371 $service->addMethod('pwg.categories.delete', 'ws_categories_delete', 427 $service->addMethod( 428 'pwg.categories.delete', 429 'ws_categories_delete', 372 430 array( 373 431 'category_id'=> array('default'=>0), … … 380 438 ); 381 439 382 $service->addMethod('pwg.categories.move', 'ws_categories_move', 440 $service->addMethod( 441 'pwg.categories.move', 442 'ws_categories_move', 383 443 array( 384 444 'category_id' => array('default'=>0), … … 389 449 ); 390 450 391 $service->addMethod('pwg.categories.setRepresentative', 'ws_categories_setRepresentative', 451 $service->addMethod( 452 'pwg.categories.setRepresentative', 453 'ws_categories_setRepresentative', 392 454 array( 393 455 'category_id' => array('default'=>0), … … 397 459 ); 398 460 399 $service->addMethod('pwg.tags.getAdminList', 'ws_tags_getAdminList', 461 $service->addMethod( 462 'pwg.tags.getAdminList', 463 'ws_tags_getAdminList', 400 464 null, 401 465 'administration method only' 402 466 ); 403 467 404 $service->addMethod('pwg.tags.add', 'ws_tags_add', 468 $service->addMethod( 469 'pwg.tags.add', 470 'ws_tags_add', 405 471 array('name'), 406 472 'administration method only' 407 473 ); 408 474 409 $service->addMethod('pwg.images.exist', 'ws_images_exist', 475 $service->addMethod( 476 'pwg.images.exist', 477 'ws_images_exist', 410 478 array( 411 479 'md5sum_list' => array('default'=>null), … … 415 483 ); 416 484 417 $service->addMethod('pwg.images.checkFiles', 'ws_images_checkFiles', 485 $service->addMethod( 486 'pwg.images.checkFiles', 487 'ws_images_checkFiles', 418 488 array( 419 489 'image_id' => array(), … … 425 495 ); 426 496 427 $service->addMethod('pwg.images.checkUpload', 'ws_images_checkUpload', 497 $service->addMethod( 498 'pwg.images.checkUpload', 499 'ws_images_checkUpload', 428 500 null, 429 501 'check if Piwigo is ready for upload' 430 502 ); 431 503 432 $service->addMethod('pwg.images.setInfo', 'ws_images_setInfo', 504 $service->addMethod( 505 'pwg.images.setInfo', 506 'ws_images_setInfo', 433 507 array( 434 508 'image_id' => array(), … … 452 526 ); 453 527 454 $service->addMethod('pwg.categories.setInfo', 'ws_categories_setInfo', 528 $service->addMethod( 529 'pwg.categories.setInfo', 530 'ws_categories_setInfo', 455 531 array( 456 532 'category_id' => array(), … … 461 537 ); 462 538 463 $service->addMethod('pwg.plugins.getList', 'ws_plugins_getList', 539 $service->addMethod( 540 'pwg.plugins.getList', 541 'ws_plugins_getList', 464 542 null, 465 543 'Admin only … … 467 545 ); 468 546 469 $service->addMethod('pwg.plugins.performAction', 'ws_plugins_performAction', 547 $service->addMethod( 548 'pwg.plugins.performAction', 549 'ws_plugins_performAction', 470 550 array('action', 'plugin', 'pwg_token'), 471 551 'Admin only … … 473 553 ); 474 554 475 $service->addMethod('pwg.themes.performAction', 'ws_themes_performAction', 555 $service->addMethod( 556 'pwg.themes.performAction', 557 'ws_themes_performAction', 476 558 array('action', 'theme', 'pwg_token'), 477 559 'activate/deactivate/delete/set_default a theme<br>administration status required' 478 560 ); 479 561 480 $service->addMethod('pwg.extensions.update', 'ws_extensions_update', 562 $service->addMethod( 563 'pwg.extensions.update', 564 'ws_extensions_update', 481 565 array('type', 'id', 'revision', 'pwg_token'), 482 566 'Update an extension. Webmaster only. … … 484 568 ); 485 569 486 $service->addMethod('pwg.extensions.ignoreUpdate', 'ws_extensions_ignoreupdate', 570 $service->addMethod( 571 'pwg.extensions.ignoreUpdate', 572 'ws_extensions_ignoreupdate', 487 573 array( 488 574 'type' => array('default'=>null), … … 496 582 ); 497 583 498 $service->addMethod('pwg.extensions.checkUpdates', 'ws_extensions_checkupdates', 584 $service->addMethod( 585 'pwg.extensions.checkUpdates', 586 'ws_extensions_checkupdates', 499 587 null, 500 588 'Check if piwigo or extensions are up to date.'
Note: See TracChangeset
for help on using the changeset viewer.