Tags/create

跳转到: 导航, 搜索
第1行: 第1行:
==tags/create==
+
{{api_desc2|
添加用户标签
+
uri=tags/create|
 
+
desc=为当前登录用户添加新的用户标签|
===URL===
+
format=XML/JSON|
http://api.t.sina.com.cn/tags/create.format
+
httpMethod=POST|
+
needAuth=true|
===格式===
+
rateLimit=true|
xml, json
+
params={{api_args|tags|true|string|要创建的一组标签,用半角逗号隔开。}}|
+
getParam=&user_id=1679271303|
===HTTP请求方式===
+
postParam=|
POST
+
result=
+
===XML示例===
===是否需要登录:===
+
<pre>
true
+
<?xml version="1.0" encoding="UTF-8"?>
+
<tagids>
===请求数限制===
+
<tagid>201007310000010174</tagid>
true
+
<tagid>201007310000010184</tagid>
 
+
</tagids>
===请求参数===
+
</pre>
* tags: 标签,必填参数,多个标签之间用逗号间隔
+
===JSON示例===
* 示例: http://api.t.sina.com.cn/tags/create.xml?source=0000000&tags=abc,drf,efgh,tt
+
<pre>
 
+
[
===返回结果===
+
    {
Xml示例:
+
        "tagid" : "221012070001844788"
 
+
    },
<?xml version="1.0" encoding="UTF-8"?>
+
    {
<tagids>
+
        "tagid" : "221012070001844579"
<tagid>201007310000010174</tagid>
+
    },
<tagid>201007310000010184</tagid>
+
    {
</tagids>
+
        "tagid" : "221012070001848683"
 
+
    }
Json示例:
+
]
 
+
</pre>|
[{"tagid":"201007310000010194"},{"tagid":"201007310000010184"}]
+
useAge=
 
+
* 若tags参数为空,则返回400错误。|
=== 使用示例 ===
+
otherInfo=
* xml:
+
}}
* curl -u xxx:xxxx http://api.t.sina.com.cn/tags/create.xml?source=0000000&tags=abc,drf,efgh,tt
+
* json:
+
* curl -u xxx:xxxx http://api.t.sina.com.cn/tags/create.json?source=0000000&tags=abc,drf,efgh,tt
+

2010年12月7日 (二) 11:43的版本

目录

tags/create

为当前登录用户添加新的用户标签

URL

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

支持格式

XML/JSON

HTTP请求方式

POST

是否需要登录

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

请求数限制

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

请求参数

  必选 类型及范围 说明
source true string 申请应用时分配的AppKey,调用接口时候代表应用的唯一身份。(采用OAuth授权方式不需要此参数)
tags true string 要创建的一组标签,用半角逗号隔开。

注意事项

  • 若tags参数为空,则返回400错误。

返回结果

XML示例

<?xml version="1.0" encoding="UTF-8"?>
<tagids>
	<tagid>201007310000010174</tagid>
	<tagid>201007310000010184</tagid>
</tagids>

JSON示例

[
    {
        "tagid" : "221012070001844788"
    },
    {
        "tagid" : "221012070001844579"
    },
    {
        "tagid" : "221012070001848683"
    }
]

其他