getBlogsResponseToEntity static method
Implementation
static domain.GetBlogs getBlogsResponseToEntity(infra.GetBlogsResponse response) => domain.GetBlogs(
ok: response.ok,
data: domain.GetBlogsData(
page: response.data.page,
pageSize: response.data.pageSize,
totalPages: response.data.totalPages,
totalData: response.data.totalData,
blogPosts: response.data.blogPosts.map((blog) => domain.BlogPost(
id: blog.id,
admin: blog.admin,
archived: blog.archived,
atype: blog.atype,
category: blog.category,
executeDate: blog.executeDate,
extraPoints: blog.extraPoints,
moderation: blog.moderation,
ownerName: blog.ownerName,
points: blog.points,
state: blog.state,
team: blog.team,
permalink: blog.permalink,
shortUrl: blog.shortUrl,
facebookTabUrl: blog.facebookTabUrl,
votesCount: blog.votesCount,
votesAverage: blog.votesAverage,
votesUp: blog.votesUp,
votesDown: blog.votesDown,
title: blog.title,
body: blog.body,
editableBy: blog.editableBy,
deleteableBy: blog.deleteableBy,
voted: false,
createdAt: blog.createdAt,
format: blog.format,
tags: blog.tags,
participantsTags: blog.participantsTags,
authorName: blog.participant.name,
authorAvatar: blog.participant.avatar,
coverUrl: blog.coverUrl,
videoCoverUrl: blog.videoCoverUrl,
)).toList(),
),
);