]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
add status attribute to post in all relevant api functions
authorDavid Glenck <pascal.free@gmail.com>
Thu, 16 Jan 2014 20:07:17 +0000 (21:07 +0100)
committerDavid Glenck <pascal.free@gmail.com>
Thu, 16 Jan 2014 20:07:17 +0000 (21:07 +0100)
www/api/posts_all.php
www/api/posts_get.php
www/api/posts_public.php
www/api/posts_recent.php

index 7204b605e94b3168c0eb76c2f052eda4479801ce..c70d14c46d913727e778ec88c0f890286efffea8 100644 (file)
@@ -4,6 +4,9 @@
 // del.icio.us behavior:
 // - doesn't include the filtered tag as an attribute on the root element (we do)
 
+// Scuttle behavior:
+// - returns privacy status of each bookmark.
+
 // Force HTTP authentication first!
 $httpContentType = 'text/xml';
 require_once 'httpauth.inc.php';
@@ -40,8 +43,8 @@ foreach($bookmarks['bookmarks'] as $row) {
         $taglist = 'system:unfiled';
     }
 
-    echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. md5($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
+    echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. md5($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) . '" status="'. filter($row['bStatus'], 'xml') ."\" />\r\n";
 }
 
 echo '</posts>';
-?>
\ No newline at end of file
+?>
index c20f904ac30907e2b300f905374d1a982f52abc3..e39058b5c6567d82783d18bcad69ecc974df69e3 100644 (file)
@@ -10,6 +10,7 @@
  *
  * Scuttle behavior:
  * - Uses today, instead of the last bookmarked date, if no date is specified
+ * - returns privacy status of each bookmark.
  *
  * SemanticScuttle - your social bookmark manager.
  *
@@ -75,8 +76,8 @@ foreach ($bookmarks['bookmarks'] as $row) {
         $taglist = 'system:unfiled';
     }
 
-    echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. $row['bHash'] .'" others="'. $bookmarkservice->countOthers($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
+    echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. $row['bHash'] .'" others="'. $bookmarkservice->countOthers($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) . '" status="'. filter($row['bStatus'], 'xml') ."\" />\r\n";
 }
 
 echo '</posts>';
-?>
\ No newline at end of file
+?>
index 0a0918753f1038bf8292572244db7781a8596aa0..e4086b2410d9025120cdca9dfc1f3551290477d0 100644 (file)
@@ -4,6 +4,9 @@
 // del.icio.us behavior:
 // - doesn't include the filtered tag as an attribute on the root element (we do)
 
+// Scuttle behavior:
+// - returns privacy status of each bookmark.
+
 // Force HTTP authentication first!
 //require_once('httpauth.inc.php');
 $httpContentType = 'text/xml';
@@ -41,7 +44,7 @@ foreach($bookmarks['bookmarks'] as $row) {
         $taglist = 'system:unfiled';
     }
 
-    echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. md5($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
+    echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. md5($row['bAddress']) .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) . '" status="'. filter($row['bStatus'], 'xml') ."\" />\r\n";
 }
 
 echo '</posts>';
index 6c71e226e074ca4dc1a1d7922a07dba5f2513843..5fca30dd5396ac23205d12aa4f945eb412dc495b 100644 (file)
@@ -4,6 +4,9 @@
  * optionally filtered by tag and/or number of posts
  * (default 15, max 100, just like del.icio.us).
  *
+ * Scuttle behavior:
+ * - returns privacy status of each bookmark.
+ *
  * SemanticScuttle - your social bookmark manager.
  *
  * PHP version 5.
@@ -75,8 +78,8 @@ foreach ($bookmarks['bookmarks'] as $row) {
         $taglist = 'system:unfiled';
     }
 
-    echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. $row['bHash'] .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) ."\" />\r\n";
+    echo "\t<post href=\"". filter($row['bAddress'], 'xml') .'" description="'. filter($row['bTitle'], 'xml') .'" '. $description .'hash="'. $row['bHash'] .'" tag="'. filter($taglist, 'xml') .'" time="'. gmdate('Y-m-d\TH:i:s\Z', strtotime($row['bDatetime'])) . '" status="'. filter($row['bStatus'], 'xml') ."\" />\r\n";
 }
 
 echo '</posts>';
-?>
\ No newline at end of file
+?>