aboutsummaryrefslogtreecommitdiffstats
path: root/include/api.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-05-29 19:47:01 -0700
committerfriendica <info@friendica.com>2013-05-29 19:47:01 -0700
commitfadf2c3ea6e363b96f5aa60d163489fe3886b2c3 (patch)
tree50a92ee66dfeeff5c16a1dcca6289b5695b800ba /include/api.php
parentcd9ea115f85fd5bc4d55cec06a480cc21d721e15 (diff)
downloadvolse-hubzilla-fadf2c3ea6e363b96f5aa60d163489fe3886b2c3.tar.gz
volse-hubzilla-fadf2c3ea6e363b96f5aa60d163489fe3886b2c3.tar.bz2
volse-hubzilla-fadf2c3ea6e363b96f5aa60d163489fe3886b2c3.zip
add photos and albums enumeration to Red API (will allow us to export either all our photos or individual albums using a script)
Diffstat (limited to 'include/api.php')
-rw-r--r--include/api.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/api.php b/include/api.php
index 9efee4178..50ecbd570 100644
--- a/include/api.php
+++ b/include/api.php
@@ -6,6 +6,7 @@ require_once("conversation.php");
require_once("oauth.php");
require_once("html2plain.php");
require_once('include/security.php');
+require_once('include/photos.php');
/*
*
@@ -545,6 +546,23 @@ require_once('include/security.php');
api_register_func('api/red/channel/stream','api_channel_stream', true);
+ function api_albums(&$a,$type) {
+ json_return_and_die(photos_albums_list($a->get_channel(),$a->get_observer()));
+ }
+ api_register_func('api/red/albums','api_albums', true);
+
+ function api_photos(&$a,$type) {
+ $album = $_REQUEST['album'];
+ json_return_and_die(photos_list_photos($a->get_channel(),$a->get_observer()),$album);
+ }
+ api_register_func('api/red/photos','api_photos', true);
+
+
+
+
+
+
+
function api_statuses_mediap(&$a, $type) {
if (api_user() === false) {
logger('api_statuses_update: no user');