当前位置: 首页 > 文档资料 > EOS.IO 中文文档 >

EOSFans API 数据类型

优质
小牛编辑
133浏览
2023-12-01

UserSerializer

用户 API 返回数据结构

attributes

  • id [Integer] 用户编号
  • login [String] 用户名
  • name [String] 用户姓名
  • avatar_url [String] 头像 URL

UserDetailSerializer

用户详细信息 API 返回数据结构

attributes

  • id [Integer] 用户编号
  • login [String] 用户名
  • name [String] 用户姓名
  • avatar_url [String] 头像 URL
  • location [String] 城市
  • company [String] 公司名称
  • github [String] GitHub ID
  • twitter [String] Twitter ID
  • website [String] 个人主页 URL
  • bio [String] 个人介绍
  • tagline [String] 一段话的简单个人介绍
  • email [String] Email 地址
  • topics_count [Integer] 用户创建的话题数量
  • replies_count [Integer] 用户创建的回帖数量
  • following_count [Integer] 关注了多少人
  • followers_count [Integer] 有多少个关注者
  • favorites_count [Integer] 收藏的话题数量
  • level [String] 用户级别
  • level_name [String] 用户级别 (用于显示)
  • created_at [DateTime] 注册时间 iso8601 格式

TopicSerializer

话题信息,一般在列表返回的时候出现。

attributes

  • id [Integer] 话题编号
  • title [String] 标题
  • node_name [String] 节点名称
  • node_id [Integer] 节点 ID
  • excellent [Boolean] 是否精华
  • deleted [Boolean] 是否已删除
  • replies_count [Integer] 回帖数量
  • likes_count [Integer] 赞数量
  • last_reply_user_id [Integer] 最后回复人用户编号
  • last_reply_user_login [String] 最后回复者 login
  • user UserSerializer 最后回复者用户对象
  • replied_at [DateTime] 最后回帖时间
  • created_at [DateTime] 创建时间
  • updated_at [DateTime] 更新时间

TopicDetailSerializer

完整话题详情 话题信息

attributes

  • id [Integer] 话题编号
  • title [String] 标题
  • node_name [String] 节点名称
  • node_id [Integer] 节点 ID
  • excellent [Boolean] 是否精华
  • deleted [Boolean] 是否已删除
  • replies_count [Integer] 回帖数量
  • likes_count [Integer] 赞数量
  • last_reply_user_id [Integer] 最后回复人用户编号
  • last_reply_user_login [String] 最后回复者 login
  • user UserSerializer 最后回复者用户对象
  • closed_at [DateTime] 结帖时间,null 表示正常帖子
  • replied_at [DateTime] 最后回帖时间
  • created_at [DateTime] 创建时间
  • updated_at [DateTime] 更新时间
  • body [String] 话题正文,原始 Markdown
  • body_html [String] 以转换成 HTML 的正文
  • hits [Integer] 阅读次数

ReplySerializer

回帖信息

attributes

  • id [Integer] 编号
  • body_html [String] 以转换成 HTML 的正文
  • topic_id [Integer] 话题编号
  • deleted [Boolean] 是否已删除
  • likes_count [Integer] 赞数量
  • user UserSerializer 最后回复者用户对象
  • created_at [DateTime] 创建时间
  • updated_at [DateTime] 更新时间

ReplyDetailSerializer

包含原始正文 Markdown 信息的回帖

attributes

  • id [Integer] 编号
  • body_html [String] 以转换成 HTML 的正文
  • topic_id [Integer] 话题编号
  • deleted [Boolean] 是否已删除
  • likes_count [Integer] 赞数量
  • user UserSerializer 最后回复者用户对象
  • created_at [DateTime] 创建时间
  • updated_at [DateTime] 更新时间
  • topic_title [String] 话题标题
  • body [String] 回帖正文,原始 Markdown

NodeSerializer

节点详情

attributes

  • id [Integer] 编号
  • name [String] 节点名称
  • summary [String] 简介, Markdown 格式
  • section_id [Integer] 大类别编号
  • section_name [String] 大类别名称
  • topics_count [Integer] 话题数量
  • sort Integer 排序优先级
  • updated_at [DateTime] 更新时间

NotificationSerializer

attributes

  • id [Integer] 编号
  • type [String] 通知类型
  • read [Boolean] 是否已读
  • actor UserSerializer 动作发起者
  • mention_type [String] 提及的数据类型 Topic, Reply
  • created_at [DateTime] 创建时间
  • updated_at [DateTime] 更新时间