Favorites/destroy batch

跳转到: 导航, 搜索
 
(未显示2个用户的4个中间版本)
第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|False}}
+
params={{api_args|ids|true|int64|要删除的一组已收藏的微博消息ID,用半角逗号隔开,一次提交最多提供20个ID。}}|
 
+
getParam=|
===请求参数===
+
postParam=-d "ids=12345,67891"|
*ids 必选参数,想要删除收藏微博的id,多个id之间用半角逗号分割,支持最多20个。
+
result=
 
+
===XML示例===
===返回结果===
+
<pre>
XML示例:
+
<statuses>
  <?xml version="1.0" encoding="UTF-8"?>
+
   <status>
   <direct_message>
+
     <created_at>Mon Nov 29 16:08:43 +0800 2010</created_at>
     <created_at>Fri Jan 08 15:15:31 +0800 2010</created_at>
+
     <id>3958728723</id>
     <id>207675</id>
+
     <text>各位开发者,我们的论坛上线啦~http://sinaurl.cn/h4FWc7 欢迎大家的参与~另外,关于技术相关的问题,可以在论坛上提出,也可以@微博API 这个官方技术支持账号哦~感谢大家对开放平台的支持~[呵呵]</text>
     <text>send dm 777</text>
+
     <source>
     <sender_id>10506</sender_id>
+
      <a href="http://t.sina.com.cn">新浪微博</a>
     <recipient_id>11075</recipient_id>
+
     </source>
     <sender_screen_name>name_10506</sender_screen_name>
+
    <favorited>false</favorited>
     <recipient_screen_name>name_11075</recipient_screen_name>
+
     <truncated>false</truncated>
     <sender>
+
     <geo/>
       <id>10506</id>
+
    <in_reply_to_status_id/>
       <screen_name>name_10506</screen_name>
+
    <in_reply_to_user_id/>
       <name>name_10506</name>
+
    <in_reply_to_screen_name/>
       <province>0</province>
+
     <user>
       <city>0</city>
+
       <id>11051</id>
       <location></location>
+
       <screen_name>微博开放平台</screen_name>
       <description></description>
+
       <name>微博开放平台</name>
       <url></url>
+
       <province>11</province>
       <profile_image_url>http://tp3.sinaimg.cn/10506/50/0</profile_image_url>
+
       <city>8</city>
       <domain>10506</domain>
+
       <location>北京 海淀区</location>
       <gender></gender>
+
       <description>新浪微博开放平台市场推广官方账号,如有技术问题,请@微博API或者发私信给微博API</description>
       <followers_count>24</followers_count>
+
       <url>http://open.t.sina.com.cn/</url>
       <friends_count>50</friends_count>
+
       <profile_image_url>http://tp4.sinaimg.cn/11051/50/1280283165/1</profile_image_url>
       <statuses_count>47</statuses_count>
+
       <domain>openapi</domain>
 +
       <gender>m</gender>
 +
       <followers_count>13034</followers_count>
 +
       <friends_count>5</friends_count>
 +
       <statuses_count>157</statuses_count>
 
       <favourites_count>0</favourites_count>
 
       <favourites_count>0</favourites_count>
       <created_at>Thu Jan 01 08:00:00 +0800 1970</created_at>
+
       <created_at>Wed Jan 20 00:00:00 +0800 2010</created_at>
      <following>false</following>
+
      <verified>false</verified>
+
      <geo_enabled>false</geo_enabled>
+
    </sender>
+
    <recipient>
+
      <id>11075</id>
+
      <screen_name>name_11075</screen_name>
+
      <name>name_11075</name>
+
      <province>0</province>
+
      <city>0</city>
+
      <location></location>
+
      <description></description>
+
      <url></url>
+
      <profile_image_url>http://tp4.sinaimg.cn/11075/50/0</profile_image_url>
+
      <domain>11075</domain>
+
      <gender></gender>
+
      <followers_count>28</followers_count>
+
      <friends_count>50</friends_count>
+
      <statuses_count>29</statuses_count>
+
      <favourites_count>0</favourites_count>
+
      <created_at>Thu Jan 01 08:00:00 +0800 1970</created_at>
+
 
       <following>false</following>
 
       <following>false</following>
 
       <verified>true</verified>
 
       <verified>true</verified>
       <geo_enabled>false</geo_enabled>
+
      <allow_all_act_msg>true</allow_all_act_msg>
     </recipient>
+
       <geo_enabled>true</geo_enabled>
   </direct_message>
+
     </user>
 
+
   </status>
JSON示例:
+
...
 
+
</statuses>
  {
+
</pre>
    "created_at":"Wed Jan 06 11:48:24 +0800 2010",
+
===JSON示例===
    "id":207568,
+
<pre>
    "text":"test",
+
[
    "sender_id":10506,
+
    {
    "recipient_id":11075,
+
        "created_at" : "Mon Nov 29 16:08:43 +0800 2010",
    "sender_screen_name":"name_10506",
+
        "text" : "各位开发者,我们的论坛上线啦~http://sinaurl.cn/h4FWc7 欢迎大家的参与~另外,关于技术相关的问题,可以在论坛上提出,也可以@微博API 这个官方技术支持账号哦~感谢大家对开放平台的支持~[呵呵]",
    "recipient_screen_name":"name_11075",
+
        "truncated" : false,
    "sender":
+
        "in_reply_to_status_id" : "",
          {"id":10506,
+
        "in_reply_to_screen_name" : "",
            "screen_name":"name_10506",
+
        "geo" : null,
            "name":"name_10506",
+
        "user" :  
            "province":null,
+
        {
            "city":null,
+
             "name" : "微博开放平台",
            "location":"",
+
             "domain" : "openapi",
             "description":"",
+
             "geo_enabled" : true,
             "url":"",
+
             "followers_count" : 13034,
             "profile_image_url":"http://tp3.sinaimg.cn/10506/50/0",
+
             "statuses_count" : 157,
            "domain":"10506",
+
             "favourites_count" : 0,
             "followers_count":24,
+
             "city" : "8",
            "friends_count":50,
+
             "description" : "新浪微博开放平台市场推广官方账号,如有技术问题,请@微博API或者发私信给微博API",
             "statuses_count":0,
+
             "verified" : true,
             "favourites_count":25,
+
            "id" : 11051,
             "created_at":"Thu Jan 01 08:00:00 +0800 1970",
+
             "gender" : "m",
             "following":false,
+
             "friends_count" : 5,
            "geo_enabled":false,
+
             "screen_name" : "微博开放平台",
             "verified":false},
+
             "allow_all_act_msg" : true,
    "recipient":
+
             "following" : false,
          {"id":11075,
+
             "url" : "http://open.t.sina.com.cn/",
             "screen_name":"name_11075",
+
             "profile_image_url" : "http://tp4.sinaimg.cn/11051/50/1280283165/1",
             "name":"name_11075",
+
             "created_at" : "Wed Jan 20 00:00:00 +0800 2010",
             "province":null,
+
             "province" : "11",
            "city":null,
+
             "location" : "北京 海淀区"
             "location":"",
+
        },
             "description":"",
+
        "favorited" : false,
             "url":"",
+
        "in_reply_to_user_id" : "",
             "profile_image_url":"http://tp4.sinaimg.cn/11075/50/0",
+
        "id" : 3958728723,
             "domain":"11075",
+
        "source" : "<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微博</a>"
             "followers_count":28,
+
    },
             "friends_count":50,
+
...
            "statuses_count":0,
+
]
            "favourites_count":11,
+
</pre>|
            "created_at":"Thu Jan 01 08:00:00 +0800 1970",
+
useAge=无|
            "following":false,
+
otherInfo=无
            "geo_enabled":false,
+
}}
            "verified":true}
+
  }
+
{{param_DM}}
+
{{param_user}}
+

2010年12月8日 (三) 15:40的最后版本

目录

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示例

<statuses>
  <status>
    <created_at>Mon Nov 29 16:08:43 +0800 2010</created_at>
    <id>3958728723</id>
    <text>各位开发者,我们的论坛上线啦~http://sinaurl.cn/h4FWc7 欢迎大家的参与~另外,关于技术相关的问题,可以在论坛上提出,也可以@微博API 这个官方技术支持账号哦~感谢大家对开放平台的支持~[呵呵]</text>
    <source>
      <a href="http://t.sina.com.cn">新浪微博</a>
    </source>
    <favorited>false</favorited>
    <truncated>false</truncated>
    <geo/>
    <in_reply_to_status_id/>
    <in_reply_to_user_id/>
    <in_reply_to_screen_name/>
    <user>
      <id>11051</id>
      <screen_name>微博开放平台</screen_name>
      <name>微博开放平台</name>
      <province>11</province>
      <city>8</city>
      <location>北京 海淀区</location>
      <description>新浪微博开放平台市场推广官方账号,如有技术问题,请@微博API或者发私信给微博API</description>
      <url>http://open.t.sina.com.cn/</url>
      <profile_image_url>http://tp4.sinaimg.cn/11051/50/1280283165/1</profile_image_url>
      <domain>openapi</domain>
      <gender>m</gender>
      <followers_count>13034</followers_count>
      <friends_count>5</friends_count>
      <statuses_count>157</statuses_count>
      <favourites_count>0</favourites_count>
      <created_at>Wed Jan 20 00:00:00 +0800 2010</created_at>
      <following>false</following>
      <verified>true</verified>
      <allow_all_act_msg>true</allow_all_act_msg>
      <geo_enabled>true</geo_enabled>
    </user>
  </status>
...
</statuses>

JSON示例

[
    {
        "created_at" : "Mon Nov 29 16:08:43 +0800 2010",
        "text" : "各位开发者,我们的论坛上线啦~http://sinaurl.cn/h4FWc7 欢迎大家的参与~另外,关于技术相关的问题,可以在论坛上提出,也可以@微博API 这个官方技术支持账号哦~感谢大家对开放平台的支持~[呵呵]",
        "truncated" : false,
        "in_reply_to_status_id" : "",
        "in_reply_to_screen_name" : "",
        "geo" : null,
        "user" : 
        {
            "name" : "微博开放平台",
            "domain" : "openapi",
            "geo_enabled" : true,
            "followers_count" : 13034,
            "statuses_count" : 157,
            "favourites_count" : 0,
            "city" : "8",
            "description" : "新浪微博开放平台市场推广官方账号,如有技术问题,请@微博API或者发私信给微博API",
            "verified" : true,
            "id" : 11051,
            "gender" : "m",
            "friends_count" : 5,
            "screen_name" : "微博开放平台",
            "allow_all_act_msg" : true,
            "following" : false,
            "url" : "http://open.t.sina.com.cn/",
            "profile_image_url" : "http://tp4.sinaimg.cn/11051/50/1280283165/1",
            "created_at" : "Wed Jan 20 00:00:00 +0800 2010",
            "province" : "11",
            "location" : "北京 海淀区"
        },
        "favorited" : false,
        "in_reply_to_user_id" : "",
        "id" : 3958728723,
        "source" : "<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微博</a>"
    },
...
]

其他

文档更新时间: 2010-12-08