Blocks/create/en
Contents |
blocks/create
Add a user to the authenticating user’s blocking list.
URL
http://api.t.sina.com.cn/blocks/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) |
user_id | true | int64 | User id to be added to blocking list. |
screen_name | false | string | Screen-name of the user to be added to blocking list. |
Notes
It returns 400 error, if both of user_id and screen name are not provided.
Example Request
- XML
- curl -u "username:password" -d "user_id=12345" "http://api.t.sina.com.cn/blocks/create.xml?source=appkey"
- JSON
- curl -u "username:password" -d "user_id=12345" "http://api.t.sina.com.cn/blocks/create.json?source=appkey"
Response
XML Example
<?xml version="1.0" encoding="UTF-8"?> <user> <id>12345</id> <screen_name>a12bcdc_h8f</screen_name> <name>a12bcdc_h8f</name> <province>0</province> <city>0</city> <location/> <description/> <url/> <profile_image_url>http://tp2.sinaimg.cn/12345/50/0/0</profile_image_url> <domain/> <gender>f</gender> <followers_count>2</followers_count> <friends_count>0</friends_count> <statuses_count>0</statuses_count> <favourites_count>0</favourites_count> <created_at>Tue Dec 15 00:00:00 +0800 2009</created_at> <following>false</following> <verified>false</verified> <allow_all_act_msg>false</allow_all_act_msg> <geo_enabled>true</geo_enabled> </user>
JSON Example
{ "name" : "a12bcdc_h8f", "domain" : "", "geo_enabled" : true, "followers_count" : 2, "statuses_count" : 0, "favourites_count" : 0, "city" : "0", "description" : "", "verified" : false, "id" : 12345, "gender" : "f", "friends_count" : 0, "screen_name" : "a12bcdc_h8f", "allow_all_act_msg" : false, "following" : false, "url" : "", "profile_image_url" : "http://tp2.sinaimg.cn/12345/50/0/0", "created_at" : "Tue Dec 15 00:00:00 +0800 2009", "province" : "0", "location" : "" }
Field Description - user
- id: User ID
- screen_name: User’s nickname displayed on the home page
- name: Friendly displayed name, the same as screen_name
- province: Province code ( see Province and city code table)
- city: City code ( see Province and city code table)
- location:Address
- description: Personal description
- url: Url of the user’s blog
- profile_image_url: Profile image
- domain: The user’s personalized weibo url
- gender: Gender, m—male, f- - female, n-- unknown
- followers_count: Followers count
- friends_count: Following count
- statuses_count: Weibo count
- favourites_count: Favorites count
- created_at: Created time
- following: Whether the current user is following the user that posts the weibo (Not supported yet)
- verified: Whether the user is verified by his real identity, marked with “V”
Others
None
文档更新时间: 21 January 2011