Others
======

This part of documentation cover all methods related with Cast's messages.

* :ref:`List-of-participants`
* :ref:`List-of-tags`
* :ref:`Search-objects`
* :ref:`About-me`


.. _List-of-participants:

List of participants
--------------------

+-----------+--------------------------------------------------------+--------+
| OPERATION | URL                                                    | METHOD |
+===========+========================================================+========+
|    VIEW   | http://URL/<container>/participants                    |  GET   |
+-----------+--------------------------------------------------------+--------+

GET Arguments:
 * *q*: query for grip members *REQUIRED*
 * *obj*: object to test
 * *path*: path to objects
 * *uid*: UID of object
 * *grouping*: grouping member in groups - default False

.. note::

    You need specifi object (cast message) by send one of *obj*, *path* or
    *uid* attribute.
    In *uid* you can send more than one UID at once - just separate them by
    coma (`,`).


Result - for version without *grouping* attribute:

.. code-block:: json

    {
       "count": 9,
       "items": [
          {
             "user_id": "admin",
             "img": "http://127.0.0.1:8080/Plone/portal_memberdata/portraits/admin",
             "groups": [
                "all"
             ],
             "fullname": "admin",
             "type": "member",
             "email": null,
             "profile_url": "http://127.0.0.1:8080/Plone/author/admin"
          },
          {
             "user_id": "gu4@test.pl",
             "img": "http://127.0.0.1:8080/Plone/portal_memberdata/portraits/gu4-40test.pl",
             "groups": [
                "group-2"
             ],
             "fullname": "Group User 4",
             "type": "member",
             "email": "gu4@test.pl",
             "profile_url": "http://127.0.0.1:8080/Plone/author/gu4@test.pl"
          },
          ...
       ],
       "_runtime": 0.022529125
    }


Result - for version with *grouping* set to 1:

.. code-block:: json

    {
       "count": {
          "all": 7,
          "group-1": 2,
          "group-2": 4
       },
       "items": {
          "all": [
             {
                "user_id": "admin",
                "img": "http://127.0.0.1:8080/Plone/portal_memberdata/portraits/admin",
                "groups": [
                   "all"
                ],
                "fullname": "admin",
                "type": "member",
                "email": null,
                "profile_url": "http://127.0.0.1:8080/Plone/author/admin"
             },
             ...
          ],
          "group-1": [
             {
                "user_id": "gu1@test.pl",
                "img": "http://127.0.0.1:8080/Plone/portal_memberdata/portraits/gu1-40test.pl",
                "groups": [
                   "group-2",
                   "group-1"
                ],
                "fullname": "Group User 1",
                "type": "member",
                "email": "gu1@test.pl",
                "profile_url": "http://127.0.0.1:8080/Plone/author/gu1@test.pl"
             },
             ...
          ],
          "group-2": [
             {
                "user_id": "gu4@test.pl",
                "img": "http://127.0.0.1:8080/Plone/portal_memberdata/portraits/gu4-40test.pl",
                "groups": [
                   "group-2"
                ],
                "fullname": "Group User 4",
                "type": "member",
                "email": "gu4@test.pl",
                "profile_url": "http://127.0.0.1:8080/Plone/author/gu4@test.pl"
             },
             ...
          ]
       },
       "_runtime": 0.06140399
    }

.. _List-of-tags:

List of tags
------------

+-----------+--------------------------------------------------------+--------+
| OPERATION | URL                                                    | METHOD |
+===========+========================================================+========+
|    VIEW   | http://URL/<container>/cast/tags                       |  GET   |
+-----------+--------------------------------------------------------+--------+

GET Arguments:
 * *q*: query for grip members *REQUIRED*
 * *obj*: object to test
 * *path*: path to objects
 * *uid*: UID of object

.. note::

    You need specifi object (cast message) by send one of *obj*, *path* or
    *uid* attribute.
    In *uid* you can send more than one UID at once - just separate them by
    coma (`,`).


Result:

.. code-block:: json

    {
       "count": 2,
       "items": [
          "foo",
          "test"
       ],
       "_runtime": 0.003047943
    }


.. _Search-objects:

Search objects for reference
----------------------------

+-----------+------------------------------------------------------------+--------+
| OPERATION | URL                                                        | METHOD |
+===========+============================================================+========+
|    VIEW   | http://URL/search-objects                                  |  GET   |
+-----------+------------------------------------------------------------+--------+

GET Arguments:
 * **query**: text query

Result:

.. code-block:: json

    {
        "count": 7,
        "items": [
            {
                "uid": "c7330b57e98041fcbaff967df1085a96",
                "is_lazy": true,
                "is_folder": false,
                "path": "/Plone/test-5/gr-33-2015.pdf",
                "children": [],
                "icon": "http://127.0.0.1:8080/Plone/pdf.png",
                "title": "GR 33 2015",
                "url": "http://127.0.0.1:8080/Plone/test-5/gr-33-2015.pdf",
                "breadcrumbs": [
                    {
                        "absolute_url": "http://127.0.0.1:8080/Plone/test-5",
                        "Title": "test 5"
                    },
                    {
                        "absolute_url": "http://127.0.0.1:8080/Plone/test-5/gr-33-2015.pdf/view",
                        "Title": "GR 33 2015"
                    }
                ],
                "tooltip": "",
                "id": "gr-33-2015.pdf"
            },
            ...
        ],
        "_runtime": 0.01770806312561035
    }

.. _About-me:

About me
--------

+-----------+----------------------------------+--------+
| OPERATION | URL                              | METHOD |
+===========+==================================+========+
|    VIEW   | http://URL/me                    |  GET   |
+-----------+----------------------------------+--------+

Result:

.. code-block:: json

    {
        "home_page": null,
        "telephone": null,
        "uid": "admin",
        "image":
        {
            "url": "http://127.0.0.1:8080/Plone/portal_memberdata/portraits/admin",
            "alt": "admin"
        },
        "_runtime": 0.0015740394592285156,
        "url": "http://127.0.0.1:8080/Plone/author/admin",
        "position": null,
        "fullname": null,
        "location": null,
        "description": null
    }
