跳转到: 导航, 搜索
第70行: 第70行:
 
<font size="2" style="font-weight:bold">② Set subscribed keywords and users:</font>
 
<font size="2" style="font-weight:bold">② Set subscribed keywords and users:</font>
  
If ‘no’ is selected in the fields of ‘Users’ and ‘Keywords’ in ‘Paid Subscription Service Application Form’, applications need ignore this step. If ‘yes’ is selected, the keyword and user subscription list must not be empty. Call the API to subscribe keywords and users:*[[C/2/datapush/edit|datapush/edit]]
+
If ‘no’ is selected in the fields of ‘Users’ and ‘Keywords’ in ‘Paid Subscription Service Application Form’, applications need ignore this step. If ‘yes’ is selected, the keyword and user subscription list must not be empty. Call the API to subscribe keywords and users: [[C/2/datapush/edit|datapush/edit]]
  
  

2013年10月11日 (五) 19:09的版本

目录

Overview

The subscription service of Weibo Platform makes the applications get the datas more efficiently. According to the subscription filters like keywords, users, and domains applications specified, the applications will be delivered the new datas that match the filters in real-time by the Weibo Platform, without needing to poll the APIs as before.


Advantages:

● The datas are for the real-time.

● Save the network resources.

● Provide the more full datas.

● Get the datas more efficiently.


Filters

● Push according to data types:

Either statuses or comments can be subscribed. A subscription can’t subscribe both of them. Default are statuses.


● Push according to users:

The max number is up to 10000 userids for each subscription. When subscribe for statuses, statuses created by the users specified will be delivered. When subscribe for comments, the statuses which are created by the users specified, the comments to the statuses will be delivered.


● Push according to keywords:

The max number is up to 400 keywords for each subscription. When subscribe for statuses, statuses which contain one of the keywords specified will be delivered. When subscribe for comments, the statuses which are commented contain one of the keywords specified, the comments will be delivered.


● Push according to domains:

The max number is up to 20 domains for each subscription. When subscribe for statuses, statuses which contain the short links that one of the short links which original link contain one of the domains specified will be delivered. When subscribe for comments, the statuses which are commented contain the short links that one of the short links which original link contain one of the domains specified, the comments will be delivered.


● Push according to applications:

The application can only be delivered the statuses or comments which were created by the application itself. Or be delivered the datas created by all the applications on Weibo Platform.


● Push according to media types:

Only when the statuses are subscribed is the filter valid. There are five media types: ‘original’, ‘repost’, ‘video, ‘music’, ‘picture’. The statuses which fit the media types specified will be delivered.


● Push according to percentage specified:

The datas of a percentage of the full datas that fit all the filters above will be delivered. Default is 1 percent.


● Push according to time range specified:

Applications can specify the start time and the end time of the pushing. Pushing server will be ready when arrives at the start time. And the pushing will be terminated when arrives at the end time. If not specified, the start time is equal the time the subscription was created. And the pushing has no end. When the pushing server is ready, applications can connect the pushing APIs to get the datas. See the followings for the specification.


Steps

Using the subscription service, there are several steps as follows:

subscription_en.jpg


① Creates a subscription:

Developers fill out the ‘subscription service application form’ in the attachment 1, providing filters and other information. Weibo Platform will create the subscription according to the information provided in the form. Multiple subscriptions can be created for each application.

② Set subscribed keywords and users:

If ‘no’ is selected in the fields of ‘Users’ and ‘Keywords’ in ‘Paid Subscription Service Application Form’, applications need ignore this step. If ‘yes’ is selected, the keyword and user subscription list must not be empty. Call the API to subscribe keywords and users: datapush/edit


Specifications

Statuses