feat(personalized_feed): added fixtures for new feed, added new feed parsing and layout, added webview player for post videos

This commit is contained in:
misha
2026-07-20 16:47:19 +03:00
parent bd2de07b8f
commit 48a984f5e9
23 changed files with 1330 additions and 903 deletions

View File

@@ -0,0 +1,115 @@
{
"data": [
{
"id": 101,
"post_id": 1,
"post_author_id": 10,
"post_author_name": "Анна Иванова",
"post_author_image_url": "/storage/avatars/anna.png",
"post_author_profile_url": "/ru/profiles/anna-ivanova",
"post_created_at": "2024-06-01T10:00:00.000000Z",
"post_title": "Завтрак с овсянкой",
"post_short_description": "Простой и полезный завтрак",
"post_text_md": "Сегодня приготовила **овсянку** с ягодами.",
"post_image_url": "/storage/posts/oatmeal.jpg",
"images": [
{
"url": "/storage/posts/oatmeal-1.jpg",
"orientation": "horizontal"
},
{
"url": "/storage/posts/oatmeal-2.jpg",
"orientation": "vertical"
}
],
"video_embed_url": "https://rutube.ru/play/embed/08c00eb3a54c056aeca34f58d8fd1db8/",
"post_views_count": 120,
"post_likes_count": 15,
"post_comments_count": 4,
"post_is_liked_by_user": false,
"is_entity_subscribed_by_me": false,
"post_url": "/ru/blog_post/1",
"post_state": "active",
"video_url_thumb": "https://mike-dev-ach5iekohk4n.eatv.io/storage/3409/20260720-96266cae-5852-40c9-9692-0a4047e8c934.png",
"post_author_detailz_json": {
"slug": "anna-ivanova",
"is_consultant": true
},
"created_at": "2024-06-01T10:05:00.000000Z",
"updated_at": "2024-06-01T10:05:00.000000Z"
},
{
"id": 102,
"post_id": 2,
"post_author_id": 11,
"post_author_name": "Игорь Петров",
"post_author_image_url": "/storage/avatars/igor.png",
"post_author_profile_url": "/ru/profiles/igor-petrov",
"post_created_at": "2024-06-02T08:30:00.000000Z",
"post_title": "Тренировка дома",
"post_short_description": "Короткая тренировка без оборудования",
"post_text_md": "15 минут кардио и растяжка.",
"post_image_url": "/storage/posts/workout.jpg",
"images": [],
"video_embed_url": "https://www.youtube.com/embed/dQw4w9WgXcQ",
"post_views_count": 340,
"post_likes_count": 42,
"post_comments_count": 9,
"post_is_liked_by_user": true,
"is_entity_subscribed_by_me": true,
"post_url": "/ru/blog_post/2",
"post_state": "active",
"post_author_detailz_json": {
"slug": "igor-petrov",
"is_consultant": false
},
"created_at": "2024-06-02T08:35:00.000000Z",
"updated_at": "2024-06-02T09:00:00.000000Z"
},
{
"id": 103,
"post_id": 3,
"post_author_id": 12,
"post_author_name": "Мария Смирнова",
"post_author_image_url": null,
"post_author_profile_url": "/ru/profiles/maria-smirnova",
"post_created_at": "2024-06-03T14:15:00.000000Z",
"post_title": "Рецепт смузи",
"post_short_description": null,
"post_text_md": null,
"post_image_url": null,
"images": [
{
"url": "/storage/posts/smoothie.jpg",
"orientation": "horizontal"
}
],
"video_embed_url": "https://rutube.ru/play/embed/6a62f217aa99daf00af8fa6cebebf218/",
"post_views_count": 50,
"post_likes_count": 3,
"post_comments_count": 1,
"post_is_liked_by_user": false,
"is_entity_subscribed_by_me": null,
"post_url": "/ru/blog_post/3",
"post_state": "active",
"post_author_detailz_json": {
"slug": "maria-smirnova",
"is_consultant": false
},
"created_at": "2024-06-03T14:20:00.000000Z",
"updated_at": "2024-06-03T14:20:00.000000Z"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": "https://example.com/api/feed?cursor=eyJpZCI6MTAzfQ"
},
"meta": {
"path": "/api/feed",
"per_page": 20,
"next_cursor": "eyJpZCI6MTAzfQ",
"prev_cursor": null
}
}