Coder Social home page Coder Social logo

coronavirusapi's Introduction

CoronaVirusApi

๐Ÿฆ  A django-rest-framework based API for Covid-19. ๐ŸŒ-wide statistics including fields below :

  • Country ๐Ÿ‡ฎ๐Ÿ‡ท
  • Total Cases ๐Ÿ˜ท
  • New Cases ๐Ÿ†•
  • Total Deaths โšฐ๏ธ
  • New Deaths ๐Ÿ†•
  • Total Recovered โœ…
  • Active Cases ๐Ÿ†˜
  • Total Tests ๐Ÿ’‰
  • Population ๐Ÿ˜๏ธ
  • Continent ๐Ÿ—บ๏ธ

Information based on https://www.worldmeters.com, get updated every hour(simply modifiable).

List-view

If you want to get all the json-formatted information of the whole world and all other 220 countries, endpoint is api. e.g. the url would be http://127.0.0.1:8000/api on your localhost.

A specific country?

If you want to retrieve information of a desired country, you just need to get to this url format : http://127.0.0.1:8000/api/{country}. e.g. http://127.0.0.1:8000/api/iran.


NOTE !

country should be in lower-case format and countries with more than 1 part, like Saudi Arabia, will be accessed at http://127.0.0.1:8000/api/saudi-arabia.


Search

Isn't it cool to search among countries and continents ? you can easily search via this url : http://127.0.0.1:8000/api/?q=rus. In the latter example, it will return a list of information consists of countries or continents containing rus.

Ordering

You are able to order the data both Asc and Desc based on Total Cases, Total Deaths, Total Recovered. ordering param is ordering. So, an example could be this url : http://127.0.0.1:8000/api/ordering=total_deaths for Asc and simply add a - before param for Desc ordering.

Contributions

All welcomed ๐Ÿ™๐Ÿป

coronavirusapi's People

Contributors

hossshakiba avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.