用户自定义分组
(→查询所有分组) |
(→查询用户所在分组) |
||
第192行: | 第192行: | ||
URL:2/messages/custom_rule/getid.json | URL:2/messages/custom_rule/getid.json | ||
− | HTTP | + | HTTP 请求方式:GET |
</pre> | </pre> |
2014年6月13日 (五) 00:29的版本
目录 |
创建分组
一个第三方账号,最多支持创建?个分组。
接口调用请求说明:
URL:https://m.api.weibo.com/2/messages/custom_rule/create.json HTTP 请求方式:POST
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
access_token | true | string | 在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 获取粉丝服务平台开发接口的access token。 |
name | true | string | 分组名 |
POST数据: {"group":{"name":"test"}}
返回说明:
//成功返回 { "group": { "id": 123123123123, //分组id "name": "test" //分组名 } } //失败返回 { "request": "XXXX/messages/custom_rule/create", "errcode": "1000XX", "errmsg": "error message." }
删除自定义规则分组
接口调用请求说明:
URL:2/messages/custom_rule/delete.json HTTP 请求方式:POST 是否需要登录:是 授权限制:频次限制是
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
uid | true | long | 用户ID |
id | true | long | 要删除的组ID |
返回结果:
{ "errcode": 0, "errmsg": "ok" }
失败返回:
{ "request": "XXXX/messages/custom_rule/delete", "errcode": "1000XX", "errmsg": "error message." }
修改分组名
接口调用请求说明:
URL:2/messages/custom_rule/update.json HTTP 请求方式:POST
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
access_token | true | string | 在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 获取粉丝服务平台开发接口的access token。 |
id | true | long | 分组ID |
name | true | string | 分组名 |
返回结果:
{ "errcode": 0, "errmsg": "ok" }
失败返回:
{ "request": "XXXX/messages/custom_rule/update", "errcode": "1000XX", "errmsg": "error message." }
查询所有分组
接口调用请求说明:
URL:2/messages/custom_rule/get.json HTTP 请求方式:GET
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
access_token | true | string | 在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 获取粉丝服务平台开发接口的access token。 |
rule_type | false | int | 获取规则 定义;默认不传返回所有自定义分组;1只返回自动分组;2返回全部分组信息 |
返回结果:
{ "groups": [ { "id": 0, "name": "未分组", "count": 72596, "rule_type": 1 //0:私密自动规则;1:开放自动规则 }, { "id": 1, "name": "黑名单", "count": 36, "rule_type": 2 //2:自定义分组 } ] }
失败返回:
{ "request": "XXXX/messages/custom_rule/get", "errcode": "1000XX", "errmsg": "error message." }
查询用户所在分组
接口调用请求说明:
URL:2/messages/custom_rule/getid.json HTTP 请求方式:GET
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
access_token | true | string | 在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 获取粉丝服务平台开发接口的access token。 |
follower_id | true | long | 粉丝id |
返回结果:
{ "groupid": 123123123 }
失败返回:
{ "request": "XXXX/messages/custom_rule/getid", "errcode": "1000XX", "errmsg": "error message." }
移动用户分组
接口调用请求说明:
URL:2/messages/custom_rule/member/update.json HTTP 请求方式:POST
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
access_token | true | string | 在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 获取粉丝服务平台开发接口的access token。 |
follower_id | true | long | 粉丝id |
to_groupid | true | long | 分组id |
返回结果:
{ "errcode": 0, "errmsg": "ok" }
失败返回:
{ "request": "XXXX/messages/custom_rule/member/update", "errcode": "1000XX", "errmsg": "error message." }