Emotions

跳转到: 导航, 搜索
(favorites)
 
(未显示3个用户的7个中间版本)
第1行: 第1行:
== Emotions ==
+
{{api_desc2|
返回新浪微博官方所有表情、魔法表情的相关信息。包括短语、表情类型、表情分类,是否热门等。
+
uri=emotions|
 
+
desc=返回新浪微博官方所有表情、魔法表情的相关信息。包括短语、表情类型、表情分类,是否热门等。|
=== URL===
+
format=XML/JSON|
http://api.t.sina.com.cn/emotions.format
+
httpMethod=GET|
+
needAuth=false|
=== 格式===
+
rateLimit=false|
xml, json
+
params={{api_args|type|false|string, 默认为"face"|表情类别。"face":普通表情,"ani":魔法表情,"cartoon":动漫表情}}
+
{{api_args|language|false|string, 默认为"cnname"|语言类别,"cnname"简体,"twname"繁体}}|
=== HTTP请求方式===
+
getParam=|
GET
+
postParam=|
+
result=
=== 是否需要登录===
+
===XML示例===
true
+
 
+
=== 请求数限制===
+
true
+
 
+
===请求参数===
+
*无
+
=== 返回结果===
+
====XML示例====
+
 
<pre>
 
<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
<emotions>
+
<emotions>
<emtion>
+
        <emotion>
<phrase>[嘻嘻]</phrase>
+
                <phrase>[嘻嘻]</phrase>
<type>image</type>
+
                <type>image</type>
<url>http://timg.sjs.sinajs.cn/miniblog2style/images/common/face/ext/normal/c2/tooth.gif</url>
+
                <url>http://timg.sjs.sinajs.cn/miniblog2style/images/common/face/ext/normal/c2/tooth.gif</url>
<is_hot>false</is_hot>
+
                <is_hot>false</is_hot>
<is_common>true</is_common>
+
                <is_common>true</is_common>
<order_number>96</order_number>\
+
                <order_number>96</order_number>\
<category>表情</category>
+
                <category>表情</category>
</emotion>
+
        </emotion>
<emtion>
+
        <emotion>
<phrase>[呵呵]</phrase>
+
                <phrase>[呵呵]</phrase>
<type>image</type>
+
                <type>image</type>
<url>http://timg.sjs.sinajs.cn/miniblog2style/images/common/face/ext/normal/eb/smile.gif</url>
+
                <url>http://timg.sjs.sinajs.cn/miniblog2style/images/common/face/ext/normal/eb/smile.gif</url>
<is_hot>false</is_hot>
+
                <is_hot>false</is_hot>
<is_common>true</is_common>
+
                <is_common>true</is_common>
<order_number>95</order_number>\
+
                <order_number>95</order_number>\
<category>表情</category>
+
                <category>表情</category>
</emotion>
+
        </emotion>
......
+
        ......
</emotions>
+
</emotions>
 
</pre>
 
</pre>
 
+
===JSON示例===
====json====
+
 
<pre>
 
<pre>
 
[
 
[
第70行: 第60行:
 
]
 
]
 
</pre>
 
</pre>
===字段说明===
+
{{Param emotions}}|
{|
+
useAge=无|
!字段名
+
otherInfo=无
!描述
+
}}
|-
+
|phrase
+
|表情使用的替代文字
+
|-
+
|type
+
|表情类型,image为普通图片表情,magic为魔法表情
+
|-
+
|url
+
|表情图片存放的位置
+
|-
+
|is_hot
+
|是否为热门表情
+
|-
+
|order_number
+
|该表情在系统中的排序号码
+
|-
+
|category
+
|表情分类
+
|}
+
 
+
=== 使用示例===
+
* xml:
+
curl -u "uid:password" http://api.t.sina.com.cn/emotions.xml
+
* json:
+
curl -u "uid:password" http://api.t.sina.com.cn/emotions.json
+

2012年9月24日 (一) 11:35的最后版本

目录

emotions

返回新浪微博官方所有表情、魔法表情的相关信息。包括短语、表情类型、表情分类,是否热门等。

URL

http://api.t.sina.com.cn/emotions.(json%7Cxml)

支持格式

XML/JSON

HTTP请求方式

GET

是否需要登录

false
关于授权机制,参见授权机制声明

请求数限制

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

请求参数

  必选 类型及范围 说明
source true string 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数)
type false string, 默认为"face" 表情类别。"face":普通表情,"ani":魔法表情,"cartoon":动漫表情
language false string, 默认为"cnname" 语言类别,"cnname"简体,"twname"繁体

注意事项

返回结果

XML示例

<?xml version="1.0" encoding="UTF-8"?>
<emotions>
        <emotion>
                <phrase>[嘻嘻]</phrase>
                <type>image</type>
                <url>http://timg.sjs.sinajs.cn/miniblog2style/images/common/face/ext/normal/c2/tooth.gif</url>
                <is_hot>false</is_hot>
                <is_common>true</is_common>
                <order_number>96</order_number>\
                <category>表情</category>
        </emotion>
        <emotion>
                <phrase>[呵呵]</phrase>
                <type>image</type>
                <url>http://timg.sjs.sinajs.cn/miniblog2style/images/common/face/ext/normal/eb/smile.gif</url>
                <is_hot>false</is_hot>
                <is_common>true</is_common>
                <order_number>95</order_number>\
                <category>表情</category>
        </emotion>
        ......
</emotions>

JSON示例

[
	{
		"phrase":"[嘻嘻]",
		"type":"image",
		"url":"http://timg.sjs.sinajs.cn/miniblog2style/images/common/face/ext/normal/c2/tooth.gif",
		"is_hot":false,
		"is_common":true,
		"order_number":96,
		"category":"表情"
	},
	{
		"phrase":"[呵呵]",
		"type":"image",
		"url":"http://timg.sjs.sinajs.cn/miniblog2style/images/common/face/ext/normal/eb/smile.gif",
		"is_hot":false,
		"is_common":true,
		"order_number":95,
		"category":"表情"
	},
	......
]

字段说明

字段名 描述
phrase 表情使用的替代文字
type 表情类型,image为普通图片表情,magic为魔法表情
url 表情图片存放的位置
is_hot 是否为热门表情
order_number 该表情在系统中的排序号码
category 表情分类

其他

文档更新时间: 2012-09-24