Statuses/comments to me

跳转到: 导航, 搜索
(Response)
(Response)
第108行: 第108行:
 
     </status>
 
     </status>
 
   </comment>
 
   </comment>
 
 
  ... truncated ...
 
  ... truncated ...
 
  </comments>
 
  </comments>
 +
json:
 +
[
 +
{
 +
        "created_at": "Fri Oct 22 15:51:39 +0800 2010",
 +
        "id": 3991227,
 +
        "status": {
 +
            "created_at": "Fri Oct 22 15:48:27 +0800 2010",
 +
            "favorited": false,
 +
            "geo": null,
 +
            "id": 32121533,
 +
            "in_reply_to_screen_name": "",
 +
            "in_reply_to_status_id": "",
 +
            "in_reply_to_user_id": "",
 +
            "source": "<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微薄</a>",
 +
            "text": "test",
 +
            "truncated": false,
 +
            "user": {
 +
                "allow_all_act_msg": true,
 +
                "city": "8",
 +
                "created_at": "Tue Sep 21 00:00:00 +0800 2010",
 +
                "description": "",
 +
                "domain": "liangwenhhong",
 +
                "favourites_count": 3,
 +
                "followers_count": 15,
 +
                "following": false,
 +
                "friends_count": 36,
 +
                "gender": "f",
 +
                "geo_enabled": true,
 +
                "id": 1822257145,
 +
                "location": "北京",
 +
                "name": "wh_liang",
 +
                "profile_image_url": "http://tp2.sinaimg.cn/18222575/50/12854265",
 +
                "province": "11",
 +
                "screen_name": "wh_liang",
 +
                "statuses_count": 22,
 +
                "url": "http://1",
 +
                "verified": false
 +
            }
 +
        },
 +
        "text": "same",
 +
        "user": {
 +
            "allow_all_act_msg": false,
 +
            "city": "1000",
 +
            "created_at": "Tue Aug 31 00:00:00 +0800 2010",
 +
            "description": "",
 +
            "domain": "",
 +
            "favourites_count": 0,
 +
            "followers_count": 1,
 +
            "following": false,
 +
            "friends_count": 17,
 +
            "gender": "f",
 +
            "geo_enabled": true,
 +
            "id": 1239488010,
 +
            "location": "北京",
 +
            "name": "娃娃鱼",
 +
            "profile_image_url": "http://tp3.sinaimg.cn/1239488010/50/0",
 +
            "province": "11",
 +
            "screen_name": "娃娃鱼",
 +
            "status": {
 +
                "created_at": "Thu Oct 14 16:58:36 +0800 2010",
 +
                "favorited": false,
 +
                "geo": null,
 +
                "id": 3083697633,
 +
                "in_reply_to_screen_name": "",
 +
                "in_reply_to_status_id": "",
 +
                "in_reply_to_user_id": "",
 +
                "source": "<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微薄</a>",
 +
                "text": "@\u665a\u4e0a\u5403\u4ec0\u4e48",
 +
                "truncated": false
 +
            },
 +
            "statuses_count": 1,
 +
            "url": "http://blog.sina.com.cn/wawaandzhuzhu",
 +
            "verified": false
 +
        }
 +
    }
 +
...
 +
]
  
 
===使用示例===
 
===使用示例===
 
cURL:
 
cURL:
 
curl -u user:password http://api.t.sina.com.cn/statuses/comments_to_me.xml
 
curl -u user:password http://api.t.sina.com.cn/statuses/comments_to_me.xml

2010年10月22日 (五) 16:04的版本

目录

statuses/comments_to_me

收到的评论

URL

http://api.t.sina.com.cn/statuses/comments_to_me.format

格式

xml, json

HTTP请求方式

GET

是否需要登录

true

请求数限制

true

参数

  • since_id. 可选参数 评论ID. 返回ID比数值since_id大(比since_id时间晚的)的评论。

o Example: http://api.t.sina.com.cn/statuses/coments_to_me.xml?since_id=12345

  • max_id. 可选参数 评论ID. 返回ID不大于max_id(时间不晚于max_id)的评论。

o Example: http://api.t.sina.com.cn/statuses/coments_to_me.xml?max_id=54321

  • count. 可选参数. 每次返回的最大记录数(即页面大小),最多返回200条,默认为20。

o Example: http://api.t.sina.com.cn/statuses/coments_timeline.xml?count=200

  • page. 可选参数. 返回结果的页序号。注意:有分页限制。

o Example: http://api.t.sina.com.cn/statuses/coments_timeline.xml?page=3

Response

XML示例:

<?xml version="1.0" encoding="UTF-8"?>
<comments>
 <comment>
   <created_at>Fri Oct 22 15:51:39 +0800 2010</created_at>
   <id>3991227041</id>
   <text>same</text>
   <user>
     <id>1239488010</id>
     <screen_name>勤奋的娃娃鱼</screen_name>
     <name>勤奋的娃娃鱼</name>
     <province>11</province>
     <city>1000</city>
     <location>北京</location>
     <description/>
     <url>http://blog.sina.com.cn/wawaandzhuzhu</url>
     <profile_image_url>http://tp3.sinaimg.cn/1239488010/50/0</profile_image_url>
     <domain/>
     <gender>f</gender>
     <followers_count>1</followers_count>
     <friends_count>17</friends_count>
     <statuses_count>1</statuses_count>
     <favourites_count>0</favourites_count>
     <created_at>Tue Aug 31 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>
     <status>
       <created_at>Thu Oct 14 16:58:36 +0800 2010</created_at>
       <id>3083697633</id>
       <text>@晚上吃什么</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/>
     </status>
   </user>
   <status>
     <created_at>Fri Oct 22 15:48:27 +0800 2010</created_at>
     <id>3212150133</id>
     <text>test</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>18222545</id>
       <screen_name>wh_liang</screen_name>
       <name>wh_liang</name>
       <province>11</province>
       <city>8</city>
       <location>北京 海淀区</location>
       <description/>
       <url>http://1</url>
       <profile_image_url>http://tp2.sinaimg.cn/18222545/50/12854265</profile_image_url>
       <domain>liangwenhhong</domain>
       <gender>f</gender>
       <followers_count>15</followers_count>
       <friends_count>36</friends_count>
       <statuses_count>22</statuses_count>
       <favourites_count>3</favourites_count>
       <created_at>Tue Sep 21 00:00:00 +0800 2010</created_at>
       <following>false</following>
       <verified>false</verified>
       <allow_all_act_msg>true</allow_all_act_msg>
       <geo_enabled>true</geo_enabled>
     </user>
   </status>
 </comment>
... truncated ...
</comments>

json: [

{
       "created_at": "Fri Oct 22 15:51:39 +0800 2010", 
       "id": 3991227, 
       "status": {
           "created_at": "Fri Oct 22 15:48:27 +0800 2010", 
           "favorited": false, 
           "geo": null, 
           "id": 32121533, 
           "in_reply_to_screen_name": "", 
           "in_reply_to_status_id": "", 
           "in_reply_to_user_id": "", 
           "source": "<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微薄</a>", 
           "text": "test", 
           "truncated": false, 
           "user": {
               "allow_all_act_msg": true, 
               "city": "8", 
               "created_at": "Tue Sep 21 00:00:00 +0800 2010", 
               "description": "", 
               "domain": "liangwenhhong", 
               "favourites_count": 3, 
               "followers_count": 15, 
               "following": false, 
               "friends_count": 36, 
               "gender": "f", 
               "geo_enabled": true, 
               "id": 1822257145, 
               "location": "北京", 
               "name": "wh_liang", 
               "profile_image_url": "http://tp2.sinaimg.cn/18222575/50/12854265", 
               "province": "11", 
               "screen_name": "wh_liang", 
               "statuses_count": 22, 
               "url": "http://1", 
               "verified": false
           }
       }, 
       "text": "same", 
       "user": {
           "allow_all_act_msg": false, 
           "city": "1000", 
           "created_at": "Tue Aug 31 00:00:00 +0800 2010", 
           "description": "", 
           "domain": "", 
           "favourites_count": 0, 
           "followers_count": 1, 
           "following": false, 
           "friends_count": 17, 
           "gender": "f", 
           "geo_enabled": true, 
           "id": 1239488010, 
           "location": "北京", 
           "name": "娃娃鱼", 
           "profile_image_url": "http://tp3.sinaimg.cn/1239488010/50/0", 
           "province": "11", 
           "screen_name": "娃娃鱼", 
           "status": {
               "created_at": "Thu Oct 14 16:58:36 +0800 2010", 
               "favorited": false, 
               "geo": null, 
               "id": 3083697633, 
               "in_reply_to_screen_name": "", 
               "in_reply_to_status_id": "", 
               "in_reply_to_user_id": "", 
               "source": "<a href=\"http://t.sina.com.cn\" rel=\"nofollow\">新浪微薄</a>", 
               "text": "@\u665a\u4e0a\u5403\u4ec0\u4e48", 
               "truncated": false
           }, 
           "statuses_count": 1, 
           "url": "http://blog.sina.com.cn/wawaandzhuzhu", 
           "verified": false
       }
   }

... ]

使用示例

cURL: curl -u user:password http://api.t.sina.com.cn/statuses/comments_to_me.xml