Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Duke Yin

    (@freeduke)

    Yeah, the order of continents had been changed form api data, will fix this with next release.
    Thank you for reporting this.

    Plugin Author Duke Yin

    (@freeduke)

    @jakubgrac
    Hi, new version is online, the “wrong continent data” issue is now fixed. ??

    Thank you.

    Thread Starter Jakub

    (@jakubgrac)

    Hi, thanks and again new order in API ?? Europe data3 and SA data 2 … not possible fetch data by continent name?

    Plugin Author Duke Yin

    (@freeduke)

    This is actually to reduce the number of requests, which is related to the operation mode of this plugin.

    If we request separately, there will be performance problems for both user websites and the API. ??

    Thread Starter Jakub

    (@jakubgrac)

    thought from this url https://corona.lmao.ninja/v2/continents, not possible (i dont know ?? ) fetch data by continens name instead of data[1] etc?

    Plugin Author Duke Yin

    (@freeduke)

    You are right, this is definitely a big issue, I will keep working on the possibilities of getting right data from one request.

    Thank you ??

    Thread Starter Jakub

    (@jakubgrac)

    I using now this function for fetch data by continent name, so dont worry if order change again ??

            const continentToAbbr = {"Europe": "eu", "Asia": "as", "North America": "na", "South America": "sa", "Africa": "af", "Australia/Oceania": "oa"};
            
    		$.getJSON(urlc, function(data, status) {
                
        for (const item of data) {
             
            $("#cov-" + continentToAbbr[item["continent"]] + "-cases").append(item["cases"]).digits();
            $("#cov-" + continentToAbbr[item["continent"]] + "-recoverd").append(item["recovered"]).digits();
            $("#cov-" + continentToAbbr[item["continent"]] + "-dead").append(item["deaths"]).digits(); 
            $("#cov-" + continentToAbbr[item["continent"]] + "-active").append(item["active"]).digits();      
            $("#cov-" + continentToAbbr[item["continent"]] + "-today-case").append(item["todayCases"]).digits();       
            $("#cov-" + continentToAbbr[item["continent"]] + "-today-deaths").append(item["todayDeaths"]).digits();       
            $("#cov-" + continentToAbbr[item["continent"]] + "-critical").append(item["critical"]).digits();       
            $("#cov-" + continentToAbbr[item["continent"]] + "-tests").append(item["tests"]).digits();            
           }   
    Plugin Author Duke Yin

    (@freeduke)

    Good job @jakubgrac ! Thank you ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Wrong Continents data’ is closed to new replies.