Direct messages/destroy batch
(→direct_messages/destroy_batch) |
|||
第1行: | 第1行: | ||
− | + | {{api_desc2| | |
− | + | uri=direct_messages/destroy_batch| | |
− | + | desc=批量删除当前登录用户的私信。| | |
− | + | format=XML/JSON| | |
− | + | httpMethod=POST/DELETE| | |
− | + | needAuth=true| | |
− | + | rateLimit=true| | |
− | {{ | + | params={{api_args|ids|true|int64|想要删除私信的id,多个id之间用半角逗号分割,每次提交系统最多能接受20个私信ID。}}| |
− | + | getParam=| | |
− | === | + | postParam=-d "ids=722792861,630916457"| |
− | + | result= | |
− | + | ===XML示例=== | |
− | + | <pre> | |
− | === | + | <?xml version="1.0" encoding="UTF-8"?> |
− | + | <direct_messages> | |
− | + | ||
− | + | ||
<direct_message> | <direct_message> | ||
− | <created_at> | + | <created_at>Mon Dec 06 11:38:44 +0800 2010</created_at> |
− | <id> | + | <id>722792861</id> |
− | <text> | + | <text>wahaha</text> |
− | <sender_id> | + | <sender_id>1854740027</sender_id> |
− | <recipient_id> | + | <recipient_id>1854835127</recipient_id> |
− | <sender_screen_name> | + | <sender_screen_name>siegetest</sender_screen_name> |
− | <recipient_screen_name> | + | <recipient_screen_name>siegetest2</recipient_screen_name> |
<sender> | <sender> | ||
− | <id> | + | <id>1854740027</id> |
− | <screen_name> | + | <screen_name>siegetest</screen_name> |
− | <name> | + | <name>siegetest</name> |
− | <province> | + | <province>11</province> |
− | <city> | + | <city>8</city> |
− | <location></location> | + | <location>北京 海淀区</location> |
− | <description></description> | + | <description>ABCDE</description> |
− | <url | + | <url/> |
− | <profile_image_url>http:// | + | <profile_image_url>http://tp4.sinaimg.cn/1854740027/50/1291272213/1</profile_image_url> |
− | <domain | + | <domain/> |
− | <gender></gender> | + | <gender>m</gender> |
− | <followers_count> | + | <followers_count>2</followers_count> |
− | <friends_count> | + | <friends_count>20</friends_count> |
− | <statuses_count> | + | <statuses_count>18</statuses_count> |
<favourites_count>0</favourites_count> | <favourites_count>0</favourites_count> | ||
− | <created_at>Thu | + | <created_at>Thu Nov 11 00:00:00 +0800 2010</created_at> |
<following>false</following> | <following>false</following> | ||
<verified>false</verified> | <verified>false</verified> | ||
− | < | + | <allow_all_act_msg>false</allow_all_act_msg> |
+ | <geo_enabled>true</geo_enabled> | ||
</sender> | </sender> | ||
<recipient> | <recipient> | ||
− | <id> | + | <id>1854835127</id> |
− | <screen_name> | + | <screen_name>siegetest2</screen_name> |
− | <name> | + | <name>siegetest2</name> |
− | <province> | + | <province>11</province> |
− | <city> | + | <city>8</city> |
− | <location></location> | + | <location>北京 海淀区</location> |
− | <description | + | <description/> |
− | <url | + | <url/> |
− | <profile_image_url>http://tp4.sinaimg.cn/ | + | <profile_image_url>http://tp4.sinaimg.cn/1854835127/50/0/1</profile_image_url> |
− | <domain | + | <domain/> |
− | <gender></gender> | + | <gender>m</gender> |
− | <followers_count> | + | <followers_count>0</followers_count> |
− | <friends_count> | + | <friends_count>20</friends_count> |
− | <statuses_count> | + | <statuses_count>2</statuses_count> |
<favourites_count>0</favourites_count> | <favourites_count>0</favourites_count> | ||
− | <created_at>Thu | + | <created_at>Thu Nov 11 00:00:00 +0800 2010</created_at> |
<following>false</following> | <following>false</following> | ||
− | <verified> | + | <verified>false</verified> |
− | < | + | <allow_all_act_msg>false</allow_all_act_msg> |
+ | <geo_enabled>true</geo_enabled> | ||
</recipient> | </recipient> | ||
</direct_message> | </direct_message> | ||
− | + | <direct_message> | |
− | < | + | <created_at>Mon Nov 15 10:43:48 +0800 2010</created_at> |
− | + | <id>630916457</id> | |
− | < | + | <text>yl7sN</text> |
− | + | <sender_id>1854740027</sender_id> | |
− | + | <recipient_id>1854835127</recipient_id> | |
− | + | <sender_screen_name>siegetest</sender_screen_name> | |
− | + | <recipient_screen_name>siegetest2</recipient_screen_name> | |
− | + | <sender> | |
− | + | <id>1854740027</id> | |
− | + | <screen_name>siegetest</screen_name> | |
− | + | <name>siegetest</name> | |
− | + | <province>11</province> | |
− | + | <city>8</city> | |
− | + | <location>北京 海淀区</location> | |
− | + | <description>ABCDE</description> | |
− | + | <url/> | |
− | + | <profile_image_url>http://tp4.sinaimg.cn/1854740027/50/1291272213/1</profile_image_url> | |
− | + | <domain/> | |
− | + | <gender>m</gender> | |
− | + | <followers_count>2</followers_count> | |
− | + | <friends_count>20</friends_count> | |
− | + | <statuses_count>18</statuses_count> | |
− | + | <favourites_count>0</favourites_count> | |
− | + | <created_at>Thu Nov 11 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> | |
− | + | </sender> | |
− | + | <recipient> | |
− | + | <id>1854835127</id> | |
− | + | <screen_name>siegetest2</screen_name> | |
− | + | <name>siegetest2</name> | |
− | + | <province>11</province> | |
− | + | <city>8</city> | |
− | + | <location>北京 海淀区</location> | |
− | + | <description/> | |
− | + | <url/> | |
− | + | <profile_image_url>http://tp4.sinaimg.cn/1854835127/50/0/1</profile_image_url> | |
− | + | <domain/> | |
− | + | <gender>m</gender> | |
− | + | <followers_count>0</followers_count> | |
− | + | <friends_count>20</friends_count> | |
− | + | <statuses_count>2</statuses_count> | |
− | + | <favourites_count>0</favourites_count> | |
− | + | <created_at>Thu Nov 11 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> | |
− | + | </recipient> | |
− | + | </direct_message> | |
− | + | </direct_messages> | |
</pre> | </pre> | ||
− | {{ | + | ===JSON示例=== |
− | {{ | + | <pre> |
+ | [ | ||
+ | { | ||
+ | "sender_screen_name" : "siegetest", | ||
+ | "recipient_screen_name" : "siegetest2", | ||
+ | "text" : "yIKapZ", | ||
+ | "recipient" : | ||
+ | { | ||
+ | "name" : "siegetest2", | ||
+ | "domain" : "", | ||
+ | "geo_enabled" : true, | ||
+ | "followers_count" : 0, | ||
+ | "statuses_count" : 2, | ||
+ | "favourites_count" : 0, | ||
+ | "city" : "8", | ||
+ | "description" : "", | ||
+ | "verified" : false, | ||
+ | "id" : 1854835127, | ||
+ | "gender" : "m", | ||
+ | "friends_count" : 20, | ||
+ | "screen_name" : "siegetest2", | ||
+ | "allow_all_act_msg" : false, | ||
+ | "following" : false, | ||
+ | "url" : "", | ||
+ | "profile_image_url" : "http://tp4.sinaimg.cn/1854835127/50/0/1", | ||
+ | "created_at" : "Thu Nov 11 00:00:00 +0800 2010", | ||
+ | "province" : "11", | ||
+ | "location" : "北京 海淀区" | ||
+ | }, | ||
+ | "sender" : | ||
+ | { | ||
+ | "name" : "siegetest", | ||
+ | "domain" : "", | ||
+ | "geo_enabled" : true, | ||
+ | "followers_count" : 2, | ||
+ | "statuses_count" : 18, | ||
+ | "favourites_count" : 0, | ||
+ | "city" : "8", | ||
+ | "description" : "ABCDE", | ||
+ | "verified" : false, | ||
+ | "id" : 1854740027, | ||
+ | "gender" : "m", | ||
+ | "friends_count" : 20, | ||
+ | "screen_name" : "siegetest", | ||
+ | "allow_all_act_msg" : false, | ||
+ | "following" : false, | ||
+ | "url" : "", | ||
+ | "profile_image_url" : "http://tp4.sinaimg.cn/1854740027/50/1291272213/1", | ||
+ | "created_at" : "Thu Nov 11 00:00:00 +0800 2010", | ||
+ | "province" : "11", | ||
+ | "location" : "北京 海淀区" | ||
+ | }, | ||
+ | "sender_id" : 1854740027, | ||
+ | "recipient_id" : 1854835127, | ||
+ | "id" : 630904557, | ||
+ | "created_at" : "Mon Nov 15 10:40:45 +0800 2010" | ||
+ | }, | ||
+ | { | ||
+ | "sender_screen_name" : "siegetest", | ||
+ | "recipient_screen_name" : "siegetest2", | ||
+ | "text" : "PGrTV6", | ||
+ | "recipient" : | ||
+ | { | ||
+ | "name" : "siegetest2", | ||
+ | "domain" : "", | ||
+ | "geo_enabled" : true, | ||
+ | "followers_count" : 0, | ||
+ | "statuses_count" : 2, | ||
+ | "favourites_count" : 0, | ||
+ | "city" : "8", | ||
+ | "description" : "", | ||
+ | "verified" : false, | ||
+ | "id" : 1854835127, | ||
+ | "gender" : "m", | ||
+ | "friends_count" : 20, | ||
+ | "screen_name" : "siegetest2", | ||
+ | "allow_all_act_msg" : false, | ||
+ | "following" : false, | ||
+ | "url" : "", | ||
+ | "profile_image_url" : "http://tp4.sinaimg.cn/1854835127/50/0/1", | ||
+ | "created_at" : "Thu Nov 11 00:00:00 +0800 2010", | ||
+ | "province" : "11", | ||
+ | "location" : "北京 海淀区" | ||
+ | }, | ||
+ | "sender" : | ||
+ | { | ||
+ | "name" : "siegetest", | ||
+ | "domain" : "", | ||
+ | "geo_enabled" : true, | ||
+ | "followers_count" : 2, | ||
+ | "statuses_count" : 18, | ||
+ | "favourites_count" : 0, | ||
+ | "city" : "8", | ||
+ | "description" : "ABCDE", | ||
+ | "verified" : false, | ||
+ | "id" : 1854740027, | ||
+ | "gender" : "m", | ||
+ | "friends_count" : 20, | ||
+ | "screen_name" : "siegetest", | ||
+ | "allow_all_act_msg" : false, | ||
+ | "following" : false, | ||
+ | "url" : "", | ||
+ | "profile_image_url" : "http://tp4.sinaimg.cn/1854740027/50/1291272213/1", | ||
+ | "created_at" : "Thu Nov 11 00:00:00 +0800 2010", | ||
+ | "province" : "11", | ||
+ | "location" : "北京 海淀区" | ||
+ | }, | ||
+ | "sender_id" : 1854740027, | ||
+ | "recipient_id" : 1854835127, | ||
+ | "id" : 620438135, | ||
+ | "created_at" : "Fri Nov 12 19:07:04 +0800 2010" | ||
+ | } | ||
+ | ] | ||
+ | </pre>| | ||
+ | useAge= | ||
+ | * 如果提供的多个私信ID中只有一部分为有效的私信ID,则系统只删除这些有效的私信,并将被删除的这些私信以XML或者JSON格式返回。 | ||
+ | * 如果提供的多个私信ID均无效,则返回空结果集。对于XML格式,表现为一个封闭的<pre><direct_messages/></pre>标签,而对于JSON格式,则表现为一个空数组<pre>[]</pre>| | ||
+ | otherInfo=无 | ||
+ | }} |
2010年12月6日 (一) 14:11的版本
目录 |
direct_messages/destroy_batch
批量删除当前登录用户的私信。
URL
http://api.t.sina.com.cn/direct_messages/destroy_batch.(json%7Cxml)
支持格式
XML/JSON
HTTP请求方式
POST/DELETE
是否需要登录
true
关于授权机制,参见授权机制声明
请求数限制
true
关于请求数限制,参见接口访问权限说明
请求参数
必选 | 类型及范围 | 说明 | |
---|---|---|---|
source | true | string | 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数) |
ids | true | int64 | 想要删除私信的id,多个id之间用半角逗号分割,每次提交系统最多能接受20个私信ID。 |
注意事项
- 如果提供的多个私信ID中只有一部分为有效的私信ID,则系统只删除这些有效的私信,并将被删除的这些私信以XML或者JSON格式返回。
- 如果提供的多个私信ID均无效,则返回空结果集。对于XML格式,表现为一个封闭的
<direct_messages/>
标签,而对于JSON格式,则表现为一个空数组[]
返回结果
XML示例
<?xml version="1.0" encoding="UTF-8"?> <direct_messages> <direct_message> <created_at>Mon Dec 06 11:38:44 +0800 2010</created_at> <id>722792861</id> <text>wahaha</text> <sender_id>1854740027</sender_id> <recipient_id>1854835127</recipient_id> <sender_screen_name>siegetest</sender_screen_name> <recipient_screen_name>siegetest2</recipient_screen_name> <sender> <id>1854740027</id> <screen_name>siegetest</screen_name> <name>siegetest</name> <province>11</province> <city>8</city> <location>北京 海淀区</location> <description>ABCDE</description> <url/> <profile_image_url>http://tp4.sinaimg.cn/1854740027/50/1291272213/1</profile_image_url> <domain/> <gender>m</gender> <followers_count>2</followers_count> <friends_count>20</friends_count> <statuses_count>18</statuses_count> <favourites_count>0</favourites_count> <created_at>Thu Nov 11 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> </sender> <recipient> <id>1854835127</id> <screen_name>siegetest2</screen_name> <name>siegetest2</name> <province>11</province> <city>8</city> <location>北京 海淀区</location> <description/> <url/> <profile_image_url>http://tp4.sinaimg.cn/1854835127/50/0/1</profile_image_url> <domain/> <gender>m</gender> <followers_count>0</followers_count> <friends_count>20</friends_count> <statuses_count>2</statuses_count> <favourites_count>0</favourites_count> <created_at>Thu Nov 11 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> </recipient> </direct_message> <direct_message> <created_at>Mon Nov 15 10:43:48 +0800 2010</created_at> <id>630916457</id> <text>yl7sN</text> <sender_id>1854740027</sender_id> <recipient_id>1854835127</recipient_id> <sender_screen_name>siegetest</sender_screen_name> <recipient_screen_name>siegetest2</recipient_screen_name> <sender> <id>1854740027</id> <screen_name>siegetest</screen_name> <name>siegetest</name> <province>11</province> <city>8</city> <location>北京 海淀区</location> <description>ABCDE</description> <url/> <profile_image_url>http://tp4.sinaimg.cn/1854740027/50/1291272213/1</profile_image_url> <domain/> <gender>m</gender> <followers_count>2</followers_count> <friends_count>20</friends_count> <statuses_count>18</statuses_count> <favourites_count>0</favourites_count> <created_at>Thu Nov 11 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> </sender> <recipient> <id>1854835127</id> <screen_name>siegetest2</screen_name> <name>siegetest2</name> <province>11</province> <city>8</city> <location>北京 海淀区</location> <description/> <url/> <profile_image_url>http://tp4.sinaimg.cn/1854835127/50/0/1</profile_image_url> <domain/> <gender>m</gender> <followers_count>0</followers_count> <friends_count>20</friends_count> <statuses_count>2</statuses_count> <favourites_count>0</favourites_count> <created_at>Thu Nov 11 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> </recipient> </direct_message> </direct_messages>
JSON示例
[ { "sender_screen_name" : "siegetest", "recipient_screen_name" : "siegetest2", "text" : "yIKapZ", "recipient" : { "name" : "siegetest2", "domain" : "", "geo_enabled" : true, "followers_count" : 0, "statuses_count" : 2, "favourites_count" : 0, "city" : "8", "description" : "", "verified" : false, "id" : 1854835127, "gender" : "m", "friends_count" : 20, "screen_name" : "siegetest2", "allow_all_act_msg" : false, "following" : false, "url" : "", "profile_image_url" : "http://tp4.sinaimg.cn/1854835127/50/0/1", "created_at" : "Thu Nov 11 00:00:00 +0800 2010", "province" : "11", "location" : "北京 海淀区" }, "sender" : { "name" : "siegetest", "domain" : "", "geo_enabled" : true, "followers_count" : 2, "statuses_count" : 18, "favourites_count" : 0, "city" : "8", "description" : "ABCDE", "verified" : false, "id" : 1854740027, "gender" : "m", "friends_count" : 20, "screen_name" : "siegetest", "allow_all_act_msg" : false, "following" : false, "url" : "", "profile_image_url" : "http://tp4.sinaimg.cn/1854740027/50/1291272213/1", "created_at" : "Thu Nov 11 00:00:00 +0800 2010", "province" : "11", "location" : "北京 海淀区" }, "sender_id" : 1854740027, "recipient_id" : 1854835127, "id" : 630904557, "created_at" : "Mon Nov 15 10:40:45 +0800 2010" }, { "sender_screen_name" : "siegetest", "recipient_screen_name" : "siegetest2", "text" : "PGrTV6", "recipient" : { "name" : "siegetest2", "domain" : "", "geo_enabled" : true, "followers_count" : 0, "statuses_count" : 2, "favourites_count" : 0, "city" : "8", "description" : "", "verified" : false, "id" : 1854835127, "gender" : "m", "friends_count" : 20, "screen_name" : "siegetest2", "allow_all_act_msg" : false, "following" : false, "url" : "", "profile_image_url" : "http://tp4.sinaimg.cn/1854835127/50/0/1", "created_at" : "Thu Nov 11 00:00:00 +0800 2010", "province" : "11", "location" : "北京 海淀区" }, "sender" : { "name" : "siegetest", "domain" : "", "geo_enabled" : true, "followers_count" : 2, "statuses_count" : 18, "favourites_count" : 0, "city" : "8", "description" : "ABCDE", "verified" : false, "id" : 1854740027, "gender" : "m", "friends_count" : 20, "screen_name" : "siegetest", "allow_all_act_msg" : false, "following" : false, "url" : "", "profile_image_url" : "http://tp4.sinaimg.cn/1854740027/50/1291272213/1", "created_at" : "Thu Nov 11 00:00:00 +0800 2010", "province" : "11", "location" : "北京 海淀区" }, "sender_id" : 1854740027, "recipient_id" : 1854835127, "id" : 620438135, "created_at" : "Fri Nov 12 19:07:04 +0800 2010" } ]
其他
无