Skip to content

MilesHamilton/Country-Happiness-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Country Happiness Data RESTFUL API

These are bare-bones intructions on how to CRUD the data

Run the app

navigate to the APP via browser or Postman here

Run the tests

REST API

The REST API to the example app is described below.

Get list of Things

Request

GET /thing/number or string

Ex. Response

    _id: "5edbd5e8d35b5e7eca0d39d0",
Overall rank: 3,
Country or region: "Norway",
Score: 7.554,
GDP per capita: 1.488,
Social support: 1.582,
Healthy life expectancy: 1.028,
Freedom to make life choices: 0.603,
Generosity: 0.271,
Perceptions of corruption: 0.341,
__v: 0

Create a new Thing

Request

POST /thing/number or string

Ex. Response

    _id: "5edbd5e8d35b5e7eca0d39d0",
Overall rank: 3,
Country or region: "Norway",
Score: 7.554,
GDP per capita: 1.488,
Social support: 1.582,
Healthy life expectancy: 1.028,
Freedom to make life choices: 0.603,
Generosity: 0.271,
Perceptions of corruption: 0.341,
__v: 0  

{"id":1,"name":"Foo","status":"new"}

Get a specific Thing

Request

DELETE /thing/

Response

_id: "5edbd5e8d35b5e7eca0d39d0",
Overall rank: 3,
Country or region: "Norway",
Score: 7.554,
GDP per capita: 1.488,
Social support: 1.582,
Healthy life expectancy: 1.028,
Freedom to make life choices: 0.603,
Generosity: 0.271,
Perceptions of corruption: 0.341,
__v: 0

DELETED

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors