C/2/subscribe/update subscribe/en

跳转到: 导航, 搜索
 
(未显示1个用户的4个中间版本)
第6行: 第6行:
 
rateLimit={{B_rate_limit_en}}|
 
rateLimit={{B_rate_limit_en}}|
 
params={{api_args|subid|true|int|Subscription ID (See the [[specification]]  for more information).}}
 
params={{api_args|subid|true|int|Subscription ID (See the [[specification]]  for more information).}}
{{api_args|add_keywords|false|string|Add keywords that will be subscribed. The keywords should be separated by semiangle comma, and are limited by 20 keywords per call.It must be encoded by UTF-8.}}
+
{{api_args|add_keywords|false|string|Add keywords that will be subscribed. The keywords should be separated by semiangle comma, and are limited by 50 keywords per call.It must be encoded by UTF-8.}}
{{api_args|del_keywords|false|string|Delete keywords that have already been subscribed. The keywords should be separated by semiangle comma, and are limited by 20 keywords per call.It must be encoded by UTF-8.}}
+
{{api_args|del_keywords|false|string|Delete keywords that have already been subscribed. The keywords should be separated by semiangle comma, and are limited by 50 keywords per call.It must be encoded by UTF-8.}}
{{api_args|add_uids|false|string|Add userids that will be subscribed. The userids should be separated by semiangle comma, and are limited by 50 userids per call.}}
+
{{api_args|add_uids|false|string|Add users that will be subscribed. The ids or nicknames should be separated by semiangle comma, and are limited by 50 users per call.It must be encoded by UTF-8.}}
{{api_args|del_uids|false|string|Delete userids that have already been subscribed. The userids should be separated by semiangle comma, and are limited by 50 userids per call.}}
+
{{api_args|del_uids|false|string|Delete users that have already been subscribed. The ids or nicknames should be separated by semiangle comma, and are limited by 50 users per call.It must be encoded by UTF-8.}}
 
|
 
|
 
result=
 
result=
第74行: 第74行:
 
}</pre>|
 
}</pre>|
 
resultDes=None|
 
resultDes=None|
useAge=*Use the url: http://c.api.weibo.com/subscribe/update_subscribe.json to call the API.The url: http://c.api.weibo.com/2/subscribe/update_subscribe.json is invalid.
+
useAge=*Use the url: https://c.api.weibo.com/subscribe/update_subscribe.json to call the API.The url: https://c.api.weibo.com/2/subscribe/update_subscribe.json is invalid.
 
*If just parameter ‘subid’ is passed, the subscription info included the keywords and users list will be returned.
 
*If just parameter ‘subid’ is passed, the subscription info included the keywords and users list will be returned.
 
*The IP address to call the API must be one of the IP list provided when created the subscription. Otherwise, the error response ‘Ip is limited’ will be returned.
 
*The IP address to call the API must be one of the IP list provided when created the subscription. Otherwise, the error response ‘Ip is limited’ will be returned.

2018年4月12日 (四) 15:08的最后版本

subscribe/update_subscribe

Subscribe keywords and users.

URL

https://c.api.weibo.com/2/subscribe/update_subscribe.json

Supported Formats

JSON

HTTP Request Method

POST

Requires Login

False
See the Login and Authorization Mechanism Statement for login and authorization details.

Requests Count Limitation


Request all APIs:

    • 50000/hour/IP;

Request Parameters

  Requires Type and Range Description
source false string This parameter is not needed when using OAuth.The value of this parameter is the AppKey.
access_token false string This parameter is required when using OAuth.You will get the access_token after oauth authorization.
subid true int Subscription ID (See the specification for more information).
add_keywords false string Add keywords that will be subscribed. The keywords should be separated by semiangle comma, and are limited by 50 keywords per call.It must be encoded by UTF-8.
del_keywords false string Delete keywords that have already been subscribed. The keywords should be separated by semiangle comma, and are limited by 50 keywords per call.It must be encoded by UTF-8.
add_uids false string Add users that will be subscribed. The ids or nicknames should be separated by semiangle comma, and are limited by 50 users per call.It must be encoded by UTF-8.
del_uids false string Delete users that have already been subscribed. The ids or nicknames should be separated by semiangle comma, and are limited by 50 users per call.It must be encoded by UTF-8.

Notes

Response

JSON Example

//Success
{
    "result":true
}
//or
{
    "appkey": 2363923368"subid": 10032"subname": "JY测试1""ip": [
        10.210.xx,
        10.210.230.xx,
        .....
    ],
    "filters": {
        "userfilter": {
            "id": [
                1231456,
                1234564565
            ]
        },
        "domainfilter": {
            "domain": [
                "www.baidu.com",
                "www.sina.com"
            ]
        },
        "mediafilter": {
            "video": true,
            "pic": false,
            "music": false,
            "ori": true
        },
        "keywordfilter": {
            "key": [
                "hello",
                "world"
            ],
            
        },
        "appfilter": {
            "currentapp": "true"
        },
        "datafilter": {
            "weibo": true,
            "comment": false
        }
    },
    "strategy": {
        "pushstatus": "true/false",
        "begintime": "",
        "endtime": "",
        "percent": "",
        
    }
}

//Failure
{
    "request": "/statuses/bilateral_timeline/ids.json",
    "error_code": "201XX",
    "error": "error message."
}

See the Error Code Description for the error information details.

Field Description

None

Others

None

Language: [[{{{2/uri}}}|中文]]


文档更新时间: 2018-04-12
api评价