RSS is a family of Web feed formats used to publish frequently updated content such as blog entries, news headlines, and podcasts in a standardized format.
NpsRss is used to read and create RSS.
Note:Only the function of RSS creation are supported in the version of 1.2
The sample code show how to create RSS with datas within 7 days.
|
var site = session.GetSite(); var rss = new NpsRss(site); var date_before_week = new Date(new Date()-7*24*60*60); var today = new Date(); rss.GenerateSite(new NpsFile('/rss2.xml'),date_before_week,today); |
|
NpsRss(NpsSite site) Construction |
|
| void |
GenerateSite(NpsFile file,Date begin_date,Date end_date) throws Exception Generate the summary of articles in the whole website from begin_date to end_date. begin_date=null means " do not set start time " end_date=null mean " do not set the end of time " |
| void |
GenerateTopic(NpsTopic topic,NpsFile file,Date begin_date,Date end_date) throws Exception Generate the summary of articles in the provided topic from begin_date to end_date. begin_date=null means " do not set start time " end_date=null mean " do not set the end of time " |
| void |
GenerateTopicByCode(String topic_code,NpsFile file,Date begin_date,Date end_date) throws Exception Generate the summary of articles in the topic specified by topic_code from begin_date to end_date. begin_date=null means " do not set start time " end_date=null mean " do not set the end of time " |