Answer the question
In order to leave comments, you need to log in
How to design api?
How to design api. For example, there is a layout https://webmarce.com/html/musicbeat/index-two.html it has several components
Menu
Slider
Block Recent Releases
Block Tour Schedule
Block Our Gallery
Block Upcoming Events
Block Latest Albums
Block Our Band Members
Footer
Me separately address
return this.menuService.findAll();
return this.sliderService.findAll();
return this.recent Service.findAll(); // limit 3
...
data: [
Menu : {},
Slider: {},
Block Recent Releases: {}
]
return this.homeService.findAll();
[
{
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
},
{
"userId": 1,
"id": 2,
"title": "qui est esse",
"body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla"
},
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question