Direct messages/destroy batch/en
Contents |
direct_messages/destroy_batch
Delete a batch of direct message of authenticating user.
URL
http://api.t.sina.com.cn/direct_messages/destroy_batch.(json%7Cxml)
Supported Formats
XML/JSON
HTTP Request Method
POST/DELETE
Requires Authentication
true
See the Authorization Mechanism Statement for authorization details
Requests Count Limitation
true
See the Interface Access Rights Statement for the Request Count Limitaiton details.
Request Parameters
Requires | Type and Range | Description | |
---|---|---|---|
source | true | string | AppKey for the application to identify it. ( This parameter is not needed when using OAuth) |
ids | true | int64 | ID of the direct messages to be deleted. Multi ids are separated by comma, the system can only accept 20 direct message at the most each submission. |
Notes
- If just part of the provided IDs are legal, system only deletes and returns these legal messages.
- It returns a null result if all of the ids aren’t legal. For XML format, it is a close tag:
<direct_messages/>, For JSON, it returns:
[]
Example Request
- XML
- curl -u "username:password" -d "ids=722792861,630916457" "http://api.t.sina.com.cn/direct_messages/destroy_batch.xml?source=appkey"
- JSON
- curl -u "username:password" -d "ids=722792861,630916457" "http://api.t.sina.com.cn/direct_messages/destroy_batch.json?source=appkey"
Response
XML Example
<?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 Example
[ { "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" } ]
Others
无
文档更新时间: 22 February 2011