Skip to content

The API must also provide an endpoint that returns the family tree of a certain individual containing all possible ascendants up to that level.

Notifications You must be signed in to change notification settings

gabriellmandelli/family-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

family-tree - Family tree

🚀 About this project

The API must also provide an endpoint that returns the family tree of a certain individual containing all possible ascendants up to that level.

📋 Dependencies

These are some dependencies used in this repository:

⚒ Requirements

☕ Running

Running with docker:

Start image:

make start-env

Rebuild image and run

make rebuild-env

🤔 How it works

Request to persist person:

curl --request POST \
  --url http://localhost:8080/v1/person \
  --header 'Content-Type: application/json' \
  --data '{
	"name": "Eu"
}'

Request to get person:

curl --request GET \
  --url http://localhost:8080/v1/person \
  --header 'Content-Type: application/json'

Request to persist relationship:

curl --request POST \
  --url http://localhost:8080/v1/relationship \
  --header 'Content-Type: application/json' \
  --data '{
	"parent_id": "61886a0a29cb6d591f138658",
	"children_id": "61886a0429cb6d591f138654"
}'

Request to get relationship:

curl --request GET \
  --url http://localhost:8080/v1/relationship \
  --header 'Content-Type: application/json'

Request to get family tree:

curl --request GET \
  --url http://localhost:8080/v1/familytree/61886a0229cb6d591f138653 \
  --header 'Content-Type: application/json'

About

The API must also provide an endpoint that returns the family tree of a certain individual containing all possible ascendants up to that level.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published