(创建新页面为 '{{api_desc_v2| uri=friendships/groups/update| desc=更新好友分组| httpMethod=POST| needAuth=是| level={{Api_L2}}| rateLimit=是| params= {{api_args|list_id|true|int64|好…') |
|||
(未显示3个用户的4个中间版本) | |||
第7行: | 第7行: | ||
rateLimit=是| | rateLimit=是| | ||
params= | params= | ||
− | {{api_args|list_id|true|int64| | + | {{api_args|list_id|true|int64|需要更新的好友分组ID,建议使用返回值里的idstr,只能更新当前登录用户自己创建的分组。}} |
− | {{api_args|name| | + | {{api_args|name|false|string|好友分组更新后的名称,不超过8个汉字,16个半角字符。}} |
+ | {{api_args|description|false|string|好友分组更新后的描述,不超过70个汉字,140个半角字符。}} | ||
+ | {{api_args|tags|false|string|好友分组更新后的标签,多个之间用逗号分隔,最多不超过10个,每个不超过7个汉字,14个半角字符。}}| | ||
+ | apiToolPara=key1=list_id&value1=123456789&key2=name&value2=更新测试好友分组| | ||
+ | relat_qa=<html><div id="relat_qa" data="friendships/groups/update"></div></html>| | ||
result= | result= | ||
<pre> | <pre> | ||
{ | { | ||
− | "id": | + | "id": 3479299170943200, |
− | "idstr": " | + | "idstr": "3479299170943231", |
− | "name": " | + | "name": "分组更新", |
+ | "mode": "private", | ||
+ | "visible": 0, | ||
+ | "like_count": 0, | ||
+ | "member_count": 0, | ||
+ | "description": "分组描述更新", | ||
+ | "tags": [ | ||
+ | "标签1", | ||
+ | "标签2", | ||
+ | "哈哈" | ||
+ | ], | ||
+ | "profile_image_url": "http://tp2.sinaimg.cn/2489518277/50/5617069329/1", | ||
+ | "user": { | ||
+ | "id": 2489518277, | ||
+ | "idstr": "2489518277", | ||
+ | "screen_name": "虎贲Geek", | ||
+ | "name": "虎贲Geek", | ||
+ | "province": "11", | ||
+ | "city": "8", | ||
+ | "location": "北京 海淀区", | ||
+ | "description": "", | ||
+ | "url": "", | ||
+ | "profile_image_url": "http://tp2.sinaimg.cn/2489518277/50/5617069329/1", | ||
+ | "profile_url": "hubengeek", | ||
+ | "domain": "hubengeek", | ||
+ | "weihao": "", | ||
+ | "gender": "m", | ||
+ | "followers_count": 25, | ||
+ | "friends_count": 141, | ||
+ | "statuses_count": 22, | ||
+ | "favourites_count": 3, | ||
+ | "created_at": "Thu Nov 24 10:27:36 +0800 2011", | ||
+ | "following": false, | ||
+ | "allow_all_act_msg": false, | ||
+ | "geo_enabled": true, | ||
+ | "verified": false, | ||
+ | "verified_type": -1, | ||
+ | "allow_all_comment": true, | ||
+ | "avatar_large": "http://tp2.sinaimg.cn/2489518277/180/5617069329/1", | ||
+ | "verified_reason": "", | ||
+ | "follow_me": false, | ||
+ | "online_status": 0, | ||
+ | "bi_followers_count": 2, | ||
+ | "lang": "zh-cn" | ||
+ | }, | ||
+ | "created_at": "Wed Aug 15 14:43:47 +0800 2012" | ||
} | } | ||
</pre>| | </pre>| | ||
resultDes=无| | resultDes=无| | ||
useAge= | useAge= | ||
+ | *当前登录用户必须为好友分组的创建者; | ||
+ | *参数name、description、tags,至少需要传其中一个,否则接口报错; | ||
*重复的同名分组将给出错误; | *重复的同名分组将给出错误; | ||
*用户自己创建的分组,相互之间名称不能重复;| | *用户自己创建的分组,相互之间名称不能重复;| | ||
otherInfo=无 | otherInfo=无 | ||
}}{{#a:showgrade}} | }}{{#a:showgrade}} |
2012年11月15日 (四) 18:10的最后版本
friendships/groups/update
更新好友分组
URL
https://api.weibo.com/2/friendships/groups/update.json
支持格式
JSON
HTTP请求方式
POST
是否需要登录
是
关于登录授权,参见 如何登录授权
访问授权限制
访问级别:高级接口(需要授权)
频次限制:是
关于频次限制,参见 接口访问权限说明
请求参数
必选 | 类型及范围 | 说明 | |
---|---|---|---|
access_token | true | string | 采用OAuth授权方式为必填参数,OAuth授权后获得。 |
list_id | true | int64 | 需要更新的好友分组ID,建议使用返回值里的idstr,只能更新当前登录用户自己创建的分组。 |
name | false | string | 好友分组更新后的名称,不超过8个汉字,16个半角字符。 |
description | false | string | 好友分组更新后的描述,不超过70个汉字,140个半角字符。 |
tags | false | string | 好友分组更新后的标签,多个之间用逗号分隔,最多不超过10个,每个不超过7个汉字,14个半角字符。 |
注意事项
- 当前登录用户必须为好友分组的创建者;
- 参数name、description、tags,至少需要传其中一个,否则接口报错;
- 重复的同名分组将给出错误;
- 用户自己创建的分组,相互之间名称不能重复;
调用样例及调试工具
返回结果
JSON示例
{ "id": 3479299170943200, "idstr": "3479299170943231", "name": "分组更新", "mode": "private", "visible": 0, "like_count": 0, "member_count": 0, "description": "分组描述更新", "tags": [ "标签1", "标签2", "哈哈" ], "profile_image_url": "http://tp2.sinaimg.cn/2489518277/50/5617069329/1", "user": { "id": 2489518277, "idstr": "2489518277", "screen_name": "虎贲Geek", "name": "虎贲Geek", "province": "11", "city": "8", "location": "北京 海淀区", "description": "", "url": "", "profile_image_url": "http://tp2.sinaimg.cn/2489518277/50/5617069329/1", "profile_url": "hubengeek", "domain": "hubengeek", "weihao": "", "gender": "m", "followers_count": 25, "friends_count": 141, "statuses_count": 22, "favourites_count": 3, "created_at": "Thu Nov 24 10:27:36 +0800 2011", "following": false, "allow_all_act_msg": false, "geo_enabled": true, "verified": false, "verified_type": -1, "allow_all_comment": true, "avatar_large": "http://tp2.sinaimg.cn/2489518277/180/5617069329/1", "verified_reason": "", "follow_me": false, "online_status": 0, "bi_followers_count": 2, "lang": "zh-cn" }, "created_at": "Wed Aug 15 14:43:47 +0800 2012" }
关于错误返回值与错误代码,参见 错误代码说明
返回字段说明
无
其他
无
相关问题
到 帮助中心 查看更多问题或提问
文档更新时间: 2012-11-15