C/2/datapush/comment

跳转到: 导航, 搜索
第1行: 第1行:
{{Api_desc_business_en|
+
{{Api_desc_business|
 
uri=datapush/comment|
 
uri=datapush/comment|
desc=Connect the API to get the comments.|
+
desc=调用该接口进行连接,接收评论数据。|
 
httpMethod=GET|
 
httpMethod=GET|
 
needAuth=False|
 
needAuth=False|
 
rateLimit=None|
 
rateLimit=None|
params={{api_args|subid|true|int|Subscription ID (See the [[specification ]] for more information).}}
+
params={{api_args|subid|true|int|订阅ID([[详情]])}}
{{api_args|since_id|false|long|The data ID application hold when disconnected. Weibo Platform will store datas for 5 minutes. Applications can regain datas within 5 minutes since disconnected by since_id parameter.}}
+
{{api_args|since_id|false|long|上次连接断开时的数据ID。保存断开后五分钟内的数据,可以通过since_id获取断开五分钟内的数据。}}
 
|
 
|
 
result=
 
result=
第43行: 第43行:
 
     }
 
     }
 
}</pre>|
 
}</pre>|
resultDes=None|
+
resultDes=|
useAge=*Use the url: http://180.149.153.40/datapush/comment or http://180.149.153.41/datapush/comment to call the API.The url: https://c.api.weibo.com/2/datapush/comment.json is invalid.
+
useAge=*请使用url: http://180.149.153.40/datapush/status 或 http://180.149.153.41/datapush/status 请求该接口。url: https://c.api.weibo.com/2/datapush/comment.json 暂不支持;
*The IP address to call the API must be one of the IP list provided when created the subscription. Otherwise, the error response ‘Ip is limited’ will be returned.
+
*请求该接口的IP必须在此订阅的IP白名单中,否则无法请求该接口;
*Parameter 'source' and 'access_token' are not needed to pass.  |
+
*该接口不需要登录认证,不需要传入source、access_token参数; |
otherInfo=None
+
otherInfo=
 
}}{{#a:showgrade}}
 
}}{{#a:showgrade}}

2013年10月14日 (一) 15:51的版本

datapush/comment

调用该接口进行连接,接收评论数据。

URL

https://c.api.weibo.com/2/datapush/comment.json

支持格式

JSON

HTTP请求方式

GET

是否需要登录

False
关于登录授权,参见 如何登录授权

访问授权限制

None

请求参数

  必选 类型及范围 说明
source false string 采用OAuth授权方式不需要此参数,其他授权方式为必填参数,数值为应用的AppKey。
access_token false string 采用OAuth授权方式为必填参数,其他授权方式不需要此参数,OAuth授权后获得。
subid true int 订阅ID(详情)。
since_id false long 上次连接断开时的数据ID。保存断开后五分钟内的数据,可以通过since_id获取断开五分钟内的数据。

注意事项

返回结果

JSON示例

{
    "id": 1211220000000161,
    "text": {
        "type": "comment",
        "event": "add",
        "comment": {
            "created_at": "Thu Nov 22 14:23:10 +0800 2012",
            "id": 3515170380984186,
            "text": "给力",
            "source": "<a href=\"http://m.weibo.com/web/cellphone.php#mobile\" rel=\"nofollow\">新浪微博手机版</a>",
            "user": {
                
            },
            "mid": "21212112243860601",
            "status": {
                "created_at": "Thu Nov 22 13:53:48 +0800 2012",
                "id": 3515162990652902,
                "text": "本期《音乐新势力》歌曲抢先听: 孙悦《为幸福歌唱》 羽泉《在一起》 王心凌《任性情人》 SHE《心还是热的》 光良《我们的故事》 何洁《Lady Luck》 孙楠《原谅》等。共同期待~~记得准时守候聆听吧。",
                "source": "<a href=\"http://se.360.cn/?fromweibo\" rel=\"nofollow\">360安全浏览器</a>",
                "favorited": false,
                "truncated": false,
                "in_reply_to_status_id": "",
                "in_reply_to_user_id": "",
                "in_reply_to_screen_name": "",
                "geo": null,
                "mid": "3515162990652902",
                "user": {
                    …
                }
            }
        }
    }
}

关于错误返回值与错误代码,参见 错误代码说明

字段说明

其他



Language: [[{{{2/uri}}}|中文]]


api评价