[Ocs] Proposal for new field in CONTENT module

Laszlo Papp lpapp at kde.org
Sun Oct 28 06:04:30 PDT 2012


Frank, can we add this then?

Laszlo

On Sun, Aug 26, 2012 at 11:29 PM, Laszlo Papp <lpapp at kde.org> wrote:
>> 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,
> +                    }
> +                ]
> +            }
>          }
>      ]
>  }


More information about the Ocs mailing list