Merge pull request #806 from johanhammar/newsfeed-documentation-updates

Updated documentation and fixed typos for the newsfeed module
This commit is contained in:
Michael Teeuw 2017-03-31 09:29:04 +02:00 committed by GitHub
commit 0c096bb090
5 changed files with 19 additions and 21 deletions

View File

@ -54,8 +54,8 @@ Module.register("calendar", {
// 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.
// 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;
},
@ -409,11 +409,11 @@ Module.register("calendar", {
},
/* shorten(string, maxLength)
* Shortens a string if it's longer than maxLenthg.
* Shortens a string if it's longer than maxLength.
* Adds an ellipsis to the end.
*
* argument string string - The string to shorten.
* argument maxLength number - The max lenth of the string.
* argument maxLength number - The max length of the string.
*
* return string - The shortened string.
*/

View File

@ -79,8 +79,8 @@ Module.register("currentweather",{
// 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.
// 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 yiur own module including translations, check out the documentation.
return false;
},

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;

View File

@ -77,8 +77,8 @@ Module.register("weatherforecast",{
// 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.
// 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 yiur own module including translations, check out the documentation.
return false;
},