While developing the Mattermost client/skill for Mycroft I was thinking something similar for the forum would be helpful as well. Is there a Web API (REST) for this forum? On which software is the forum based on?
That is a reat idea - one that I did have, but wouldnt say out loud, as then you just make it in a day or to, and then I am stuck on simpler not so useful skills
One could also think of a skill that inform if there were pull requests or new or updates to issues in ones githup reposotories….
Hi there @Dominik, great question.
Our Forum uses the open source Discourse software.
https://www.discourse.org/
There is API documentati
https://docs.discourse.org/
Hi @KathyReid,
Thanks for providing the information. In the meantime I found PyDiscourse which seems to be a promising candidate as a Python-Discourse library.
As far as I understand the Discourse-docs the REST-API requires an API-key for authentication (in opposite to Mattermost’s API where you can either use a token or email/password). Furthermore I understand that the API-key will be generated by the admin of the Discourse webapp. What is not exactly clear to me if such API-key is bound to a specific user - hopefully it is?
Assuming that a Discourse-for-Mycroft client/skill exists, I guess that in the end you - or one of your colleagues in charge for community.mycroft.ai - will have to generate a key for each user who wants to use the skill.
According to the site statistics there are currently 2.8k user accounts so that might be a lot of API-key to be generated… Do you think that’s feasible?
Good question. I have no idea; I’ve never worked with the Discourse API.
I had a read through of this Discourse API documentation - it looks like the API creation is definitely manual - which won’t scale.
The other option we have here is to store a single system-wide API key in home.mycroft.ai.
I am afraid that is no good idea as to my understanding of the API-docs everybody who knows this system-wide API-key can retrieve/read any Discourse-entity (user names and email, private messages, etc.) and even more critical can create and delete any entity (user, posts, …) as well.
Here is an interesting discussion on user api keys. Can you check if the prerequites are fulfilled for community.mycroft.ai?
An here is an article on auto generation of user api-keys - which I don’t fully understand. Maybe a colleague with deeper knowledge of Discourse can help if such thing can be implemented?
EDIT: this looks also interesting generating user api keys
Since we are on the topic of the Web API. Can we look into the ability to add skill grouping? I have not idea if this is possible but as we add more skills the interface is not very clean. I am thinking in particular to skills where you may require more than one instance of a skill configuration for a skill. example. my kodi skill has configuration items for only one kodi instance. At some point I would like it to support multiple kodi instances but each of these kodi instances may require its own configuration information including a unique identifier. It would be great if I could group these kodi devices together for ease of configuration. Something like a tabbed group would be wonderful.
I’m actually the person with the most knowledge of Discourse at Mycroft, unfortunately.
My understanding of the generating user API keys post on the Discourse forum is that it is is a specification - it hasn’t actually been implemented in the Discourse code yet - it’s setting out how it could be implemented.
It seems the generating-API-keys-for-users is possible but not well documented - which IMHO usually means it’s not well tested.
I’m thinking that Discourse probably isn’t mature enough to do what we’re looking for here …
That is my impression as well. I will keep an eye on the Discourse development and when the API-key handling is improved I will continue with the Mycroft skill…
That’s a great suggestion @pcwii. I’m going to flag that with my colleague @ChrisVeilleux who is currently doing some work on re-designing home.mycroft.ai (with thanks to the visual design from @akuataja).