Changeset 2463 for trunk/ws.php


Ignore:
Timestamp:
Jul 30, 2008, 11:53:00 PM (16 years ago)
Author:
plg
Message:

feature 839, first step : early proof of concept, no error handling. A
remote client can add a photo in a category thanks to the web API. A new
"upload" directory is created (write access required on the base
directory). Uploaded photo have path such as
upload/<year>/<month>/<day>/<datetime>-random.jpg. The thumbnail must come
with the "web sized" photo. The photo has no storage_category_id.

Bugs still need to be fixed and a discussion must occur before next steps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ws.php

    r2435 r2463  
    129129      'Returns elements for the corresponding query search.'
    130130    );
    131   $service->addMethod('pwg.images.setPrivacyLevel', 'ws_images_setPrivacyLevel',
    132       array(
    133         'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY),
    134         'level' => array('maxValue'=>$conf['available_permission_levels']),
    135       ),
    136       'sets the privacy levels for the images' );
     131 
     132  $service->addMethod(
     133    'pwg.images.setPrivacyLevel',
     134    'ws_images_setPrivacyLevel',
     135    array(
     136      'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY),
     137      'level' => array('maxValue'=>$conf['available_permission_levels']),
     138      ),
     139    'sets the privacy levels for the images'
     140    );
    137141
    138142  $service->addMethod('pwg.session.getStatus', 'ws_session_getStatus', null, '' );
     
    168172      'Returns elements for the corresponding tags. Note that tag_id, tag_url_name, tag_name an be arrays. Fill at least one of them. '
    169173    );
     174
     175  $service->addMethod(
     176    'pwg.images.add',
     177    'ws_images_add',
     178    array(
     179      'name',
     180      'category_id',
     181      'file_content',
     182      'file_sum',
     183      'thumbnail_content',
     184      'thumbnail_sum'
     185      ),
     186    'POST method only'
     187    );
    170188}
    171189
Note: See TracChangeset for help on using the changeset viewer.