Git Product home page Git Product logo

napi's Introduction

NAPI

An API which gives data on all Nobel laureates.

GitHub issues GitHub forks GitHub stars GitHub license GitHub repo size Lines of code GitHub Release Date GitHub last commit

This API's source data is taken from public dataset here.

What is different here :

This API do not have any database, and uses an external JSON file. The API structures and provides various queries using client-side SQL like module called alasql.

Routes :

Users can access the list of routes mentioned below to get JSON data.

  • HOME ROUTE : This route is the home route of the API. This route can be accessed by https://nobelapi.herokuapp.com/

    example : NAPI_Home_Route

  • NAME : This route gives the Nobel laureates data based on their name. To access this route, https://nobelapi.herokuapp.com/name/{name_of_laureate}

    example :

    Req : https://nobelapi.herokuapp.com/name/rogerpenrose

    Res :

    {
    "id": "988",
    "firstname": "Roger",
    "surname": "Penrose",
    "born": "1931-08-08",
    "died": "0000-00-00",
    "bornCountry": "United Kingdom",
    "bornCountryCode": "GB",
    "bornCity": "Colchester",
    "gender": "male",
    "prizes": [
    {
    "year": "2020",
    "category": "physics",
    "share": "2",
    "motivation": "\"for the discovery that black hole formation is a robust prediction of the general theory of relativity\"",
    "affiliations": [
    {
    "name": "University of Oxford",
    "city": "Oxford",
    "country": "United Kingdom"
    }
    ]
    }
    ]
    }
    
  • BORNAT : This route gives a list of laureates for the given born country code.This route can be accessed by https://nobelapi.herokuapp.com/bornat/{Country_Code}

    example :

    Req : https://nobleapi.herokuapp.com/bornat/IN

    Res : Use the below url to get a view of response.

    https://gist.github.com/code-reaper08/4645b73ef92a6f029ab4aa6225742612

  • DIEDAT : This route gives a list of laureates for the given died country code.This route can be accessed using https://nobelapi.herokuapp.com/diedat/{Country_Code}

    example :

    Req : https://nobleapi.herokuapp.com/diedat/IN

    Res : Use the below url to get a view of response.

    https://gist.github.com/code-reaper08/fcdceeb9d809dc3cf0c829b9350b88ed

  • GENDER : This gives a list of laureates for a given gender.This can be accessed using https://nobelapi.herokuapp.com/gender/{GENDER}. The parameter {GENDER} should be a male or female in Lowercase.

    example :

    Req : https://nobleapi.herokuapp.com/gender/female

    Res : Use the below url to get a view of response.

    https://gist.github.com/code-reaper08/31235c8af64c55edc38a193593c8bb42

  • GENDER AND BORN COUNTRY : This gives a list of laureates for a given gender born at given country. This can be accessed using https://nobelapi.herokuapp.com/{GENDER}/{Country_Code}. Here {Country_Code}denotes the born country.

    example :

    Req : https://nobleapi.herokuapp.com/gender/female/PL

    Res : Use the below url to get a view of response.

    https://gist.github.com/code-reaper08/29d55cc2668021e57f3e8cb0059710a9

  • BORNAT AND DIEDAT : This gives a a list of laureates based on their born country and died country. One can combine parameters to get desired results using this route. This route can be accessed by https://nobelapi.herokuapp.com/bornat/{Country_Code_1}/diedat/{Country_code_2}. Here Country_Code_1 denotes born country and Country_Code_2 denotes died country.

    example :

    Req : https://nobleapi.herokuapp.com/bornat/IN/diedat/IN

    Res : Use the below url to get a view of response.

    https://gist.github.com/code-reaper08/fef2c2bae52e5d96dbbc1b208b381304

Something's not right ?

Please open an issue, I'll be happy to look into it.

Need some more ?

Please open an issue again, clearly stating, what feautre you would like to add. We'll make it better.

License:

    MIT License

    Copyright (c) 2021 Vishwa.R

napi's People

Contributors

code-reaper08 avatar

Stargazers

 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.