From 73458078717a8b01ab05547d850bbed4af05328c Mon Sep 17 00:00:00 2001 From: Johan Hammar Date: Thu, 30 Mar 2017 21:15:51 +0200 Subject: [PATCH] Updated documentation and fixed typos for the newsfeed module. Fixes GH-804 --- modules/default/newsfeed/newsfeed.js | 13 ++++++------- modules/default/newsfeed/node_helper.js | 11 +++++------ 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/modules/default/newsfeed/newsfeed.js b/modules/default/newsfeed/newsfeed.js index b7ec2f58..b230fdb1 100644 --- a/modules/default/newsfeed/newsfeed.js +++ b/modules/default/newsfeed/newsfeed.js @@ -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. diff --git a/modules/default/newsfeed/node_helper.js b/modules/default/newsfeed/node_helper.js index e5243304..af1d32b8 100644 --- a/modules/default/newsfeed/node_helper.js +++ b/modules/default/newsfeed/node_helper.js @@ -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;