mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Updated documentation and fixed typos for the newsfeed module. Fixes GH-804
This commit is contained in:
parent
db3be3d80a
commit
7345807871
@ -44,9 +44,9 @@ Module.register("newsfeed",{
|
|||||||
|
|
||||||
// Define required translations.
|
// Define required translations.
|
||||||
getTranslations: function() {
|
getTranslations: function() {
|
||||||
// The translations for the defaut modules are defined in the core translation files.
|
// 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 dictionairy.
|
// 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.
|
// If you're trying to build your own module including translations, check out the documentation.
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -204,7 +204,6 @@ Module.register("newsfeed",{
|
|||||||
/* registerFeeds()
|
/* registerFeeds()
|
||||||
* registers the feeds to be used by the backend.
|
* registers the feeds to be used by the backend.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
registerFeeds: function() {
|
registerFeeds: function() {
|
||||||
for (var f in this.config.feeds) {
|
for (var f in this.config.feeds) {
|
||||||
var feed = this.config.feeds[f];
|
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.
|
* 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) {
|
generateFeed: function(feeds) {
|
||||||
var newsItems = [];
|
var newsItems = [];
|
||||||
@ -262,7 +261,7 @@ Module.register("newsfeed",{
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
/* subscribedToFeed(feedUrl)
|
/* titleForFeed(feedUrl)
|
||||||
* Returns title for a specific feed Url.
|
* Returns title for a specific feed Url.
|
||||||
*
|
*
|
||||||
* attribute feedUrl string - Url of the feed to check.
|
* attribute feedUrl string - Url of the feed to check.
|
||||||
|
@ -24,14 +24,13 @@ module.exports = NodeHelper.create({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/* createFetcher(url, reloadInterval)
|
/* createFetcher(feed, config)
|
||||||
* Creates a fetcher for a new url if it doesn't exist yet.
|
* Creates a fetcher for a new feed if it doesn't exist yet.
|
||||||
* Otherwise it reoses the existing one.
|
* Otherwise it reuses the existing one.
|
||||||
*
|
*
|
||||||
* attribute url string - URL of the news feed.
|
* attribute feed object - A feed object.
|
||||||
* attribute reloadInterval number - Reload interval in milliseconds.
|
* attribute config object - A configuration object containing reload interval in milliseconds.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
createFetcher: function(feed, config) {
|
createFetcher: function(feed, config) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user