Favorites/destroy

跳转到: 导航, 搜索
(返回)
第19行: 第19行:
 
=== 请求参数===
 
=== 请求参数===
 
* id.  必须参数.  要删除的收藏微博信息ID.   
 
* id.  必须参数.  要删除的收藏微博信息ID.   
o Example: http://api.t.sina.com.cn/favorites/destroy/12345.json
+
o 示例: http://api.t.sina.com.cn/favorites/destroy/12345.json
  
  
=== 返回 ===
+
=== 返回结果===
 
XML示例:
 
XML示例:
<?xml version="1.0" encoding="UTF-8"?>
+
  <?xml version="1.0" encoding="UTF-8"?><statuses>
 
   <status>
 
   <status>
  <id>8374590856</id>
+
    <created_at>Thu Jan 07 17:45:11 +0800 2010</created_at>
  <text>微博平台很重要的一点在于多渠道,使得用户可以随时随地随意收发信息,我们会在这个 方向努力的。</text>
+
    <id>142310</id>
  <source>
+
    <text>测试</text>
    <a href="http://t.sina.com.cn">Web</a>
+
    <source>
  </source>
+
      <a id="10012" href="http://zhulei.com">zhulei</a>
  <favorited>false</favorited>
+
    </source>
  <truncated>false</truncated>
+
    <favorited>false</favorited>
  <created_at>Tue Nov 17 20:11:24 +0800 2009</created_at>
+
    <truncated>false</truncated>
  <user>
+
    <geo/>
    <id>10503</id>
+
    <in_reply_to_status_id></in_reply_to_status_id>
    <screen_name>timyang</screen_name>
+
    <in_reply_to_user_id></in_reply_to_user_id>
    <name>Tim Yang</name>
+
    <in_reply_to_screen_name></in_reply_to_screen_name>
    <location>广州</location>
+
    <user>
    <description>blog: timyang.net</description>
+
      <id>11075</id>
    <profile_image_url>http://tt8.sinaimg.cn/10503/50/1256306049</profile_image_url>
+
      <screen_name>name_11075</screen_name>
    <followers_count>0</followers_count>
+
      <name>name_11075</name>
    <friends_count>0</friends_count>
+
      <province>0</province>
    <statuses_count>0</statuses_count>
+
      <city>0</city>
    <favourites_count>0</favourites_count>
+
      <location></location>
  </user>
+
      <description></description>
</status>
+
      <profile_image_url>http://tp4.sinaimg.cn/11075/50/0</profile_image_url>
 +
      <domain>11075</domain>
 +
      <gender></gender>
 +
      <email></email>
 +
      <qq>4102</qq>
 +
      <msn>msn_4102</msn>
 +
      <followers_count>28</followers_count>
 +
      <friends_count>50</friends_count>
 +
      <statuses_count>0</statuses_count>
 +
      <favourites_count>32</favourites_count>
 +
      <created_at>Thu Jan 01 08:00:00 +0800 1970</created_at>
 +
      <following>false</following>
 +
      <verified>true</verified>
 +
      <geo_enabled>false</geo_enabled>
 +
    </user>
 +
  </status>
 +
  <status>
 +
  ...
 +
  </status>
 +
  </statuses>
  
 
=== 使用示例===
 
=== 使用示例===
cURL:
+
* xml:
 
+
 
curl -u user:password --http-request DELETE http://api.t.sina.com.cn/favorites/destroy/1472669360.xml
 
curl -u user:password --http-request DELETE http://api.t.sina.com.cn/favorites/destroy/1472669360.xml
 +
 +
* json:
 +
curl -u user:password --http-request DELETE http://api.t.sina.com.cn/favorites/destroy/1472669360.json

2010年1月11日 (一) 14:45的版本

目录

favorites/destroy

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

URL

curl http://api.t.sina.com.cn/favorites/destroy/id.format

格式

xml, json

HTTP请求方式

POST, DELETE

是否需要身份验证

true

请求数限制

false

请求参数

  • id. 必须参数. 要删除的收藏微博信息ID.

o 示例: http://api.t.sina.com.cn/favorites/destroy/12345.json


返回结果

XML示例:

 <?xml version="1.0" encoding="UTF-8"?><statuses>
 <status>
   <created_at>Thu Jan 07 17:45:11 +0800 2010</created_at>
   <id>142310</id>
   <text>测试</text>
   <source>
     <a id="10012" href="http://zhulei.com">zhulei</a>
   </source>
   <favorited>false</favorited>
   <truncated>false</truncated>
   <geo/>
   <in_reply_to_status_id></in_reply_to_status_id>
   <in_reply_to_user_id></in_reply_to_user_id>
   <in_reply_to_screen_name></in_reply_to_screen_name>
   <user>
     <id>11075</id>
     <screen_name>name_11075</screen_name>
     <name>name_11075</name>
     <province>0</province>
     <city>0</city>
     <location></location>
     <description></description>
     <profile_image_url>http://tp4.sinaimg.cn/11075/50/0</profile_image_url>
     <domain>11075</domain>
     <gender></gender>
     <email></email>
     <qq>4102</qq>
     <msn>msn_4102</msn>
     <followers_count>28</followers_count>
     <friends_count>50</friends_count>
     <statuses_count>0</statuses_count>
     <favourites_count>32</favourites_count>
     <created_at>Thu Jan 01 08:00:00 +0800 1970</created_at>
     <following>false</following>
     <verified>true</verified>
     <geo_enabled>false</geo_enabled>
   </user>
 </status>
 <status>
  ...
 </status>
 </statuses>

使用示例

  • xml:

curl -u user:password --http-request DELETE http://api.t.sina.com.cn/favorites/destroy/1472669360.xml

  • json:

curl -u user:password --http-request DELETE http://api.t.sina.com.cn/favorites/destroy/1472669360.json