Skip to content

A module for the MagicMirror that displays random quote from various authorship using API Ninjas's api.

License

Notifications You must be signed in to change notification settings

Jacopo1891/MMM-RandomQuotes

Repository files navigation

Module: Random quotes

A module for the MagicMirror that displays random quote from various authorship using API Ninjas's api.

Installation

Navigate into your MagicMirror's ~/MagicMirror/modules folder and execute git clone https://github.com/Jacopo1891/MMM-RandomQuotes

Get API Ninjas's api key

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.

Using the module

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',
                category: "",
                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 readme
  • category: You can filter quotes by category, if is not in this list will not work. [age, alone, amazing, anger, architecture, art, attitude, beauty, best, birthday, business, car, change, communication, computers, cool, courage, dad, dating, death, design, dreams, education, environmental, equality, experience, failure, faith, family, famous, fear, fitness, food, forgiveness, freedom, friendship, funny, future, god, good, government, graduation, great, happiness, health, history, home, hope, humor, imagination, inspirational, intelligence, jealousy, knowledge, leadership, learning, legal, life, love, marriage, medical, men, mom, money, morning, movies, success]
  • 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

Example Screenshot

  • With symbol

Screenshot with symbol

  • Without symbol

Screenshot without symbol

Suggestions

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.

Buy me a coffee

Find it useful? Please consider buying me or other contributors a coffee.

blue-button

About

A module for the MagicMirror that displays random quote from various authorship using API Ninjas's api.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published