获取已加入的工作区列表

接口描述

本接口用于获取当前用户已加入的工作区(space)列表。接口返回space数组,每一个space数据的详细介绍(尤其是收费相关的信息)可以参考space实例的描述

请求URI

/spaces/joined

HTTP Method

GET

参数说明

参数名称 是否必填 参数说明
offset false 结果返回的偏移量
limit false 结果返回的数量

响应结果说明

名称 说明
space对象数组 space对象参考space实例

请求示例

GET /v2/spaces/joined?limit=20&offset=0 HTTP/1.1
Host: api.huoban.com
Content-Type: application/json
Authorization: Bearer {YOUR ACCESS TOKEN}

响应示例

HTTP/1.1 200 OK
Content-Type: application/json

[
  {
    "space_id": 100001,
    "name": "测试",
    "cover_name_color": "FFFFFF",
    "cover_background_color": "79BEAF",
    "cover_crop": {
      "scale": 0.5,
      "x": 0,
      "y": 0,
      "width": 140,
      "height": 140
    },
    "created_on": "2016-07-08 09:59:19",
    "created_by_id": 100001,
    "member_number": 4,
    "joined_member_number": 3,
    "table_ids": [
      100001,
      100002,
      100003
    ],
    "allow_invite_code": false,
    "invite_code": "aDtrYF",
    "created_by": {
      "user_id": 100001,
      "name": "test1",
      "avatar": "http:\/\/f2.huoban.com\/30000\/user_avatar\/40000\/xxx"
    },
    "cover_image": {
      "file_id": 100001,
      "name": "default_cover.png",
      "size": 7812,
      "ref_id": 0,
      "ref_type": "",
      "created_on": "2015-11-24 16:16:58",
      "link": {
        "source": "http:\/\/f2.huoban.com\/30000\/user_avatar\/40000\/xxx",
        "square": null
      }
    },
    "cover_source_image": {
      "file_id": 100002,
      "name": "default_cover.png",
      "size": 7812,
      "ref_id": 0,
      "ref_type": "",
      "created_on": "2015-11-24 16:16:58",
      "link": {
        "source": "http:\/\/f2.huoban.com\/30000\/user_avatar\/40000\/xxx",
        "square": null
      }
    },
    "rights": [
      "update",
      "delete",
      "manage",
      "table_create",
      "table_order",
      "space_member_update",
      "space_member_delete",
      "view",
      "invite"
    ],
    "source": 2,
    "company_id": 0,
    "company_name": "",
    "is_company_space": false
  },
  {
    "space_id": 100002,
    "name": "测试",
    "cover_name_color": "FFFFFF",
    "cover_background_color": "79BEAF",
    "cover_crop": {
      "scale": 0.5,
      "x": 0,
      "y": 0,
      "width": 140,
      "height": 140
    },
    "created_on": "2016-07-08 09:59:19",
    "created_by_id": 100001,
    "member_number": 4,
    "joined_member_number": 3,
    "table_ids": [
      100004,
      100005,
      100006
    ],
    "allow_invite_code": false,
    "invite_code": "aDtrYF",
    "created_by": {
      "user_id": 100001,
      "name": "test1",
      "avatar": "http:\/\/f2.huoban.com\/30000\/user_avatar\/40000\/xxx"
    },
    "cover_image": {
      "file_id": 100001,
      "name": "default_cover.png",
      "size": 7812,
      "ref_id": 0,
      "ref_type": "",
      "created_on": "2015-11-24 16:16:58",
      "link": {
        "source": "http:\/\/f2.huoban.com\/30000\/user_avatar\/40000\/xxx",
        "square": null
      }
    },
    "cover_source_image": {
      "file_id": 100002,
      "name": "default_cover.png",
      "size": 7812,
      "ref_id": 0,
      "ref_type": "",
      "created_on": "2015-11-24 16:16:58",
      "link": {
        "source": "http:\/\/f2.huoban.com\/30000\/user_avatar\/40000\/xxx",
        "square": null
      }
    },
    "rights": [
      "update",
      "delete",
      "manage",
      "table_create",
      "table_order",
      "space_member_update",
      "space_member_delete",
      "view",
      "invite"
    ],
    "source": 2,
    "company_id": 0,
    "company_name": "",
    "is_company_space": false
  }
]