POST/:user/lists

跳转到: 导航, 搜索

目录

 :user/lists

创建一个新的list,每个用户最多能够创建20个。

URL

http://api.t.sina.com.cn/:user/lists.(json%7Cxml)

支持格式

XML/JSON

HTTP请求方式

POST

是否需要登录

true
关于授权机制,参见授权机制声明

请求数限制

true
关于请求数限制,参见接口访问权限说明

请求参数

  必选 类型及范围 说明
source true string 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数)
:user true int64/string 要创建的List所属的用户ID或者用户昵称。
name true string 要创建的List的名称,不超过10个汉字,20个半角字符。
mode false string 创建的list是公共的(public)还是私有的(private),默认为private。属性创建后不可更改
description false string 描述信息。70个汉字。140个半角字符。仅在公有list中有效

注意事项

  • 重复创建同名分组将给出400错误。

返回结果

XML示例

<?xml version="1.0" encoding="UTF-8"?>
<list>
  <id>201012140011271539</id>
  <name>我的好友</name>
  <full_name>@siegetest/我的好友</full_name>
  <slug>我的好友</slug>
  <description>null</description>
  <subscriber_count>0</subscriber_count>
  <member_count>0</member_count>
  <uri>/siegetest/我的好友</uri>
  <mode>private</mode>
  <user>
    <id>1854740027</id>
    <screen_name>siegetest</screen_name>
    <name>siegetest</name>
    <province>11</province>
    <city>8</city>
    <location>北京 海淀区</location>
    <description>ABCDE</description>
    <url/>
    <profile_image_url>http://tp4.sinaimg.cn/1854740027/50/1291272213/1</profile_image_url>
    <domain/>
    <gender>m</gender>
    <followers_count>2</followers_count>
    <friends_count>20</friends_count>
    <statuses_count>39</statuses_count>
    <favourites_count>0</favourites_count>
    <created_at>Thu Nov 11 00:00:00 +0800 2010</created_at>
    <following>false</following>
    <verified>false</verified>
    <allow_all_act_msg>true</allow_all_act_msg>
    <geo_enabled>true</geo_enabled>
  </user>
</list>

JSON示例

{
    "subscriber_count" : 0,
    "description" : "null",
    "full_name" : "@siegetest/我的好友2",
    "member_count" : 0,
    "mode" : "private",
    "user" : 
    {
        "name" : "siegetest",
        "domain" : "",
        "geo_enabled" : true,
        "followers_count" : 2,
        "statuses_count" : 39,
        "favourites_count" : 0,
        "city" : "8",
        "description" : "ABCDE",
        "verified" : false,
        "id" : 1854740027,
        "gender" : "m",
        "friends_count" : 20,
        "screen_name" : "siegetest",
        "allow_all_act_msg" : true,
        "following" : false,
        "url" : "",
        "profile_image_url" : "http://tp4.sinaimg.cn/1854740027/50/1291272213/1",
        "created_at" : "Thu Nov 11 00:00:00 +0800 2010",
        "province" : "11",
        "location" : "北京 海淀区"
    },
    "slug" : "我的好友2",
    "uri" : "/siegetest/我的好友2",
    "id" : 221012140011299900,
    "name" : "我的好友2"
}

其他