用户自定义分组
(→设置自定义规则分组) |
(→创建分组) |
||
(未显示2个用户的44个中间版本) | |||
第1行: | 第1行: | ||
− | = | + | =创建分组= |
+ | |||
+ | 一个第三方账号,最多支持创建500个分组。 | ||
'''接口调用请求说明:''' | '''接口调用请求说明:''' | ||
<pre> | <pre> | ||
− | + | URL:https://m.api.weibo.com/2/messages/custom_rule/create.json | |
HTTP 请求方式:POST | HTTP 请求方式:POST | ||
− | |||
− | |||
− | |||
</pre> | </pre> | ||
第16行: | 第15行: | ||
{| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | ||
|- | |- | ||
− | !width=" | + | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|参数 |
− | !width=" | + | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|必选 |
− | !width=" | + | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|类型及范围 |
− | !width=" | + | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|说明 |
− | {{api_args| | + | {{api_args|access_token|true|string|在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 [[Messages_api/access_token|获取粉丝服务平台开发接口的access token]]。}} |
{{api_args|name|true|string|分组名}} | {{api_args|name|true|string|分组名}} | ||
|} | |} | ||
+ | POST数据: | ||
+ | {"group":{"name":"test"}} | ||
− | ''' | + | |
+ | '''返回说明:''' | ||
<pre> | <pre> | ||
+ | //成功返回 | ||
{ | { | ||
"group": { | "group": { | ||
第32行: | 第35行: | ||
"name": "test" //分组名 | "name": "test" //分组名 | ||
} | } | ||
+ | } | ||
+ | |||
+ | //失败返回 | ||
+ | { | ||
+ | "request": "XXXX/messages/custom_rule/create", | ||
+ | "errcode": "1000XX", | ||
+ | "errmsg": "error message." | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | =删除自定义规则分组= | ||
+ | |||
+ | |||
+ | '''接口调用请求说明:''' | ||
+ | |||
+ | <pre> | ||
+ | URL:2/messages/custom_rule/delete.json | ||
+ | |||
+ | HTTP 请求方式:POST | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | ||
+ | |- | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|参数 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|必选 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|类型及范围 | ||
+ | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|说明 | ||
+ | {{api_args|access_token|true|string|在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 [[Messages_api/access_token|获取粉丝服务平台开发接口的access token]]。}} | ||
+ | {{api_args|id|true|long|要删除的组ID}} | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''返回结果:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "errcode": 0, | ||
+ | "errmsg": "ok" | ||
} | } | ||
</pre> | </pre> | ||
第39行: | 第81行: | ||
<pre> | <pre> | ||
{ | { | ||
− | "request": "XXXX/messages/custom_rule/ | + | "request": "XXXX/messages/custom_rule/delete", |
"errcode": "1000XX", | "errcode": "1000XX", | ||
"errmsg": "error message." | "errmsg": "error message." | ||
第45行: | 第87行: | ||
</pre> | </pre> | ||
− | = | + | =修改分组名= |
− | = | + | |
− | = | + | |
− | = | + | '''接口调用请求说明:''' |
− | = | + | |
+ | <pre> | ||
+ | URL:2/messages/custom_rule/update.json | ||
+ | |||
+ | HTTP 请求方式:POST | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | ||
+ | |- | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|参数 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|必选 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|类型及范围 | ||
+ | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|说明 | ||
+ | {{api_args|access_token|true|string|在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 [[Messages_api/access_token|获取粉丝服务平台开发接口的access token]]。}} | ||
+ | {{api_args|id|true|long|分组ID}} | ||
+ | {{api_args|name|true|string|分组名}} | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''返回结果:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "errcode": 0, | ||
+ | "errmsg": "ok" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | '''失败返回:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "request": "XXXX/messages/custom_rule/update", | ||
+ | "errcode": "1000XX", | ||
+ | "errmsg": "error message." | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | =查询所有分组= | ||
+ | |||
+ | '''接口调用请求说明:''' | ||
+ | |||
+ | <pre> | ||
+ | URL:2/messages/custom_rule/get.json | ||
+ | |||
+ | HTTP 请求方式:GET | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | ||
+ | |- | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|参数 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|必选 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|类型及范围 | ||
+ | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|说明 | ||
+ | {{api_args|access_token|true|string|在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 [[Messages_api/access_token|获取粉丝服务平台开发接口的access token]]。}} | ||
+ | {{api_args|rule_type|false|int|获取规则 定义;默认不传返回所有自定义分组;1只返回自动分组;2返回全部分组信息}} | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''返回结果:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "groups": [ | ||
+ | { | ||
+ | "id": 0, | ||
+ | "name": "未分组", | ||
+ | "count": 72596, | ||
+ | "rule_type": 1 //0:私密自动规则;1:开放自动规则 | ||
+ | }, | ||
+ | { | ||
+ | "id": 1, | ||
+ | "name": "黑名单", | ||
+ | "count": 36, | ||
+ | "rule_type": 2 //2:自定义分组 | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | '''失败返回:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "request": "XXXX/messages/custom_rule/get", | ||
+ | "errcode": "1000XX", | ||
+ | "errmsg": "error message." | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | =查询用户所在分组= | ||
+ | '''接口调用请求说明:''' | ||
+ | |||
+ | <pre> | ||
+ | URL:2/messages/custom_rule/getid.json | ||
+ | |||
+ | HTTP 请求方式:GET | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | ||
+ | |- | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|参数 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|必选 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|类型及范围 | ||
+ | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|说明 | ||
+ | {{api_args|access_token|true|string|在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 [[Messages_api/access_token|获取粉丝服务平台开发接口的access token]]。}} | ||
+ | {{api_args|follower_id|true|long|粉丝id}} | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''返回结果:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "groupid": 123123123 | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | '''失败返回:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "request": "XXXX/messages/custom_rule/getid", | ||
+ | "errcode": "1000XX", | ||
+ | "errmsg": "error message." | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | =移动用户分组= | ||
+ | '''接口调用请求说明:''' | ||
+ | |||
+ | <pre> | ||
+ | URL:2/messages/custom_rule/member/update.json | ||
+ | |||
+ | HTTP 请求方式:POST | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | {| border="1" cellspacing="0" cellpadding="0" width="100%" class="parameters" style="border-color: #CCCCCC;" | ||
+ | |- | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|参数 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|必选 | ||
+ | !width="10%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|类型及范围 | ||
+ | !width="70%" style="text-align:center;font-weight:bolder;border:1px solid #cccccc"|说明 | ||
+ | {{api_args|access_token|true|string|在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 [[Messages_api/access_token|获取粉丝服务平台开发接口的access token]]。}} | ||
+ | {{api_args|follower_id|true|long|粉丝id}} | ||
+ | {{api_args|to_groupid|true|long|分组id}} | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''返回结果:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "errcode": 0, | ||
+ | "errmsg": "ok" | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | '''失败返回:''' | ||
+ | <pre> | ||
+ | { | ||
+ | "request": "XXXX/messages/custom_rule/member/update", | ||
+ | "errcode": "1000XX", | ||
+ | "errmsg": "error message." | ||
+ | } | ||
+ | </pre> |
2014年6月13日 (五) 00:37的最后版本
目录 |
创建分组
一个第三方账号,最多支持创建500个分组。
接口调用请求说明:
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
参数 | 必选 | 类型及范围 | 说明 |
---|---|---|---|
access_token | true | string | 在账号Profile页--> 管理中心 --> 粉丝服务--> 高级功能--> 开发模式中获取,详细参考 获取粉丝服务平台开发接口的access token。 |
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." }
文档更新时间: 2014-06-13