搜索

1. 全局搜索

根据{QUERY_STRING}搜索,查询字符串可以通过空格或操作分隔

GET /search?query={query_string}

URL 参数

名称 类型 描述
query String 查询字符串是用空格分隔“”,“或”操作处理。在用户的联系人和讨论组搜索用词匹配模式为“query_string[0]*OR query_string[1]*…”。搜索范围包括业务目录和业务库,以及用户所属组织。

请求:

GET /search?query=test@gmail.com

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "contacts_count": 1,
        "binders_count": 1,
        "business_directory_count": 1,
        "business_library_count": 0,
        "contacts": [
            {
                "id": "UkAKhXTpiBTHlsBTcKBXtF5",
                "email": "test@gmail.com",
                "name": "Test Wend",
                "unique_id": null,
                "picture_uri": "https://www.betalk.com/user/contact/329/2164"
            }
        ],
        "binders": [
            {
                "category": 0,
                "binder": {
                    "id": "BQ5xRWpfiVsHLzaE11t0uP1",
                    "name": "test@gmail.com",
                    "created_time": 1393284236851,
                    "updated_time": 1393284238187,
                    "total_comments": 0,
                    "total_members": 2,
                    "total_pages": 0,
                    "total_todos": 0,
                    "revision": 11,
                    "thumbnail_uri": "https://www.betalk.com/service/themes/images/default/avatar-single-100.png",
                    "conversation": true,
                    "users": [
                        {
                            "revision": 2,
                            "status": "BOARD_MEMBER",
                            "type": "BOARD_OWNER",
                            "updated_time": 1393284236851,
                            "created_time": 1393284236851,
                            "user": {
                                "id": "U25PKSV2Oce1mpegiV48W56",
                                "email": "joe@yahoo.com",
                                "name": "Joe Smith",
                                "unique_id": null,
                                "picture_uri": "https://www.betalk.com/board/BQ5xRWpfiVsHLzaE11t0uP1/user/3/23459"
                            }
                        },
                        {
                            "revision": 7,
                            "status": "BOARD_INVITED",
                            "type": "BOARD_READ_WRITE",
                            "updated_time": 1393284237242,
                            "created_time": 1393284237242,
                            "user": {
                                "id": "",
                                "email": "test@gmail.com",
                                "name": "",
                                "unique_id": null
                            }
                        }
                    ],
                    "restricted": false,
                    "unread_feeds": 0,
                    "team": false
                }
            }
        ],
        "business_directory": [
            {
                "id": "UkAKhXTpiBTHlsBTcKBXtF5",
                "email": "test@gmail.com",
                "name": "Test Wend",
                "unique_id": ""
            }
        ],
        "business_library": null
    }
}

2. 讨论组搜索

通过{QUERY_STRING},{binder_id}搜索,查询字符串可以通过空格分隔,处理方式为“或”操作

GET / {binder_id} /search?query = {query_string}

URL 参数

名称 类型 描述
query String 查询字符串是用空格分隔“”,“或”操作处理。在用户的联系人和讨论组搜索用词匹配模式为“query_string[0]*OR query_string[1]*…”。搜索范围评论、文件、任务。

请求:

GET /B9rArkzRe094lPPiMH4UpS8/search?query=github

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "todos": [
            {
                "creator_id": "2",
                "name": "github",
                "due_time": 0,
                "assignee_id": null,
                "comments": null,
                "reminder_time": 0,
                "description": "",
                "id": 253,
                "created_time": 1429664563532,
                "updated_time": 1433962092803
            }
        ],   
        pages": [
            {
                "height": 792,
                "width": 612,
                "revision": 0,
                "id": 112,
                "page_index": 0,
                "page_number": "100.04347826086956",
                "page_uri": "/board/BIAJqlZHHHMB6O4JI5fv6Q4/112",
                "thumbnail_uri": "/board/BIAJqlZHHHMB6O4JI5fv6Q4/112/115",
                "background_uri": "/board/BIAJqlZHHHMB6O4JI5fv6Q4/112/114",
                "updated_time": 0,
                "created_time": 0,
                "is_deleted": false,
                "type": "PAGE_TYPE_PDF",
                "original_file_name": "",
                "file_id": ""
            }
        ],  
        "comments": [
            {
                "text": "[BeTalkweb/webdriverio] Deployment by [url=https://github.com/BeTalkweb]BeTalkweb[/url] on production - ",
                "created_time": 1418996178160,
                "updated_time": 1418996178160,
                "id": 23,
                "user": null,
                "rich_text": ""
            },
            {
                "text": "[BeTalkweb/webdriverio] Member added for [url=https://github.com/BeTalkcn]BeTalkcn[/url]",
                "created_time": 1418998634353,
                "updated_time": 1418998634353,
                "id": 26,
                "user": null,
                "rich_text": ""
            }
        ],
    }
}