A module for the MagicMirror that displays random quote from various authorship using API Ninjas's api.
Navigate into your MagicMirror's ~/MagicMirror/modules folder and execute git clone https://github.com/Jacopo1891/MMM-RandomQuotes
Go to https://api-ninjas.com and create a new account. Today (2024/02/04), the free subscription allows you to make 10000 calls every month.
To use this module, add it to the modules array in the config/config.js file:
let config = {
modules: [
{
module: 'MMM-RandomQuotes',
position: 'bottom_center',
config: {
apiKey: 'YOUR_KEY',
updateInterval: 60,
showSymbol: true,
fadeSpeed: 4000,
quoteSize: "M", // S M L - Default M
authorSize: "S", // S M L - Default S
maxQuoteLenght: 180 // Max number of quote's characters
},
}
]
}
apiKey
: your api-ninjas.com key as described in the relevant section of this readmecategory
: You can filter quotes by category, if is not in this list will not work.updateInterval
: Update interval in seconds. (default 1 minute)showSymbol
: true or false, show or hide apex symbol around quote.fadeSpeed
: How fast (in milliseconds) to fade out and back in when changing quotes.quoteSize
: Set the quote's font size (small, medium, large)authorSize
: Set the author's font size (small, medium, large)maxQuoteLenght
: Set the quote's max characters
Unfortunately, the APIs have changed, and the category filter has become a premium feature. I haven't had the opportunity to test its functionality, so it is currently not supported.
- With symbol
- Without symbol
Please feel free to raise an issue on GitHub for any features you would like to see or usage issues you experience and I will endeavour to address them.
Find it useful? Please consider buying me or other contributors a coffee.
![blue-button](https://private-user-images.githubusercontent.com/5861330/296693538-43f41b8d-13e5-4711-877d-cab090bc56b0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTQ3NjIsIm5iZiI6MTczOTMxNDQ2MiwicGF0aCI6Ii81ODYxMzMwLzI5NjY5MzUzOC00M2Y0MWI4ZC0xM2U1LTQ3MTEtODc3ZC1jYWIwOTBiYzU2YjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMjI1NDIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OTBmNjBhOGI1MWM3MjIyYTdhYjMyMjBhNWU3N2I3Yjk4NjVkNjZkZjZhYzJhNzQ1ZmU2MjIyMjE0NmVlMzEzYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.61f1lpJxi8-7Ru7nXY0ygKxwPb5WjZE3UDxNS8HYM1U)