Перейти к основному содержимому

home

Home page uchun ketma-ketlikda api response tayyorlanadi.

Main promo Media model dan foydalanib malumot tayyorlab olamiz. Misol uchun bunday:

{
"left": {
"id": 1,
"type": "main_left",
"product": null,
"title": "Incredible speed and battery life?",
"body": "no description",
"image": "https://api.markt.circle.uz/storage/20/promo.mp4"
},
"right": {
"id": 2,
"type": "main_right",
"product": {
"id": 24,
"slug": "nitro-g3-15",
"title": "Nitro G3 15",
"price": "20000000",
"thumbnail": "https://api.markt.circle.uz/storage/35/conversions/mitro-thumbnail.jpg",
"brand": {
"id": 4,
"slug": "hp",
"title": "hp"
},
},
"title": "Any case. Any band. Any style you want.",
"body": "from $399",
"image": "https://api.markt.circle.uz/storage/21/promo.png"
}
}

Figma preview

Top category api bizni holatimizda category va subcategory mavjud category_id=null bu top category bo'ladi shu bo'yicha filter qilingan list chiqariladi.

{
"data": [
{
"id": 1,
"slug": "smartphones-and-gadgets",
"type": "categories",
"title": "smartphones and gadgets",
"image": "https://api.markt.circle.uz/storage/17/smartphones.png"
},
{
"id": 7,
"slug": "computers-and-laptops",
"type": "categories",
"title": "computers and laptops",
"image": "https://api.markt.circle.uz/storage/18/laptop.png"
},
{
"id": 10,
"slug": "pc-components",
"type": "categories",
"title": "PC components",
"image": "https://api.markt.circle.uz/storage/19/components.png"
}
]
}

Figma preview

Tag api design dagi bu product list tag bo'yicha tanlab olinga bizda boshqa taglar ham mavjud bo'lganligi uchun tag bo'yicha filter api bo'lishi kerakligi kelib chiqadi. Misol: tags/{unique}, lekin bu tag list emas project list qaytaradi

{
"data": [
{
"id": 24,
"slug": "nitro-g3-15",
"title": "Nitro G3 15",
"price": "20000000",
"thumbnail": "https://api.markt.circle.uz/storage/35/conversions/mitro-thumbnail.jpg",
"brand": {
"id": 4,
"slug": "hp",
"title": "hp"
},
"tags": [
{
"id": 1,
"slug": "new",
"type": "tags",
"title": "new"
}
]
},
{
"id": 25,
"slug": "apple-iphone-15-pro-max",
"title": "Apple iPhone 15 Pro Max",
"price": "16500000",
"thumbnail": "https://api.markt.circle.uz/storage/37/conversions/iphone-15-pro-max-thumbnail.jpg",
"brand": {
"id": 1,
"slug": "apple",
"title": "apple"
},
"tags": [
{
"id": 1,
"slug": "new",
"type": "tags",
"title": "new"
}
]
},
{
"id": 26,
"slug": "asus-vivobook",
"title": "ASUS Vivobook",
"price": "7000000",
"thumbnail": "https://api.markt.circle.uz/storage/38/conversions/asus_-thumbnail.jpg",
"brand": {
"id": 7,
"slug": "asus",
"title": "asus"
},
"tags": [
{
"id": 1,
"slug": "new",
"type": "tags",
"title": "new"
}
]
},

],
"links": {
"first": "https://api.markt.circle.uz/api/v1/products?page=1",
"last": "https://api.markt.circle.uz/api/v1/products?page=3",
"prev": null,
"next": "https://api.markt.circle.uz/api/v1/products?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 3,
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https://api.markt.circle.uz/api/v1/products?page=1",
"label": "1",
"active": true
},
{
"url": "https://api.markt.circle.uz/api/v1/products?page=2",
"label": "2",
"active": false
},
{
"url": "https://api.markt.circle.uz/api/v1/products?page=3",
"label": "3",
"active": false
},
{
"url": "https://api.markt.circle.uz/api/v1/products?page=2",
"label": "Next »",
"active": false
}
],
"path": "https://api.markt.circle.uz/api/v1/products",
"per_page": 20,
"to": 20,
"total": 59
}
}

Figma preview