Tags/create/en

跳转到: 导航, 搜索

目录

tags/create

Create a new tag for the authenticating user.

URL

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

Supported Formats

XML/JSON

HTTP Request Method

POST

Requires Authentication

true
See the Authorization Mechanism Statement for authorization details

Requests Count Limitation

true
See the Interface Access Rights Statement for the Request Count Limitaiton details.

Request Parameters

  Requires Type and Range Description
source true string AppKey for the application to identify it. ( This parameter is not needed when using OAuth)
tags true string A list of tag that will be created, these should be splited by semiangle comma.

Notes

  • It returns 400 error if tag is null.
  • Every tag has a 7 Chinese charaters/14 semiangle charaters length limitation.
  • Every user holds a a maximum of 10 tags, regardless of how many times API is called .

Example Request

XML
curl -u "username:password" -d "tags=CSDN,BLOGJAVA" "http://api.t.sina.com.cn/tags/create.xml?source=appkey"
JSON
curl -u "username:password" -d "tags=CSDN,BLOGJAVA" "http://api.t.sina.com.cn/tags/create.json?source=appkey"

Response

XML Example

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

JSON Example

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

Others

None

文档更新时间: 2011-01-21