• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-COVID19

Scheduled Pinned Locked Moved Health
63 Posts 25 Posters 21.2k Views 24 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    Indiz
    last edited by Indiz Jan 1, 2021, 10:59 PM Jan 1, 2021, 10:26 PM

    Bonjour j’ai le même problème, je n’ai que le titre COVID-19 qui apparait et aucunes données.
    Voici ma config:

    {
    	module: "MMM-COVID19",
    	position: "top_right",
    	config: {
    	  updateInterval: 300000,
    	  worldStats: true,
    	  delta: true,
    	  lastUpdateInfo: true,
    	  countries: [ "USA", "France", "Spain" ],
    	  headerRowClass: "small",
    	  rapidapiKey : "KEY",
    	}
    },
    
    1 Reply Last reply Reply Quote 0
    • D Offline
      dubalda
      last edited by Jan 24, 2021, 9:45 PM

      Hi guys,

      I’m not getting much luck getting this to work. I just get the header and no errors in the log.

      {
      module: “MMM-COVID19”,
      position: “top_left”,
      config: {
      updateInterval: 300000,
      worldStats: true,
      delta: true,
      lastUpdateInfo: true,
      countries: [ “Argentina”, “China”, “Italy”, “Spain” ],
      headerRowClass: “small”,
      rapidapiKey : “xxx”
      }
      },

      I’ve also amended the node_helper.js for the module to include the new rapidhost URLs

      var byCountryUrl = ‘https://coronavirus-monitor-V2.p.rapidapi.com/coronavirus/cases_by_country.php’

      getGlobalStats: function(key) {
      var self = this
      var options = {
      method: ‘GET’,
      url: worldStatsUrl,
      headers: {
      //‘x-rapidapi-host’: ‘coronavirus-monitor.p.rapidapi.com’,
      ‘x-rapidapi-host’: ‘coronavirus-monitor-v2.p.rapidapi.com’,
      ‘x-rapidapi-key’: key
      }
      }

      getStatsByCoutry: function(key) {
      var self = this
      var options = {
      method: ‘GET’,
      url: byCountryUrl,
      headers: {
      //‘x-rapidapi-host’: ‘coronavirus-monitor.p.rapidapi.com’,
      ‘x-rapidapi-host’: ‘coronavirus-monitor-v2.p.rapidapi.com’,
      ‘x-rapidapi-key’: key
      }
      }

      Any help would be great!

      Thanks

      S 1 Reply Last reply Jan 24, 2021, 9:48 PM Reply Quote 0
      • S Away
        sdetweil @dubalda
        last edited by Jan 24, 2021, 9:48 PM

        @dubalda when u use the url in a browser does it return the right data?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • D Offline
          dubalda
          last edited by Jan 24, 2021, 9:53 PM

          Hi Sam,

          I just get "{“message”:“Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info.”}

          Sorry, perhaps I missing something here…are you refering this URL

          https://coronavirus-monitor-V2.p.rapidapi.com/coronavirus/cases_by_country.php

          Thx

          S 1 Reply Last reply Jan 24, 2021, 10:02 PM Reply Quote 0
          • S Away
            sdetweil @dubalda
            last edited by sdetweil Jan 24, 2021, 10:19 PM Jan 24, 2021, 10:02 PM

            @dubalda whatever api you use. i always test in a browser first.

            u need to add the apikey to the url

            i am making it up (not exact text) cause i am on my phone in hospital

            url.php&api_key=whatever is the key

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • D Offline
              dubalda
              last edited by Jan 24, 2021, 10:37 PM

              Sorry to hear you’re in hospital! Hopefully it’s nothing to serious.

              I tried…

              https://coronavirus-monitor.p.rapidapi.com/coronavirus/united_states_cases.php&api_key=xxx

              and received.

              {“message”:“Invalid API key. Go to https://docs.rapidapi.com/docs/keys for more info.”}

              RapidAPI does see it’s free service. I’ve amened the entries in node_helper.js back to the their defaults but still no joy there. Very strange.

              S 1 Reply Last reply Jan 24, 2021, 11:25 PM Reply Quote 0
              • S Away
                sdetweil @dubalda
                last edited by sdetweil Jan 24, 2021, 11:30 PM Jan 24, 2021, 11:25 PM

                @dubalda free and requiring a key are different.

                if u require a key you know who consumes your service

                i said dont take my words exactly.

                what does the service say is the apikey parameter name, exact spelling

                this aint magic, its grunt work getting the parms right

                i do my.own covid charts MyCovid19, see

                https://github.com/sdetweil/MyCovid19

                they have changed the data on me 3 times in a year. hard to keep up

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dubalda
                  last edited by Jan 24, 2021, 11:34 PM

                  I’ve tried…

                  curl -H “x-rapidapi-host: coronavirus-monitor-v2.p.rapidapi.com” -H “x-rapidapi-key: xxx” ‘https://coronavirus-monitor-v2.p.rapidapi.com/coronavirus/cases_by_country.php’

                  And have copied the key (copy/paste) exactly from the website but get the message…

                  “message”:“You are not subscribed to this API.”

                  I think I’ll just get the Covid numbers from the news! Thanks for your help @sdetweil !

                  S 1 Reply Last reply Jan 25, 2021, 12:19 AM Reply Quote 0
                  • S Away
                    sdetweil @dubalda
                    last edited by Jan 25, 2021, 12:19 AM

                    @dubalda see

                    https://docs.rapidapi.com/docs/basics-creating-a-project

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      dubalda
                      last edited by Jan 25, 2021, 12:26 AM

                      Thanks…I’ll have a look.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 7
                      • 6 / 7
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy