Updated documentation and fixed typos for the newsfeed module. Fixes GH-804

This commit is contained in:
Johan Hammar 2017-03-30 21:15:51 +02:00
parent db3be3d80a
commit 7345807871
2 changed files with 11 additions and 13 deletions

View File

@ -44,9 +44,9 @@ Module.register("newsfeed",{
// Define required translations.
getTranslations: function() {
// The translations for the defaut modules are defined in the core translation files.
// Therefor we can just return false. Otherwise we should have returned a dictionairy.
// If you're trying to build yiur own module including translations, check out the documentation.
// The translations for the default modules are defined in the core translation files.
// Therefor we can just return false. Otherwise we should have returned a dictionary.
// If you're trying to build your own module including translations, check out the documentation.
return false;
},
@ -204,7 +204,6 @@ Module.register("newsfeed",{
/* registerFeeds()
* registers the feeds to be used by the backend.
*/
registerFeeds: function() {
for (var f in this.config.feeds) {
var feed = this.config.feeds[f];
@ -215,10 +214,10 @@ Module.register("newsfeed",{
}
},
/* registerFeeds()
/* generateFeed()
* Generate an ordered list of items for this configured module.
*
* attribute feeds object - An object with feeds returned by the nod helper.
* attribute feeds object - An object with feeds returned by the node helper.
*/
generateFeed: function(feeds) {
var newsItems = [];
@ -262,7 +261,7 @@ Module.register("newsfeed",{
return false;
},
/* subscribedToFeed(feedUrl)
/* titleForFeed(feedUrl)
* Returns title for a specific feed Url.
*
* attribute feedUrl string - Url of the feed to check.

View File

@ -24,14 +24,13 @@ module.exports = NodeHelper.create({
}
},
/* createFetcher(url, reloadInterval)
* Creates a fetcher for a new url if it doesn't exist yet.
* Otherwise it reoses the existing one.
/* createFetcher(feed, config)
* Creates a fetcher for a new feed if it doesn't exist yet.
* Otherwise it reuses the existing one.
*
* attribute url string - URL of the news feed.
* attribute reloadInterval number - Reload interval in milliseconds.
* attribute feed object - A feed object.
* attribute config object - A configuration object containing reload interval in milliseconds.
*/
createFetcher: function(feed, config) {
var self = this;