#pragma once // Spec: models.md Feed (+ Model Updates replacingPosts). daily_topic is intentionally not decoded. #include #include #include #include #include "core/Date.hpp" #include "core/Json.hpp" #include "model/Post.hpp" #include "model/User.hpp" namespace dp { struct Feed { std::vector posts; std::string currentTab; std::optional currentTopic; std::string search; std::optional nextCursor; std::int64_t totalMembers = 0; std::int64_t postsToday = 0; std::int64_t totalProjects = 0; std::int64_t totalGists = 0; std::vector topAuthors; static Feed fromJson(const Json& j); Feed replacingPosts(const std::vector& newPosts) const; }; } // namespace dp