BeTalk页面对象提供了以下属性:

名称 描述
PAGE_ID Page ID 71
page_index 原始页面顺序编号 10
original_file_name 原始文件名 test.pdf
type 页面类型:PAGE_TYPE_PDF,PAGE_TYPE_IMAGE,PAGE_TYPE_WHITEBOARD,PAGE_TYPE_AUDIO,PAGE_TYPE_VIDEO,PAGE_TYPE_NOTE,PAGE_TYPE_WEB,PAGE_TYPE_URL。 PAGE_TYPE_PDF
page_number 页面显示顺序 45
page_uri 链接指向的页面 https://www.betalk.com/board/B7V4ze37oO08PYO70973lX6/71
thumbnail_uri 链接指向该页面的缩略图图像 https://www.betalk.com/board/B7V4ze37oO08PYO70973lX6/71/74
background_uri 链接指向页面背景图像 https://www.betalk.com/board/B7V4ze37oO08PYO70973lX6/71/70
width 页面宽度 1024
height 页面高度 768
revision 页面的版本号 20
created_time 创建页面对象时时间戳 1348864985783
updated_time 页面对象更新时间戳 1348864985783
IS_DELETED 标志页面是否已被删除 false

1. 页面上传

通过{binder_id}上传页面

POST / {binder_id} / pageupload

表格数据参数

名称 类型 描述
File File 上传到讨论组的实际文件。

请求:

POST /B9rArkzRe094lPPiMH4UpS8/pageupload
...
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
Content-Length: 3234
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="file"; filename="sample.pdf"
Content-Type: application/pdf
Content of sample.pdf

 

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "file_id": "f692d935-c306-479e-bd76-65e773992e8d",
        "created_time": 1355782091405,
        "updated_time": 1355782091405
    }       
}

 2. 下载页面

根据{binder_id}和{page_id} 下载。

GET  / {binder_id} / pagedownload /{page_id}

请求:

GET /B9rArkzRe094lPPiMH4UpS8/pagedownload/55

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "page": "<path id=\"E923FA4C-EEEC-4565-9847-2448EB30E177\" d=\"M263.00,
        370.00 C263.00,370.00,375.50,338.00,375.50,338.00 \" style=\"fill:none;
        stroke:rgb(0,102,222);stroke-opacity:1.00;stroke-width:4;stroke-linecap:
        round;stroke-linejoin:round;stroke-miterlimit:4;\"/>"
    }
}

3. 添加网页链接页面

添加网页链接页面到{binder_id}讨论组。

POST / {binder_id} / pageweblink

JSON 参数

名称 类型 描述
url String 网站链接

请求:

POST /B7V4ze37oO08PYO70973lX6/pageweblink
{
    "url": "http://www.yahoo.com"
}

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "page_id": 4
    }       
}

4. 删除页面

根据{binder_id}和{page_id} 删除页面。

DELETE / {binder_id} /pages/ {page_id}

请求:

DELETE /B9rArkzRe094lPPiMH4UpS8/pages/57

响应:

{
    "code": "RESPONSE_SUCCESS"
}

5. 删除部分页面

根据{binder_id}删除讨论组部分页面。

DELETE / {binder_id} /pages

URL 参数

名称 类型 描述
filter String 页面ID用“,”分隔

请求:

DELETE /B9rArkzRe094lPPiMH4UpS8/pages?filter=59,68

响应:

{
    "code": "RESPONSE_SUCCESS"
}

6.  获取所有页面

根据{binder_id}获取讨论组的所有页的信息。

GET/ {binder_id} /pages

URL 参数

名称 类型 描述
FILE_ID String 可选:通过文件ID创建的页面

请求:

GET /B9rArkzRe094lPPiMH4UpS8/pages

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data":
    {
    "pages": [
        {
            "id": 7,
            "width": 1280,
            "revision": 17,
            "height": 720,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 0,
            "page_number": "100.000000",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/7",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/7/9",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/7/6",
            "type": "PAGE_TYPE_URL",
            "original_file_name": "",
            "file_id": ""           
        },
        {
            "id": 19,
            "width": 720,
            "revision": 24,
            "height": 560,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 0,
            "page_number": "200.000000",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/19",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/19/24",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/19/23",
            "type": "PAGE_TYPE_WEB",
            "original_file_name": "incoming.html",
            "file_id": "e8d0df87-9336-4663-b3a2-cc3bd284ae39"           
        },
        {
            "id": 27,
            "width": 960,
            "revision": 30,
            "height": 582,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 1,
            "page_number": "201.0",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27/29",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27/30",
            "type": "PAGE_TYPE_PDF",
            "original_file_name": "web_hooks.docx",
            "file_id": "78a91635-5f36-498e-8722-517124b9921e"           
        },
        {
            "id": 37,
            "width": 425,
            "revision": 40,
            "height": 319,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 2,
            "page_number": "301.0",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37/39",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37/40",
            "type": "PAGE_TYPE_PDF",
            "original_file_name": "web_hooks.docx",
            "file_id": "78a91635-5f36-498e-8722-517124b9921e"           
        }
    ]
    }
}

7.  获取部分页面

根据{binder_id}获取讨论组部分页面的信息。

GET / {binder_id} /pages

名称 类型 描述
filter String 页面ID以“,”相隔

请求:

GET /B9rArkzRe094lPPiMH4UpS8/pages?filter=27,37

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data":
    {
        "pages": [
        {
            "id": 27,
            "width": 960,
            "revision": 30,
            "height": 582,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 1,
            "page_number": "201.0",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27/29",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/27/30",
            "type": "PAGE_TYPE_PDF",
            "original_file_name": "web_hooks.docx",
            "file_id": "78a91635-5f36-498e-8722-517124b9921e"           
        },
        {
            "id": 37,
            "width": 425,
            "revision": 40,
            "height": 319,
            "is_deleted": false,
            "created_time": 0,
            "updated_time": 0,
            "page_index": 2,
            "page_number": "301.0",
            "page_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37",
            "thumbnail_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37/39",
            "background_uri": "/board/B9rArkzRe094lPPiMH4UpS8/37/40",
            "type": "PAGE_TYPE_PDF",
            "original_file_name": "web_hooks.docx"
            "file_id": "78a91635-5f36-498e-8722-517124b9921e"           
        }       
        ]
    }
}

8.  复制页面到讨论组

根据{binder_id}全部文件页面到另一个讨论组

POST/ {binder_id} / copyPages

JSON 参数

名称 类型 描述
source_id String 来源讨论组ID

请求:

POST /B7U3ze39oO08PYO70973lX6/copypages
{
    "source_id": "B7U3ze39oO08PYO70973lX7"
}

响应:

{
    "code": "RESPONSE_SUCCESS"
}

9. 复制部分页面到讨论组

根据{binder_id}复制部分文件页面到另一个讨论组。

POST/ {binder_id} / copypages

JSON 参数

名称 类型 描述
SOURCE_ID String 讨论组ID
ID(页面数组中) Number 页面ID

请求:

POST /B7U3ze39oO08PYO70973lX6/copypages
{
    "source_id": "B7U3ze39oO08PYO70973lX7",
    "pages": [
    {
        "id":6
    },
    {
        "id":14
    }
    ]
}

响应:

{
    "code": "RESPONSE_SUCCESS"
}

10. 移动部分页面到讨论组

根据{binder_id}移动部分页面到另一个讨论组。

POST / {binder_id} / movepages

JSON 参数

名称 类型 描述
SOURCE_ID String 讨论组ID
ID(页面数组中) Number 页面ID

请求:

POST /B7U3ze39oO08PYO70973lX6/movepages
{
    "source_id": "B7U3ze39oO08PYO70973lX7",
    "pages": [
    {
        "id":6
    },
    {
        "id":14
    }
    ]
}

响应:

{
    "code": "RESPONSE_SUCCESS"
}

11.  添加文件评论

根据{page_id} 和{binder_id}添加评论。

POST / {binder_id} /pages/ {page_id} /comments

JSON 参数

名称 类型 描述
text String 页面评论

请求:

POST /B7V4ze37oO08PYO70973lX6/pages/71/comments
{
    "url": "This is a comment"
}

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "comment_id": 13
    }           
}

12.  删除页面评论

根据{comment_id},{page_id}和{binder_id}删除评论。

DELETE / {binder_id} /pages/ {page_id} /comments/ {comment_id}

请求:

DELETE /B9rArkzRe094lPPiMH4UpS8/pages/57/comments/66

响应:

{
    "code": "RESPONSE_SUCCESS"
}

13.  获取页面的评论

根据{page_id},{binder_id}获取页面评论

GET/ {binder_id} /pages/ {page_id} /comments

请求:

GET /B9rArkzRe094lPPiMH4UpS8/pages/57/comments

响应:

{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "comments": [
        {
            "id": 98,
            "created_time": 1355782091405,
            "text": "This is a comment",
            "updated_time": 1355782091405,
            "user": {
                "id": "UiaduESWsbzFoK9TOldC6zF"
            }
        }
        ]
    }
}

 14. 添加注释

通过{page_id} 和{binder_id}添加注释。

POST/ {binder_id} /pages/ {page_id} /annotations

JSON 参数

名称 类型 描述
client_uuid String UUID的客户端
svg_tag String SVG标记注释

请求:

POST /B7V4ze37oO08PYO70973lX6/pages/71/annotations
{
    "client_uuid": "A040AC59-C3E0-4261-8356-1341F49612A3",
    "svg_tag": "<path style=\"fill:none;stroke:#0000FF;stroke-opacity:0.8;
        stroke-width:3;stroke-linecap:round;stroke-linejoin:round;\" d=\"M312,
        191 L315,184 L320,177 L323,170 L327,163 L337,155 L347,150 L357,148 L372,
        148 L382,151 L391,155 L397,159 L400,165 L402,173 L405,182 L407,193 L407,
        199 L407,203 L406,209 L403,214 L398,217 L390,220 L380,221 L367,222 L355,
        222 L349,221 L343,220 L337,216 L333,210\"></path>"
}

响应:

{
    "code": "RESPONSE_SUCCESS"
}

15.  删除注释

根据{client_uuid},{PAGE_ID}和{binder_id}删除。

DELETE/ {binder_id} /pages/ {page_id} /annotations/ {client_uuid}

请求:

DELETE /B9rArkzRe094lPPiMH4UpS8/pages/annotations/A040AC59-C3E0-4261-8356-1341F49612A3

响应:

{
    "code": "RESPONSE_SUCCESS"
}