Favorites/destroy batch

跳转到: 导航, 搜索
第1行: 第1行:
== favorites/destroy_batch ==
+
{{api_desc2|
批量删除当前登录用户的收藏。出现异常时,返回HTTP400错误。
+
uri=favorites/destroy_batch|
 
+
desc=删除微博收藏。注意:只能删除自己收藏的信息。|
{{Api_url|favorites/destroy_batch}}
+
format=XML/JSON|
+
httpMethod=POST/DELETE|
{{Api_format|xml, json}}
+
needAuth=true|
 
+
rateLimit=true|
{{Api_req|POST|True|True}}
+
params={{api_args|ids|true|int64|要删除的一组已收藏的微博消息ID,用半角逗号隔开,一次提交最多提供20个ID。}}|
 
+
getParam=|
===请求参数===
+
postParam=-X DELETE|
*ids 必选参数,想要删除收藏微博的id,多个id之间用半角逗号分割,支持最多20个。
+
result=
 
+
===XML示例===
=== 返回结果 ===
+
====XML====
+
 
<pre>
 
<pre>
<?xml version="1.0" encoding="UTF-8"?>
+
<?xml version="1.0" encoding="UTF-8"?>
<statuses>
+
<statuses>
<status>
+
  <status>
     <created_at>Tue Dec 01 08:51:58 +0800 2009</created_at>
+
     <created_at>Thu Mar 18 19:07:05 +0800 2010</created_at>
     <id>99999999</id>
+
     <id>1</id>
     <text>只见AC米兰的巴蒂斯图塔突破马尔蒂尼,一脚凌空抽射,被裁判扑了出来。</text>
+
     <text>这么小就入党了 敬仰~</text>
 
     <source>
 
     <source>
       <a href="http://t.sina.com.cn">Web</a>
+
       <a href="http://news.sina.com.cn/wap/wbk.html/">新浪微博手机版</a>
 
     </source>
 
     </source>
     <favorited>false</favorited>
+
     <favorited>true</favorited>
 
     <truncated>false</truncated>
 
     <truncated>false</truncated>
     <in_reply_to_status_id></in_reply_to_status_id>
+
     <geo/>
     <in_reply_to_user_id></in_reply_to_user_id>
+
     <in_reply_to_status_id/>
     <in_reply_to_screen_name></in_reply_to_screen_name>
+
     <in_reply_to_user_id/>
     <thumbnail_pic>http://static16.photo.sina.com.cn/thumbnail/62988d06tcbbc377f7bbf</thumbnail_pic>
+
     <in_reply_to_screen_name/>
    <bmiddle_pic>http://static16.photo.sina.com.cn/bmiddle/62988d06tcbbc377f7bbf</bmiddle_pic>
+
    <original_pic>http://static16.photo.sina.com.cn/orignal/62988d06tcbbc377f7bbf</original_pic>
+
    <geo xmlns:georss="http://www.georss.org/georss">
+
      <georss:point>23.12 -122.39697</georss:point>
+
    </geo>
+
 
     <user>
 
     <user>
       <id>1141457724</id>
+
       <id>1152759471</id>
       <screen_name>1141457724</screen_name>
+
       <screen_name>老王</screen_name>
       <name>1141457724</name>
+
       <name>老王</name>
       <location>广州</location>
+
      <province>11</province>
       <description>blog: timyang.net</description>
+
      <city>8</city>
       <url>http://timyang.net</url>
+
       <location>北京 海淀区</location>
       <profile_image_url>http://portrait.sinaimg.cn/1141457724/50#.jpg</profile_image_url>
+
       <description>哼。。。 花样真多。 讨厌。</description>
       <followers_count>0</followers_count>
+
       <url>http://1</url>
       <friends_count>0</friends_count>
+
       <profile_image_url>http://tp4.sinaimg.cn/1152759471/50/1263371934</profile_image_url>
       <statuses_count>0</statuses_count>
+
      <domain>hotpixel</domain>
 +
      <gender>m</gender>
 +
       <followers_count>1567</followers_count>
 +
       <friends_count>202</friends_count>
 +
       <statuses_count>6776</statuses_count>
 
       <favourites_count>0</favourites_count>
 
       <favourites_count>0</favourites_count>
 +
      <created_at>Fri Aug 28 00:00:00 +0800 2009</created_at>
 
       <following>false</following>
 
       <following>false</following>
       <verified>true</verified>
+
       <verified>false</verified>
 +
      <allow_all_act_msg>false</allow_all_act_msg>
 +
      <geo_enabled>false</geo_enabled>
 
     </user>
 
     </user>
     </status>
+
     <retweeted_status>
 +
      <created_at>Thu Mar 18 19:05:52 +0800 2010</created_at>
 +
      <id>27657268</id>
 +
      <text>班里开始交团费了,跟我没关系</text>
 +
      <source>
 +
        <a href="http://news.sina.com.cn/wap/wbk.html/">新浪微博手机版</a>
 +
      </source>
 +
      <favorited>true</favorited>
 +
      <truncated>false</truncated>
 +
      <geo/>
 +
      <in_reply_to_status_id/>
 +
      <in_reply_to_user_id/>
 +
      <in_reply_to_screen_name/>
 +
      <user>
 +
        <id>1654703984</id>
 +
        <screen_name>高考铅笔亚克西</screen_name>
 +
        <name>高考铅笔亚克西</name>
 +
        <province>42</province>
 +
        <city>1</city>
 +
        <location>湖北 武汉</location>
 +
        <description>在通往高考的路上乳摇狂奔,偶尔发骚回头抛个媚眼骂句操蛋,切不可以为姐就是招之即上挥之自摸的小娘儿们。好不容易成年了,姐要更加有湿想嗯哼。</description>
 +
        <url/>
 +
        <profile_image_url>http://tp1.sinaimg.cn/1654703984/50/1264140632</profile_image_url>
 +
        <domain>kimmy14</domain>
 +
        <gender>f</gender>
 +
        <followers_count>1330</followers_count>
 +
        <friends_count>755</friends_count>
 +
        <statuses_count>3354</statuses_count>
 +
        <favourites_count>0</favourites_count>
 +
        <created_at>Mon Oct 19 00:00:00 +0800 2009</created_at>
 +
        <following>false</following>
 +
        <verified>false</verified>
 +
        <allow_all_act_msg>false</allow_all_act_msg>
 +
        <geo_enabled>false</geo_enabled>
 +
      </user>
 +
    </retweeted_status>
 +
  </status>
 
   ...
 
   ...
  </statuses>
+
</statuses>
 
</pre>
 
</pre>
JSON示例:
+
===JSON示例===
 
<pre>
 
<pre>
[ {"created_at":"Wed  Jan  06  11:26:01  +0800 2010",
+
[
  "id":142243,
+
    {
  "text":"test  test",
+
        "created_at" : "Thu Mar 18 19:07:05 +0800 2010",
  "source":"<a  id=\"0\" href=\"http://t.sina.com.cn/\" rel=\"nofollow\">Web</a>",
+
        "text" : "这么小就入党了 敬仰~",
  "favorited":false,
+
        "truncated" : false,
  "truncated":false,
+
        "retweeted_status" :
  "in_reply_to_status_id":"",
+
        {
  "in_reply_to_user_id":"",
+
            "created_at" : "Thu Mar 18 19:05:52 +0800 2010",
  "in_reply_to_screen_name":"",
+
            "text" : "班里开始交团费了,跟我没关系",
  "geo":{"type": "Point","coordinates": [23.12 -122.39697]},
+
            "truncated" : false,
  "user":{"id":10506,
+
            "in_reply_to_status_id" : "",
  "screen_name":"name_10506",
+
            "in_reply_to_screen_name" : "",
  "name":"name_10506",
+
            "geo" : null,
  "province":0,
+
            "user" :
  "city":0,
+
            {
  "location":"",
+
                "name" : "高考铅笔亚克西",
  "description":"",
+
                "domain" : "kimmy14",
  "url":"",
+
                "geo_enabled" : false,
  "profile_image_url":"http://tp3.sinaimg.cn/10506/50/0",
+
                "followers_count" : 1330,
  "domain":"10506",
+
                "statuses_count" : 3354,
  "followers_count":24,
+
                "favourites_count" : 0,
  "friends_count":50,
+
                "city" : "1",
  "statuses_count":0,
+
                "description" : "在通往高考的路上乳摇狂奔,偶尔发骚回头抛个媚眼骂句操蛋,切不可以为姐就是招之即上挥之自摸的小娘儿们。好不容易成年了,姐要更加有湿想嗯哼。",
  "favourites_count":21,
+
                "verified" : false,
  "created_at":"Thu  Jan  01  08:00:00  +0800  1970",
+
                "id" : 1654703984,
  "following":false,
+
                "gender" : "f",
  "geo_enabled":false,
+
                "friends_count" : 755,
  "verified":false}
+
                "screen_name" : "高考铅笔亚克西",
  },
+
                "allow_all_act_msg" : false,
  {},...
+
                "following" : false,
  ]
+
                "url" : "",
</pre>
+
                "profile_image_url" : "http://tp1.sinaimg.cn/1654703984/50/1264140632",
{{Param_statues}}
+
                "created_at" : "Mon Oct 19 00:00:00 +0800 2009",
{{Param_user}}
+
                "province" : "42",
 +
                "location" : "湖北 武汉"
 +
            },
 +
            "favorited" : true,
 +
            "in_reply_to_user_id" : "",
 +
            "id" : 27657268,
 +
            "source" : "<a href=\"http://news.sina.com.cn/wap/wbk.html/\" rel=\"nofollow\">新浪微博手机版</a>"
 +
        },
 +
        "in_reply_to_status_id" : "",
 +
        "in_reply_to_screen_name" : "",
 +
        "geo" : null,
 +
        "user" :
 +
        {
 +
            "name" : "老王",
 +
            "domain" : "hotpixel",
 +
            "geo_enabled" : false,
 +
            "followers_count" : 1567,
 +
            "statuses_count" : 6776,
 +
            "favourites_count" : 0,
 +
            "city" : "8",
 +
            "description" : "哼。。。 花样真多。 讨厌。",
 +
            "verified" : false,
 +
            "id" : 1152759471,
 +
            "gender" : "m",
 +
            "friends_count" : 202,
 +
            "screen_name" : "老王",
 +
            "allow_all_act_msg" : false,
 +
            "following" : false,
 +
            "url" : "http://1",
 +
            "profile_image_url" : "http://tp4.sinaimg.cn/1152759471/50/1263371934",
 +
            "created_at" : "Fri Aug 28 00:00:00 +0800 2009",
 +
            "province" : "11",
 +
            "location" : "北京 海淀区"
 +
        },
 +
        "favorited" : true,
 +
        "in_reply_to_user_id" : "",
 +
        "id" : 1,
 +
        "source" : "<a href=\"http://news.sina.com.cn/wap/wbk.html/\" rel=\"nofollow\">新浪微博手机版</a>"
 +
    },
 +
]
 +
</pre>|
 +
useAge=无|
 +
otherInfo=无
 +
}}

2010年12月8日 (三) 11:57的版本

目录

favorites/destroy_batch

删除微博收藏。注意:只能删除自己收藏的信息。

URL

http://api.t.sina.com.cn/favorites/destroy_batch.(json%7Cxml)

支持格式

XML/JSON

HTTP请求方式

POST/DELETE

是否需要登录

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

请求数限制

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

请求参数

  必选 类型及范围 说明
source true string 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数)
ids true int64 要删除的一组已收藏的微博消息ID,用半角逗号隔开,一次提交最多提供20个ID。

注意事项

返回结果

XML示例

<?xml version="1.0" encoding="UTF-8"?>
<statuses>
  <status>
    <created_at>Thu Mar 18 19:07:05 +0800 2010</created_at>
    <id>1</id>
    <text>这么小就入党了 敬仰~</text>
    <source>
      <a href="http://news.sina.com.cn/wap/wbk.html/">新浪微博手机版</a>
    </source>
    <favorited>true</favorited>
    <truncated>false</truncated>
    <geo/>
    <in_reply_to_status_id/>
    <in_reply_to_user_id/>
    <in_reply_to_screen_name/>
    <user>
      <id>1152759471</id>
      <screen_name>老王</screen_name>
      <name>老王</name>
      <province>11</province>
      <city>8</city>
      <location>北京 海淀区</location>
      <description>哼。。。 花样真多。 讨厌。</description>
      <url>http://1</url>
      <profile_image_url>http://tp4.sinaimg.cn/1152759471/50/1263371934</profile_image_url>
      <domain>hotpixel</domain>
      <gender>m</gender>
      <followers_count>1567</followers_count>
      <friends_count>202</friends_count>
      <statuses_count>6776</statuses_count>
      <favourites_count>0</favourites_count>
      <created_at>Fri Aug 28 00:00:00 +0800 2009</created_at>
      <following>false</following>
      <verified>false</verified>
      <allow_all_act_msg>false</allow_all_act_msg>
      <geo_enabled>false</geo_enabled>
    </user>
    <retweeted_status>
      <created_at>Thu Mar 18 19:05:52 +0800 2010</created_at>
      <id>27657268</id>
      <text>班里开始交团费了,跟我没关系</text>
      <source>
        <a href="http://news.sina.com.cn/wap/wbk.html/">新浪微博手机版</a>
      </source>
      <favorited>true</favorited>
      <truncated>false</truncated>
      <geo/>
      <in_reply_to_status_id/>
      <in_reply_to_user_id/>
      <in_reply_to_screen_name/>
      <user>
        <id>1654703984</id>
        <screen_name>高考铅笔亚克西</screen_name>
        <name>高考铅笔亚克西</name>
        <province>42</province>
        <city>1</city>
        <location>湖北 武汉</location>
        <description>在通往高考的路上乳摇狂奔,偶尔发骚回头抛个媚眼骂句操蛋,切不可以为姐就是招之即上挥之自摸的小娘儿们。好不容易成年了,姐要更加有湿想嗯哼。</description>
        <url/>
        <profile_image_url>http://tp1.sinaimg.cn/1654703984/50/1264140632</profile_image_url>
        <domain>kimmy14</domain>
        <gender>f</gender>
        <followers_count>1330</followers_count>
        <friends_count>755</friends_count>
        <statuses_count>3354</statuses_count>
        <favourites_count>0</favourites_count>
        <created_at>Mon Oct 19 00:00:00 +0800 2009</created_at>
        <following>false</following>
        <verified>false</verified>
        <allow_all_act_msg>false</allow_all_act_msg>
        <geo_enabled>false</geo_enabled>
      </user>
    </retweeted_status>
  </status>
  ...
</statuses>

JSON示例

[
    {
        "created_at" : "Thu Mar 18 19:07:05 +0800 2010",
        "text" : "这么小就入党了 敬仰~",
        "truncated" : false,
        "retweeted_status" : 
        {
            "created_at" : "Thu Mar 18 19:05:52 +0800 2010",
            "text" : "班里开始交团费了,跟我没关系",
            "truncated" : false,
            "in_reply_to_status_id" : "",
            "in_reply_to_screen_name" : "",
            "geo" : null,
            "user" : 
            {
                "name" : "高考铅笔亚克西",
                "domain" : "kimmy14",
                "geo_enabled" : false,
                "followers_count" : 1330,
                "statuses_count" : 3354,
                "favourites_count" : 0,
                "city" : "1",
                "description" : "在通往高考的路上乳摇狂奔,偶尔发骚回头抛个媚眼骂句操蛋,切不可以为姐就是招之即上挥之自摸的小娘儿们。好不容易成年了,姐要更加有湿想嗯哼。",
                "verified" : false,
                "id" : 1654703984,
                "gender" : "f",
                "friends_count" : 755,
                "screen_name" : "高考铅笔亚克西",
                "allow_all_act_msg" : false,
                "following" : false,
                "url" : "",
                "profile_image_url" : "http://tp1.sinaimg.cn/1654703984/50/1264140632",
                "created_at" : "Mon Oct 19 00:00:00 +0800 2009",
                "province" : "42",
                "location" : "湖北 武汉"
            },
            "favorited" : true,
            "in_reply_to_user_id" : "",
            "id" : 27657268,
            "source" : "<a href=\"http://news.sina.com.cn/wap/wbk.html/\" rel=\"nofollow\">新浪微博手机版</a>"
        },
        "in_reply_to_status_id" : "",
        "in_reply_to_screen_name" : "",
        "geo" : null,
        "user" : 
        {
            "name" : "老王",
            "domain" : "hotpixel",
            "geo_enabled" : false,
            "followers_count" : 1567,
            "statuses_count" : 6776,
            "favourites_count" : 0,
            "city" : "8",
            "description" : "哼。。。 花样真多。 讨厌。",
            "verified" : false,
            "id" : 1152759471,
            "gender" : "m",
            "friends_count" : 202,
            "screen_name" : "老王",
            "allow_all_act_msg" : false,
            "following" : false,
            "url" : "http://1",
            "profile_image_url" : "http://tp4.sinaimg.cn/1152759471/50/1263371934",
            "created_at" : "Fri Aug 28 00:00:00 +0800 2009",
            "province" : "11",
            "location" : "北京 海淀区"
        },
        "favorited" : true,
        "in_reply_to_user_id" : "",
        "id" : 1,
        "source" : "<a href=\"http://news.sina.com.cn/wap/wbk.html/\" rel=\"nofollow\">新浪微博手机版</a>"
    },
]

其他