Blocks/destroy

跳转到: 导航, 搜索
(使用示例:)
 
(未显示2个用户的9个中间版本)
第1行: 第1行:
== blocks/destroy ==
+
{{api_desc2|
删黑名单
+
uri=blocks/destroy|
 
+
desc=将某用户从当前登录用户的黑名单中移除|
=== URL: ===
+
format=XML/JSON|
http://api.t.sina.com.cn/blocks/destroy.format
+
httpMethod=POST/DELETE|
+
needAuth=true|
===格式:===
+
rateLimit=true|
xml, json
+
params={{api_args|user_id|true|int64|要移出黑名单的用户ID}}
+
{{api_args|screen_name|false|string|要移出黑名单的用户微博昵称}}|
=== 请求方式: ===
+
getParam=|
POST, DELETE
+
postParam=-d "user_id=12345"|
+
result=
===是否需要登录:===
+
===XML示例===
true
+
<pre>
 
+
<?xml version="1.0" encoding="UTF-8"?>
===请求数限制:===
+
<user>
false
+
  <id>12345</id>
 
+
  <screen_name>a12bcdc_h8f</screen_name>
===请求参数:===
+
  <name>a12bcdc_h8f</name>
必选参数(至少选一个)
+
  <province>0</province>
* user_id.  要删除黑名单的用户ID
+
  <city>0</city>
o Example: http://api.t.sina.com.cn/blocks/destroy.xml?user_id=1401881
+
  <location/>
* screen_name. 要删除黑名单的用户昵称
+
  <description/>
o Example: http://api.t.sina.com.cn/blocks/destroy.xml?screen_name=101010
+
  <url/>
===使用说明===
+
  <profile_image_url>http://tp2.sinaimg.cn/12345/50/0/0</profile_image_url>
*user_id或screen_name若不存在返回400
+
  <domain/>
===返回结果: ===
+
  <gender>f</gender>
XML:
+
  <followers_count>2</followers_count>
<user>
+
  <friends_count>0</friends_count>
<id>1266321801</id>
+
  <statuses_count>0</statuses_count>
<screen_name>姚晨</screen_name>
+
  <favourites_count>0</favourites_count>
<name>姚晨</name>
+
  <created_at>Tue Dec 15 00:00:00 +0800 2009</created_at>
<province>11</province>
+
  <following>false</following>
<city>5</city>
+
  <verified>false</verified>
<location>北京 朝阳区</location>
+
  <allow_all_act_msg>false</allow_all_act_msg>
<description>一颗很逊的卤蛋。</description>
+
  <geo_enabled>true</geo_enabled>
<url>http://blog.sina.com.cn/yaochen</url>
+
</user>
<profile_image_url>http://tp2.sinaimg.cn/1266321801/50/1283203855</profile_image_url>
+
</pre>
<domain>yaochen</domain>
+
===JSON示例===
<gender>f</gender>
+
<pre>
<followers_count>3284142</followers_count>
+
<friends_count>620</friends_count>
+
<statuses_count>2361</statuses_count>
+
<favourites_count>14</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>
+
<status>
+
  <created_at>Mon Oct 18 11:44:53 +0800 2010</created_at>
+
  <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&690</thumbnail_pic>
+
    <bmiddle_pic>http://ss3.sinaimg.cn/bmiddle/3f1622c9492daa18d5612&690</bmiddle_pic>
+
    <original_pic>http://ss3.sinaimg.cn/orignal/3f1622c9492daa18d5612&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>
+
JSON:
+
 
{
 
{
 
+
    "name" : "a12bcdc_h8f",
  "allow_all_act_msg": false,
+
    "domain" : "",
  "city": "5",  
+
    "geo_enabled" : true,
  "created_at": "Fri Aug 28 00:00:00 +0800 2009",
+
    "followers_count" : 2,
  "description": "一颗很逊的卤蛋。",
+
    "statuses_count" : 0,
  "domain": "yaochen",
+
    "favourites_count" : 0,
  "favourites_count": 14,
+
    "city" : "0",
  "followers_count": 3284142,
+
    "description" : "",
  "following": false,
+
    "verified" : false,
  "friends_count": 620,
+
    "id" : 12345,
  "gender": "f",  
+
    "gender" : "f",
  "geo_enabled": true,  
+
    "friends_count" : 0,
  "id": 1266321801,  
+
    "screen_name" : "a12bcdc_h8f",
  "location": "北京 朝阳区",  
+
    "allow_all_act_msg" : false,
  "name": "姚晨",  
+
    "following" : false,
  "profile_image_url": "http://tp2.sinaimg.cn/1266321801/50/1283203855",  
+
    "url" : "",
  "province": "11",  
+
    "profile_image_url" : "http://tp2.sinaimg.cn/12345/50/0/0",
  "screen_name": "姚晨",
+
    "created_at" : "Tue Dec 15 00:00:00 +0800 2009",
  "status": {
+
    "province" : "0",
      "created_at": "Mon Oct 18 11:44:53 +0800 2010",
+
    "location" : ""
      "favorited": false,  
+
}
      "geo": null,
+
</pre>
      "id": 3141808011,  
+
{{Param_user}}|
      "in_reply_to_screen_name": "",  
+
useAge=
      "in_reply_to_status_id": "",  
+
如果user_id或者screen_name均未提供,则返回400错误。|
      "in_reply_to_user_id": "",  
+
otherInfo=无
      "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
+
 
+
}  
+
 
+
===使用示例: ===
+
curl  http://api.t.sina.com.cn/blocks/destroy.json
+

2012年9月24日 (一) 11:44的最后版本

目录

blocks/destroy

将某用户从当前登录用户的黑名单中移除

URL

http://api.t.sina.com.cn/blocks/destroy.(json%7Cxml)

支持格式

XML/JSON

HTTP请求方式

POST/DELETE

是否需要登录

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

请求数限制

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

请求参数

  必选 类型及范围 说明
source true string 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数)
user_id true int64 要移出黑名单的用户ID
screen_name false string 要移出黑名单的用户微博昵称

注意事项

如果user_id或者screen_name均未提供,则返回400错误。

返回结果

XML示例

<?xml version="1.0" encoding="UTF-8"?>
<user>
  <id>12345</id>
  <screen_name>a12bcdc_h8f</screen_name>
  <name>a12bcdc_h8f</name>
  <province>0</province>
  <city>0</city>
  <location/>
  <description/>
  <url/>
  <profile_image_url>http://tp2.sinaimg.cn/12345/50/0/0</profile_image_url>
  <domain/>
  <gender>f</gender>
  <followers_count>2</followers_count>
  <friends_count>0</friends_count>
  <statuses_count>0</statuses_count>
  <favourites_count>0</favourites_count>
  <created_at>Tue Dec 15 00:00:00 +0800 2009</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" : "a12bcdc_h8f",
    "domain" : "",
    "geo_enabled" : true,
    "followers_count" : 2,
    "statuses_count" : 0,
    "favourites_count" : 0,
    "city" : "0",
    "description" : "",
    "verified" : false,
    "id" : 12345,
    "gender" : "f",
    "friends_count" : 0,
    "screen_name" : "a12bcdc_h8f",
    "allow_all_act_msg" : false,
    "following" : false,
    "url" : "",
    "profile_image_url" : "http://tp2.sinaimg.cn/12345/50/0/0",
    "created_at" : "Tue Dec 15 00:00:00 +0800 2009",
    "province" : "0",
    "location" : ""
}

字段说明 - user

  • id: 用户UID
  • screen_name: 微博昵称
  • name: 友好显示名称,同微博昵称
  • 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标示,是否微博认证用户

其他

文档更新时间: 2012-09-24