C/2/datapush/edit
第5行: | 第5行: | ||
needAuth=False| | needAuth=False| | ||
rateLimit={{B_rate_limit_en}}| | rateLimit={{B_rate_limit_en}}| | ||
− | params={{api_args|subid|true|int|Subscription ID (See the [[ | + | 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.}} | {{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.}} | ||
{{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.}} | {{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.}} |
2013年10月12日 (六) 16:23的版本
datapush/edit
Subscribe keywords and users.
URL
https://c.api.weibo.com/2/datapush/edit.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;
- 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 20 keywords per call. |
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. |
add_users | false | string | Add userids that will be subscribed. The userids should be separated by semiangle comma, and are limited by 50 userids per call. |
del_users | 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. |
Notes
- 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.
- Parameter 'source' and 'access_token' are not needed to pass.
Response
JSON Example
//Success { “data”: [ { “uid”: 730, //微任务用户ID “sinaid”: 1235653741, //新浪微博用户ID “nick”: ”随便谁吧”, //新浪微博用户昵称 “stars”: 3, “price”: 95.5, //直发价格 ”reprice“: 95.3 //转发价格 “followers”: 3000000, “weiboclass”: ”汽车,娱乐,新闻”, //微任务帐号分类 “location”: ”北京朝阳”, “gender”: ”男”, “profile_imageurl”: ”http: //www2.img.sina.com.com/asdfsa345.jpg” }, ... ], “count”: 20 } //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