Blocks/create
(→使用示例:) |
|||
第30行: | 第30行: | ||
===返回结果: === | ===返回结果: === | ||
XML : | XML : | ||
− | + | <pre> | |
− | <id> | + | <?xml version="1.0" encoding="UTF-8"?> |
− | <screen_name> | + | <user> |
− | <name> | + | <id>1833448730</id> |
+ | <screen_name>LoopF1</screen_name> | ||
+ | <name>LoopF1</name> | ||
<province>11</province> | <province>11</province> | ||
− | <city> | + | <city>8</city> |
− | <location>北京 | + | <location>北京 海淀区</location> |
− | <description | + | <description/> |
− | <url | + | <url/> |
− | <profile_image_url>http:// | + | <profile_image_url>http://tp3.sinaimg.cn/1833448730/50/0/1</profile_image_url> |
− | <domain | + | <domain/> |
− | <gender> | + | <gender>m</gender> |
− | <followers_count> | + | <followers_count>0</followers_count> |
− | <friends_count> | + | <friends_count>0</friends_count> |
− | <statuses_count> | + | <statuses_count>0</statuses_count> |
− | <favourites_count> | + | <favourites_count>0</favourites_count> |
− | <created_at> | + | <created_at>Tue Sep 28 00:00:00 +0800 2010</created_at> |
<following>false</following> | <following>false</following> | ||
− | <verified> | + | <verified>false</verified> |
<allow_all_act_msg>false</allow_all_act_msg> | <allow_all_act_msg>false</allow_all_act_msg> | ||
<geo_enabled>true</geo_enabled> | <geo_enabled>true</geo_enabled> | ||
− | + | </user> | |
− | + | </pre> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
JSON: | JSON: | ||
− | + | <pre> | |
− | + | { | |
− | " | + | "name" : "LoopF1", |
− | + | "domain" : "", | |
− | + | "geo_enabled" : true, | |
− | + | "followers_count" : 0, | |
− | "domain": " | + | "statuses_count" : 0, |
− | " | + | "favourites_count" : 0, |
− | "followers_count": | + | "city" : "8", |
− | " | + | "description" : "", |
− | " | + | "verified" : false, |
− | " | + | "id" : 1833448730, |
− | " | + | "gender" : "m", |
− | + | "friends_count" : 0, | |
− | " | + | "screen_name" : "LoopF1", |
− | " | + | "allow_all_act_msg" : false, |
− | " | + | "following" : false, |
− | " | + | "url" : "", |
− | "screen_name": " | + | "profile_image_url" : "http://tp3.sinaimg.cn/1833448730/50/0/1", |
− | " | + | "created_at" : "Tue Sep 28 00:00:00 +0800 2010", |
− | + | "province" : "11", | |
− | + | "location" : "北京 海淀区" | |
− | + | } | |
− | + | </pre> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
=== 字段说明=== | === 字段说明=== | ||
第202行: | 第104行: | ||
* verified: 加V标示,是否微博认证用户 | * verified: 加V标示,是否微博认证用户 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===使用示例: === | ===使用示例: === |
2010年11月25日 (四) 15:21的版本
目录 |
blocks/create
将用户加入黑名单
URL:
http://api.t.sina.com.cn/blocks/create.format
格式:
xml, json
请求方式:
POST
是否需要身份验证:
true
请求数限制:
true
请求参数:
必选参数(至少选一个)
- user_id:要加入黑名单的用户ID。
o 示例: http://api.t.sina.com.cn/blocks/create.xml?user_id=1401881
- screen_name:要加入黑名单的用户微博昵称,可选。
o 示例: http://api.t.sina.com.cn/blocks/create.xml?screen_name=101010
使用说明
user_id或screen_name若不存在返回400
返回结果:
XML :
<?xml version="1.0" encoding="UTF-8"?> <user> <id>1833448730</id> <screen_name>LoopF1</screen_name> <name>LoopF1</name> <province>11</province> <city>8</city> <location>北京 海淀区</location> <description/> <url/> <profile_image_url>http://tp3.sinaimg.cn/1833448730/50/0/1</profile_image_url> <domain/> <gender>m</gender> <followers_count>0</followers_count> <friends_count>0</friends_count> <statuses_count>0</statuses_count> <favourites_count>0</favourites_count> <created_at>Tue Sep 28 00:00:00 +0800 2010</created_at> <following>false</following> <verified>false</verified> <allow_all_act_msg>false</allow_all_act_msg> <geo_enabled>true</geo_enabled> </user>
JSON:
{ "name" : "LoopF1", "domain" : "", "geo_enabled" : true, "followers_count" : 0, "statuses_count" : 0, "favourites_count" : 0, "city" : "8", "description" : "", "verified" : false, "id" : 1833448730, "gender" : "m", "friends_count" : 0, "screen_name" : "LoopF1", "allow_all_act_msg" : false, "following" : false, "url" : "", "profile_image_url" : "http://tp3.sinaimg.cn/1833448730/50/0/1", "created_at" : "Tue Sep 28 00:00:00 +0800 2010", "province" : "11", "location" : "北京 海淀区" }
字段说明
user
- id: 用户UID
- screen_name: 微博昵称
- name: 友好显示名称,如Bill Gates(此特性暂不支持)
- province: 省份编码(参考省份编码表)
- city: 城市编码(参考城市编码表)
- location:地址
- description: 个人描述
- url: 用户博客地址
- profile_image_url: 自定义图像
- domain: 用户个性化URL
- gender: 性别,m--男,f--女,n--未知
- followers_count: 粉丝数
- friends_count: 关注数
- statuses_count: 微博数
- favourites_count: 收藏数
- created_at: 创建时间
- following: 是否已关注(此特性暂不支持)
- verified: 加V标示,是否微博认证用户
使用示例:
json:
curl -u uid:password http://api.t.sina.com.cn/blocks/create.json -d "source=appkey&user_id=1234567"
xml:
curl -u uid:password http://api.t.sina.com.cn/blocks/create.xml -d "source=appkey&user_id=1234567"