mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-09 18:23:18 +02:00
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. git-svn-id: http://piwigo.org/svn/trunk@2463 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -128,12 +128,16 @@ function ws_addDefaultMethods( $arr )
|
||||
),
|
||||
'Returns elements for the corresponding query search.'
|
||||
);
|
||||
$service->addMethod('pwg.images.setPrivacyLevel', 'ws_images_setPrivacyLevel',
|
||||
array(
|
||||
'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY),
|
||||
'level' => array('maxValue'=>$conf['available_permission_levels']),
|
||||
|
||||
$service->addMethod(
|
||||
'pwg.images.setPrivacyLevel',
|
||||
'ws_images_setPrivacyLevel',
|
||||
array(
|
||||
'image_id' => array('flags'=>WS_PARAM_FORCE_ARRAY),
|
||||
'level' => array('maxValue'=>$conf['available_permission_levels']),
|
||||
),
|
||||
'sets the privacy levels for the images' );
|
||||
'sets the privacy levels for the images'
|
||||
);
|
||||
|
||||
$service->addMethod('pwg.session.getStatus', 'ws_session_getStatus', null, '' );
|
||||
$service->addMethod('pwg.session.login', 'ws_session_login',
|
||||
@@ -167,6 +171,20 @@ function ws_addDefaultMethods( $arr )
|
||||
),
|
||||
'Returns elements for the corresponding tags. Note that tag_id, tag_url_name, tag_name an be arrays. Fill at least one of them. '
|
||||
);
|
||||
|
||||
$service->addMethod(
|
||||
'pwg.images.add',
|
||||
'ws_images_add',
|
||||
array(
|
||||
'name',
|
||||
'category_id',
|
||||
'file_content',
|
||||
'file_sum',
|
||||
'thumbnail_content',
|
||||
'thumbnail_sum'
|
||||
),
|
||||
'POST method only'
|
||||
);
|
||||
}
|
||||
|
||||
add_event_handler('ws_add_methods', 'ws_addDefaultMethods');
|
||||
|
||||
Reference in New Issue
Block a user