Emotions

跳转到: 导航, 搜索
(字段说明)
(字段说明)
第71行: 第71行:
 
</pre>
 
</pre>
 
===字段说明===
 
===字段说明===
{|  
+
{| cellpadding="20" cellspacing="0"
 
!字段名
 
!字段名
 
!描述
 
!描述

2010年9月1日 (三) 15:23的版本

目录

favorites

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

URL

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

格式

xml, json

HTTP请求方式

GET

是否需要登录

true

请求数限制

true

请求参数

返回结果

XML示例

<?xml version="1.0" encoding="UTF-8"?>
	<emotions>
		<emtion>
			<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>
		<emtion>
			<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 表情分类

使用示例

  • 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