Blocks/create

跳转到: 导航, 搜索
(使用示例:)
第30行: 第30行:
 
===返回结果: ===
 
===返回结果: ===
 
XML :
 
XML :
<user>
+
<pre>
   <id>1266321801</id>
+
<?xml version="1.0" encoding="UTF-8"?>
   <screen_name>姚晨</screen_name>
+
<user>
   <name>姚晨</name>
+
   <id>1833448730</id>
 +
   <screen_name>LoopF1</screen_name>
 +
   <name>LoopF1</name>
 
   <province>11</province>
 
   <province>11</province>
   <city>5</city>
+
   <city>8</city>
   <location>北京 朝阳区</location>
+
   <location>北京 海淀区</location>
   <description>一颗很逊的卤蛋。</description>
+
   <description/>
   <url>http://blog.sina.com.cn/yaochen</url>
+
   <url/>
   <profile_image_url>http://tp2.sinaimg.cn/1266321801/50/1283203855</profile_image_url>
+
   <profile_image_url>http://tp3.sinaimg.cn/1833448730/50/0/1</profile_image_url>
   <domain>yaochen</domain>
+
   <domain/>
   <gender>f</gender>
+
   <gender>m</gender>
   <followers_count>3284142</followers_count>
+
   <followers_count>0</followers_count>
   <friends_count>620</friends_count>
+
   <friends_count>0</friends_count>
   <statuses_count>2361</statuses_count>
+
   <statuses_count>0</statuses_count>
   <favourites_count>14</favourites_count>
+
   <favourites_count>0</favourites_count>
   <created_at>Fri Aug 28 00:00:00 +0800 2009</created_at>
+
   <created_at>Tue Sep 28 00:00:00 +0800 2010</created_at>
 
   <following>false</following>
 
   <following>false</following>
   <verified>true</verified>
+
   <verified>false</verified>
 
   <allow_all_act_msg>false</allow_all_act_msg>
 
   <allow_all_act_msg>false</allow_all_act_msg>
 
   <geo_enabled>true</geo_enabled>
 
   <geo_enabled>true</geo_enabled>
  <status>
+
</user>
    <created_at>Mon Oct 18 11:44:53 +0800 2010</created_at>
+
</pre>
    <id>3141808011</id>
+
    <text>冕冕,加油!</text>
+
    <source>
+
      <a href="http://news.sina.com.cn/wap/wbclient.html#3">iPhone客户端</a>
+
    </source>
+
    <favorited>false</favorited>
+
    <truncated>false</truncated>
+
    <geo/>
+
    <in_reply_to_status_id/>
+
    <in_reply_to_user_id/>
+
    <in_reply_to_screen_name/>
+
    <retweeted_status>
+
      <created_at>Mon Oct 18 10:06:57 +0800 2010</created_at>
+
      <id>3140482259</id>
+
      <text>刚跑完100米圣途,蓮花山清幽的山徑,闊葉榕很高兴,我也很高兴。出山门了,这是我的"潮流"!答应妈妈了,要送给她!</text>
+
      <source>
+
        <a href="http://news.sina.com.cn/wap/wbclient.html#3">iPhone客户端</a>
+
      </source>
+
      <favorited>false</favorited>
+
      <truncated>false</truncated>
+
      <geo/>
+
      <in_reply_to_status_id/>
+
      <in_reply_to_user_id/>
+
      <in_reply_to_screen_name/>
+
      <thumbnail_pic>http://ss3.sinaimg.cn/thumbnail/3f1622c9492daa18d5612&amp;690</thumbnail_pic>
+
      <bmiddle_pic>http://ss3.sinaimg.cn/bmiddle/3f1622c9492daa18d5612&amp;690</bmiddle_pic>
+
      <original_pic>http://ss3.sinaimg.cn/orignal/3f1622c9492daa18d5612&amp;690</original_pic>
+
      <user>
+
        <id>1058415305</id>
+
        <screen_name>行者孙冕</screen_name>
+
        <name>行者孙冕</name>
+
        <province>44</province>
+
        <city>1</city>
+
        <location>广东 广州</location>
+
        <description/>
+
        <url>http://blog.sina.com.cn/sunmian</url>
+
        <profile_image_url>http://tp2.sinaimg.cn/1058415305/50/1279874506</profile_image_url>
+
        <domain>sunmian</domain>
+
        <gender>m</gender>
+
        <followers_count>64184</followers_count>
+
        <friends_count>409</friends_count>
+
        <statuses_count>2269</statuses_count>
+
        <favourites_count>32</favourites_count>
+
        <created_at>Fri Aug 28 00:00:00 +0800 2009</created_at>
+
        <following>false</following>
+
        <verified>true</verified>
+
        <allow_all_act_msg>false</allow_all_act_msg>
+
        <geo_enabled>true</geo_enabled>
+
      </user>
+
    </retweeted_status>
+
  </status>
+
</user>
+
  
 
JSON:
 
JSON:
 
+
<pre>
{
+
{
     "allow_all_act_msg": false,
+
     "name" : "LoopF1",
    "city": "5",
+
     "domain" : "",
    "created_at": "Fri Aug 28 00:00:00 +0800 2009",
+
     "geo_enabled" : true,
    "description": "一颗很逊的卤蛋。",  
+
     "followers_count" : 0,
     "domain": "yaochen",  
+
     "statuses_count" : 0,
     "favourites_count": 14,  
+
     "favourites_count" : 0,
     "followers_count": 3284142,  
+
     "city" : "8",
     "following": false,  
+
     "description" : "",
     "friends_count": 620,  
+
     "verified" : false,
     "gender": "f",  
+
     "id" : 1833448730,
     "geo_enabled": true,
+
     "gender" : "m",
    "id": 1266321801,  
+
     "friends_count" : 0,
     "location": "北京 朝阳区",  
+
     "screen_name" : "LoopF1",
     "name": "姚晨",  
+
     "allow_all_act_msg" : false,
     "profile_image_url": "http://tp2.sinaimg.cn/1266321801/50/1283203855",  
+
    "following" : false,
     "province": "11",  
+
    "url" : "",
     "screen_name": "姚晨",  
+
    "profile_image_url" : "http://tp3.sinaimg.cn/1833448730/50/0/1",
     "status": {
+
    "created_at" : "Tue Sep 28 00:00:00 +0800 2010",
        "created_at": "Mon Oct 18 11:44:53 +0800 2010",
+
    "province" : "11",
        "favorited": false,  
+
    "location" : "北京 海淀区"
        "geo": null,
+
}
        "id": 3141808011,
+
</pre>
        "in_reply_to_screen_name": "",
+
        "in_reply_to_status_id": "",
+
        "in_reply_to_user_id": "",
+
        "retweeted_status": {
+
            "bmiddle_pic": "http://ss3.sinaimg.cn/bmiddle/3f1622c9492daa18d5612&690",
+
            "created_at": "Mon Oct 18 10:06:57 +0800 2010",
+
            "favorited": false,  
+
            "geo": null,
+
            "id": 3140482259,  
+
            "in_reply_to_screen_name": "",
+
            "in_reply_to_status_id": "",
+
            "in_reply_to_user_id": "",
+
            "original_pic": "http://ss3.sinaimg.cn/orignal/3f1622c9492daa18d5612&690",
+
            "source": "<a href=\"http://news.sina.com.cn/wap/wbclient.html#3\" rel=\"nofollow\">iPhone客户端</a>",
+
            "text": "刚跑完100米圣途,蓮花山清幽的山徑,闊葉榕很高兴,我也很高兴。出山门了,这是我的"潮流"!答应妈妈了,要送给她!",
+
            "thumbnail_pic": "http://ss3.sinaimg.cn/thumbnail/3f1622c9492daa18d5612&690",
+
            "truncated": false,
+
            "user": {
+
                "allow_all_act_msg": false,
+
                "city": "1",  
+
                "created_at": "Fri Aug 28 00:00:00 +0800 2009",  
+
                "description": "",  
+
                "domain": "sunmian",
+
                "favourites_count": 32,
+
                "followers_count": 64184,
+
                "following": false,
+
                "friends_count": 409,
+
                "gender": "m",
+
                "geo_enabled": true,
+
                "id": 1058415305,
+
                "location": "广东 广州",
+
                "name": "行者孙冕",
+
                "profile_image_url": "http://tp2.sinaimg.cn/1058415305/50/1279874506",
+
                "province": "44",
+
                "screen_name": "行者孙冕",
+
                "statuses_count": 2269,
+
                "url": "http://blog.sina.com.cn/sunmian",
+
                "verified": true
+
            }
+
        },
+
        "source": "<a href=\"http://news.sina.com.cn/wap/wbclient.html#3\" rel=\"nofollow\">iPhone\u5ba2\u6237\u7aef</a>",
+
        "text": "冕冕,加油!",
+
        "truncated": false
+
    },
+
    "statuses_count": 2361,
+
    "url": "http://blog.sina.com.cn/yaochen",
+
    "verified": true
+
}
+
  
 
=== 字段说明===
 
=== 字段说明===
第202行: 第104行:
 
* verified: 加V标示,是否微博认证用户  
 
* verified: 加V标示,是否微博认证用户  
  
status
 
 
* created_at: 创建时间
 
* id: 微博ID
 
* text: 微博信息内容
 
* source: 微博来源
 
* favorited: 是否已收藏
 
* truncated: 是否被截断
 
* in_reply_to_status_id: 回复ID
 
* in_reply_to_user_id: 回复人UID
 
* in_reply_to_screen_name: 回复人昵称
 
* thumbnail_pic: 缩略图
 
* bmiddle_pic: 中型图片
 
* original_pic:原始图片
 
* user: 作者信息
 
* retweeted_status: 转发的博文,内容为status,如果不是转发,则没有此字段
 
  
 
===使用示例: ===
 
===使用示例: ===

2010年11月25日 (四) 15:21的版本

目录

blocks/create

将用户加入黑名单

URL:

http://api.t.sina.com.cn/blocks/create.format

格式:

xml, json

请求方式:

POST

是否需要身份验证:

true

请求数限制:

true

请求参数:

必选参数(至少选一个)

  • user_id:要加入黑名单的用户ID。

o 示例: http://api.t.sina.com.cn/blocks/create.xml?user_id=1401881

  • screen_name:要加入黑名单的用户微博昵称,可选。

o 示例: http://api.t.sina.com.cn/blocks/create.xml?screen_name=101010

使用说明

user_id或screen_name若不存在返回400

返回结果:

XML :

<?xml version="1.0" encoding="UTF-8"?>
<user>
  <id>1833448730</id>
  <screen_name>LoopF1</screen_name>
  <name>LoopF1</name>
  <province>11</province>
  <city>8</city>
  <location>北京 海淀区</location>
  <description/>
  <url/>
  <profile_image_url>http://tp3.sinaimg.cn/1833448730/50/0/1</profile_image_url>
  <domain/>
  <gender>m</gender>
  <followers_count>0</followers_count>
  <friends_count>0</friends_count>
  <statuses_count>0</statuses_count>
  <favourites_count>0</favourites_count>
  <created_at>Tue Sep 28 00:00:00 +0800 2010</created_at>
  <following>false</following>
  <verified>false</verified>
  <allow_all_act_msg>false</allow_all_act_msg>
  <geo_enabled>true</geo_enabled>
</user>

JSON:

{
    "name" : "LoopF1",
    "domain" : "",
    "geo_enabled" : true,
    "followers_count" : 0,
    "statuses_count" : 0,
    "favourites_count" : 0,
    "city" : "8",
    "description" : "",
    "verified" : false,
    "id" : 1833448730,
    "gender" : "m",
    "friends_count" : 0,
    "screen_name" : "LoopF1",
    "allow_all_act_msg" : false,
    "following" : false,
    "url" : "",
    "profile_image_url" : "http://tp3.sinaimg.cn/1833448730/50/0/1",
    "created_at" : "Tue Sep 28 00:00:00 +0800 2010",
    "province" : "11",
    "location" : "北京 海淀区"
}

字段说明

user

  • id: 用户UID
  • screen_name: 微博昵称
  • name: 友好显示名称,如Bill Gates(此特性暂不支持)
  • province: 省份编码(参考省份编码表)
  • city: 城市编码(参考城市编码表)
  • location:地址
  • description: 个人描述
  • url: 用户博客地址
  • profile_image_url: 自定义图像
  • domain: 用户个性化URL
  • gender: 性别,m--男,f--女,n--未知
  • followers_count: 粉丝数
  • friends_count: 关注数
  • statuses_count: 微博数
  • favourites_count: 收藏数
  • created_at: 创建时间
  • following: 是否已关注(此特性暂不支持)
  • verified: 加V标示,是否微博认证用户


使用示例:

json:

curl -u uid:password http://api.t.sina.com.cn/blocks/create.json -d "source=appkey&user_id=1234567"

xml:

curl -u uid:password http://api.t.sina.com.cn/blocks/create.xml -d "source=appkey&user_id=1234567"