Trends

跳转到: 导航, 搜索

目录

{{{uri}}}

{{{desc}}}

URL

http://api.t.sina.com.cn/{{{uri}}}.({{{format}}})

支持格式

{{{format}}}

HTTP请求方式

{{{httpMethod}}}

是否需要登录

{{{needAuth}}}
关于授权机制,参见授权机制声明

请求数限制

{{{rateLimit}}}
关于请求数限制,参见接口访问权限说明

请求参数

  必选 类型及范围 说明
source true string 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数)

{{{params}}}

调用示例

{{{format}}}
curl -u "username:password" {{{postParam}}} "http://api.t.sina.com.cn/{{{uri}}}.{{{format}}}?source=appkey{{{getParam}}}"

注意事项

{{{useAge}}}

返回结果

{{{result}}}

其他

{{{otherInfo}}}

URL

http://api.t.sina.com.cn/trends.format

格式

xml, json

HTTP请求方式

GET

是否需要身份验证

True

请求数限制

true

请求参数

返回结果

XML示例:

<?xml version="1.0" encoding="UTF-8"?>
<trends>
<trend>
<trend_id>null</trend_id>
<hotword>ddddsss</hotword>
<num>1</num>
</trend>
<trend>
<trend_id>null</trend_id>
<hotword>dddd</hotword>
<num>14881</num>
</trend>
</trends>

JSON示例:

 [{"num":"1","trend_id":"876637","hotword":"ddddsss"},{"num":"14881","trend_id":"876636","hotword":"dddd"}]

使用示例

  • xml:

curl -u uid:password http://api.t.sina.com.cn/trends.xml -d "source=appkey&user_id=12345678&page=1&count=10"

  • json:

curl -u uid:password http://api.t.sina.com.cn/trends.json -d "source=appkey&user_id=12345678&page=1&count=10"