[Ocs] Proposal for new field in CONTENT module

Laszlo Papp lpapp at kde.org
Sun Aug 26 15:29:04 PDT 2012


>
> I am now about to put up the examples that I can post just to see how this
> would look like. :-)
>

I am very sorry for the late reply, but I have been distracted by other
issues recently, unfortunately. I was thinking of something like you can
see below.

Laszlo

=======================================

XML

add/edit

* POST Arguments: parentidX - the id of the parent content where X is a
positive integer starting from one upwards

get

     <downloadrepository2>repo</downloadrepository2>
     <parentcount>2</parentcount>
     <parents details="id">
      <content>
       <id>50</id>
      </content>
      <content>
       <id>51</id>
      </content>
     </parents>
     <childcount>2</childcount>
     <children details="id">
      <content>
       <id>200</id>
      </content>
      <content>
       <id>201</id>
      </content>
     </children>
    </content>

list

* URL Arguments: parentid - Show only those content entries which depend on
the given parent content

    <previewpic1>https://www.KDE-Look.org/CONTENT/content-pre1/1420-1.png
</previewpic1>
    <parentcount>2</parentcount>
    <parents details="id">
     <content>
      <id>1300</id>
     </content>
     <content>
      <id>1301</id>
     </content>
    </parents>
    <childcount>2</childcount>
    <children details="id">
     <content>
      <id>1400</id>
     </content>
     <content>
      <id>1401</id>
     </content>
    </children>
  </content>

=======================================

JSON

diff --git a/v1/json/content.json b/v1/json/content.json
index 7ae7b59..a53ae92 100644
--- a/v1/json/content.json
+++ b/v1/json/content.json
@@ -164,7 +164,32 @@ List:
             "score": 50,
             "comments": 0,
             "preview1": "
https://www.KDE-Look.org/content/preview.php?preview=1&id=1420&file1=1420-1.png&file2=1420-2.png&file3=&name=nameeee
",
-            "previewpic1": "
https://www.KDE-Look.org/CONTENT/content-pre1/1420-1.png"
+            "previewpic1": "
https://www.KDE-Look.org/CONTENT/content-pre1/1420-1.png",
+            "parentcount": 2,
+            "parents": {
+                "summary": "id",
+                [
+                    {
+                        "id": 1300,
+                    },
+                    {
+                        "id": 1301,
+                    }
+                ]
+            },
+
+            "childcount": 2,
+            "children": {
+                "summary": "id",
+                [
+                    {
+                        "id": 1400,
+                    },
+                    {
+                        "id": 1401,
+                    }
+                ]
+            }
         },
         {
             "details": "summary",
@@ -340,6 +365,31 @@ Get:
             "downloadgpgfingerprint2": "6AD9 150F D8CC 941B 4541  2DCC
68B7 AB89 5754 8D2D",
             "downloadpackagename2": "packname",
             "downloadrepository2": "repo",
+            "parentcount": 2,
+            "parents": {
+                "summary": "id",
+                [
+                    {
+                        "id": 50,
+                    },
+                    {
+                        "id": 51,
+                    }
+                ]
+            }
+
+            "childcount": 2,
+            "children": {
+                "summary": "id",
+                [
+                    {
+                        "id": 200,
+                    },
+                    {
+                        "id": 201,
+                    }
+                ]
+            }
         }
     ]
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ocs/attachments/20120826/90c076d8/attachment.html>


More information about the Ocs mailing list