Read the statement by Michael Teeuw here.
Module for MagicMirror forum
-
The forum has an API. Has anyone built a module for it? One could display unread messages (https://forum.magicmirror.builders/api/unread) and/or notifications (https://forum.magicmirror.builders/api/notifications) for example.
-
@KristjanESPERANTO you need a token, you can’t do something without it
Only admin can send it
-
some api urls seem to work without authentication, e.g.
❯ curl -s https://forum.magicmirror.builders/api/recent/posts/day | jq -r '.[].topic.title' Default Weather Module Icon Position Module for MagicMirror forum MMM-Formula1 updates MMM-Formula1 updates MMM-Formula1 updates Live phone location Refresh Magic Mirror after custom css changes Module for MagicMirror forum Refresh Magic Mirror after custom css changes MMM-QuotesFromReddit Refresh Magic Mirror after custom css changes
-
the use of a csrf token is restricted to admins (as already mentioned by @bugsounet), there is a hack described here to open this for all users but I don’t think we should do this.
For accessing the read(-only) api you can use a cookie from your browser, e.g.
curl --cookie "express.sid=xxxxxxx" https://forum.magicmirror.builders/api/unread
but this would be challenging to use in a module for mm …
-
best way is using
RSS
like this
-
@bugsounet Okay, that’s nice. But is it possible to get unread messages or notifications using RSS?
-
nop it’s not possible
read api doc
The API key is managed from the admin panel
It is given so that the user has access to it for external useI don’t think that Veeck and @karsten13 will send it ;)
That why best way is using recent only by rss
my first js approach:
let Parser = require('rss-parser'); let parser = new Parser(); let rss = "https://forum.magicmirror.builders/recent.rss"; (async () => { let feed = await parser.parseURL(rss); feed.items.forEach(item => { console.log(item.title + ' --> ' + item.link) }); })();
Result:
bugsounet@Kubuntu:~/test$ node test Module for MagicMirror forum --> https://forum.magicmirror.builders/topic/18611/module-for-magicmirror-forum MMM-Formula1 updates --> https://forum.magicmirror.builders/topic/18608/mmm-formula1-updates Default Weather Module Icon Position --> https://forum.magicmirror.builders/topic/18484/default-weather-module-icon-position Live phone location --> https://forum.magicmirror.builders/topic/18612/live-phone-location Ability to display certain modules at certain times of the year? --> https://forum.magicmirror.builders/topic/18613/ability-to-display-certain-modules-at-certain-times-of-the-year Yahoo Fantasy Sports? --> https://forum.magicmirror.builders/topic/18614/yahoo-fantasy-sports A shopping list model that is integrated with Google Assistant --> https://forum.magicmirror.builders/topic/18606/a-shopping-list-model-that-is-integrated-with-google-assistant MMM-DHT22 --> https://forum.magicmirror.builders/topic/17978/mmm-dht22 Refresh Magic Mirror after custom css changes --> https://forum.magicmirror.builders/topic/18609/refresh-magic-mirror-after-custom-css-changes MMM-QuotesFromReddit --> https://forum.magicmirror.builders/topic/4440/mmm-quotesfromreddit set the calendar day to a short version --> https://forum.magicmirror.builders/topic/18610/set-the-calendar-day-to-a-short-version New icons not showing up - default MM-Weather modules --> https://forum.magicmirror.builders/topic/17983/new-icons-not-showing-up-default-mm-weather-modules [MMM-OnThisDayWikiApi] - Get Wikipedia's OnThisDay using the Wikimedia API --> https://forum.magicmirror.builders/topic/18261/mmm-onthisdaywikiapi-get-wikipedia-s-onthisday-using-the-wikimedia-api MMM-CalendarExt3 --> https://forum.magicmirror.builders/topic/16690/mmm-calendarext3 August-Lock Module Stuck on Loading --> https://forum.magicmirror.builders/topic/18607/august-lock-module-stuck-on-loading MMM-CalendarExt3 not syncing automatically with icloud --> https://forum.magicmirror.builders/topic/18598/mmm-calendarext3-not-syncing-automatically-with-icloud delete account --> https://forum.magicmirror.builders/topic/18341/delete-account Ecobee --> https://forum.magicmirror.builders/topic/701/ecobee PiHole-Info Modul --> https://forum.magicmirror.builders/topic/18603/pihole-info-modul My custom mirror --> https://forum.magicmirror.builders/topic/18600/my-custom-mirror
-
-
I’ve done it! 🥳 Checkout https://forum.magicmirror.builders/topic/19133/mmm-forum.
For accessing the read(-only) api you can use a cookie from your browser, e.g.
@karsten13 Thank you! That was the hint that led me to the solution 🙏
-