MMM-quote-of-the-day
MMM-quote-of-the-day copied to clipboard
Using other APIs to generate a quote of the day (French web site)
Hi, First, thanks for your job, this a great module for the Magic Mirror. I would like to use it to generate French "quote of the day". Unfortunatly I never succeed to make the translation in french working. So I looked for a french quotation web site to have directly a french source. I found "ouest-france" web site, which generates quotes in french with options (1 per day, by authour , by theme, etc)
I found some commands in the API source code proposed by the site at this address : https://citations.ouest-france.fr/js/web/export.js?v3
The API can be used like that, when you chose an author:
https://citations.ouest-france.fr/apis/export.php?json&key=464fzer5&t=author&author=Coluche
or like that, for one day quotation:
https://citations.ouest-france.fr/apis/export.php?json&key=464fzer5&t=day
It works and it returns for the one day quotation for example, in my browser:
{"idcitation":"25077","quote":"Effacer le pass\u00e9, on le peut toujours : c'est une affaire de regret, de d\u00e9saveu, d'oubli. Mais on n'\u00e9vite pas l'avenir.","nbvote":"18","nbcomm":"0","name":"Oscar Wilde","idauteur":"906","nbquote":"434","initiale":"w","birth":"1854","death":"1900","auteur_photo":"1","iduser":"","redacteur":"0","photo":"0","photoname":"","contexte":"","quotethemes":"regret,pass\u00e9,oubli,avenir","getlink":"https:\/\/citations.ouest-france.fr\/citation-oscar-wilde\/effacer-passe-peut-toujours-affaire-25077.html","authorlink":"https:\/\/citations.ouest-france.fr\/citations-oscar-wilde-906.html"}
So finally , my question is : Is it possible to use in your MM module the variables "quote" and "name" to write the same result as yours on the Magic Mirror, but in French.
Sorry I didn't find a way to do that by checking your source code. I have found that you use "quoteText" and quoteAuthor" variables from Forismatic web site but I'm stucked here. I have basic knowledge in C, python, html codes, but not in javascript and JSON functions.
Thanks for your help.