{
  "swagger": "2.0",
  "info": {
    "contact": {}
  },
  "paths": {
    "/bloomblog/comment/action": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "This endpoint allows users to perform actions on comments, including adding a new comment, replying to a comment, or deleting a comment.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "comment"
        ],
        "summary": "Perform actions on comments",
        "parameters": [
          {
            "description": "Comment action parameters",
            "name": "comment",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handlers.CommentActionParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response with the result of the comment action",
            "schema": {
              "$ref": "#/definitions/comment.BloomblogCommentActionResponse"
            }
          },
          "400": {
            "description": "Bad request or validation error",
            "schema": {
              "$ref": "#/definitions/comment.BloomblogCommentActionResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/comment.BloomblogCommentActionResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/comment.BloomblogCommentActionResponse"
            }
          }
        }
      }
    },
    "/bloomblog/comment/list": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "This endpoint retrieves the list of comments associated with a specific post. Users must provide a valid token and the post ID.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "comment"
        ],
        "summary": "Get comments for a post",
        "parameters": [
          {
            "type": "integer",
            "description": "ID of the post to fetch comments for",
            "name": "post_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Response containing the list of comments",
            "schema": {
              "$ref": "#/definitions/comment.BloomblogCommentListResponse"
            }
          },
          "400": {
            "description": "Bad request or validation error",
            "schema": {
              "$ref": "#/definitions/comment.BloomblogCommentListResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/comment.BloomblogCommentListResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/comment.BloomblogCommentListResponse"
            }
          }
        }
      }
    },
    "/bloomblog/comment/sl-list": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "This endpoint retrieves the list of sub-comments associated with a specific parent comment. Users must provide a valid token and the parent comment ID.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "comment"
        ],
        "summary": "Get sub-comments for a comment",
        "parameters": [
          {
            "type": "integer",
            "description": "ID of the parent comment to fetch sub-comments for",
            "name": "parent_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Response containing the list of sub-comments",
            "schema": {
              "$ref": "#/definitions/comment.Bloomblog_SlCommentListResponse"
            }
          },
          "400": {
            "description": "Bad request or validation error",
            "schema": {
              "$ref": "#/definitions/comment.Bloomblog_SlCommentListResponse"
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/comment.Bloomblog_SlCommentListResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/comment.Bloomblog_SlCommentListResponse"
            }
          }
        }
      }
    },
    "/bloomblog/favorite/action": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "This endpoint allows a user to favorite or unfavorite a post. The user must provide a valid JWT token in the Authorization header.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "favorite"
        ],
        "summary": "Perform favorite action on a post",
        "parameters": [
          {
            "description": "Favorite Action Parameters",
            "name": "FavoriteAction",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handlers.FavoriteActionParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Action performed successfully",
            "schema": {
              "$ref": "#/definitions/favorite.BloomblogFavoriteActionResponse"
            }
          },
          "400": {
            "description": "Invalid request",
            "schema": {
              "$ref": "#/definitions/favorite.BloomblogFavoriteActionResponse"
            }
          },
          "401": {
            "description": "Unauthorized, invalid token",
            "schema": {
              "$ref": "#/definitions/favorite.BloomblogFavoriteActionResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/favorite.BloomblogFavoriteActionResponse"
            }
          }
        }
      }
    },
    "/bloomblog/favorite/list": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "retrieve the favorite list of a user",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "favorite"
        ],
        "summary": "retrieve the favorite list of a user",
        "parameters": [
          {
            "type": "integer",
            "description": "userid",
            "name": "user_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Action performed successfully",
            "schema": {
              "$ref": "#/definitions/favorite.BloomblogFavoriteListResponse"
            }
          },
          "400": {
            "description": "Invalid request",
            "schema": {
              "$ref": "#/definitions/favorite.BloomblogFavoriteListResponse"
            }
          },
          "401": {
            "description": "Unauthorized, invalid token",
            "schema": {
              "$ref": "#/definitions/favorite.BloomblogFavoriteListResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/favorite.BloomblogFavoriteListResponse"
            }
          }
        }
      }
    },
    "/bloomblog/feed/getfeed": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "This endpoint allows users to fetch feed data using the latest timestamp and an optional authentication token.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "feed"
        ],
        "summary": "Retrieve feed",
        "parameters": [
          {
            "type": "integer",
            "description": "The timestamp for the latest feed item (optional). Defaults to now if not provided.",
            "name": "latest_time",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful operation, returns the feed data.",
            "schema": {
              "$ref": "#/definitions/feed.BloomblogFeedResponse"
            }
          },
          "400": {
            "description": "Invalid input data, such as malformed timestamp.",
            "schema": {
              "$ref": "#/definitions/feed.BloomblogFeedResponse"
            }
          },
          "500": {
            "description": "Internal server error.",
            "schema": {
              "$ref": "#/definitions/feed.BloomblogFeedResponse"
            }
          }
        }
      }
    },
    "/bloomblog/publish/action": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "This endpoint allows users to fetch another user's publishing list",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "publish"
        ],
        "summary": "get the publishing list",
        "parameters": [
          {
            "type": "string",
            "description": "The ID of the user to retrieve the following list for",
            "name": "user_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "The response object",
            "schema": {
              "$ref": "#/definitions/publish.BloomblogPublishListResponse"
            }
          },
          "400": {
            "description": "Invalid input data",
            "schema": {
              "$ref": "#/definitions/publish.BloomblogPublishListResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/publish.BloomblogPublishListResponse"
            }
          }
        }
      }
    },
    "/bloomblog/relation/action": {
      "post": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Handles actions like follow, unfollow, or other user relation actions.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Relation"
        ],
        "summary": "Perform a relation action",
        "parameters": [
          {
            "description": "Relation Action Parameters",
            "name": "relationAction",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handlers.RelationActionParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Action completed successfully",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationActionResponse"
            }
          },
          "400": {
            "description": "Invalid input parameters",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationActionResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationActionResponse"
            }
          }
        }
      }
    },
    "/bloomblog/relation/followerlist": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieves the list of users that follow the specified user.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Relation"
        ],
        "summary": "Get follower list",
        "parameters": [
          {
            "type": "string",
            "description": "The ID of the user to retrieve the follower list for",
            "name": "user_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved follower list",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationFollowerListResponse"
            }
          },
          "400": {
            "description": "Invalid input parameters",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationFollowerListResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationFollowerListResponse"
            }
          }
        }
      }
    },
    "/bloomblog/relation/followlist": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Retrieves the list of users that a specific user is following.",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "Relation"
        ],
        "summary": "Get following list",
        "parameters": [
          {
            "type": "string",
            "description": "The ID of the user to retrieve the following list for",
            "name": "user_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved following list",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationFollowListResponse"
            }
          },
          "400": {
            "description": "Invalid input parameters",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationFollowListResponse"
            }
          },
          "500": {
            "description": "Internal server error",
            "schema": {
              "$ref": "#/definitions/relation.BloomblogRelationFollowListResponse"
            }
          }
        }
      }
    },
    "/bloomblog/user/getuserbyid": {
      "get": {
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "description": "Get user information by ID and token",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "User"
        ],
        "summary": "Get User by ID",
        "parameters": [
          {
            "type": "string",
            "description": "User ID",
            "name": "user_id",
            "in": "query",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/user.BloomBlogUserResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/errno.ErrNo"
            }
          }
        }
      }
    },
    "/bloomblog/user/login": {
      "post": {
        "description": "Authenticate user with username and password",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "User"
        ],
        "summary": "User Login",
        "parameters": [
          {
            "description": "User login data",
            "name": "loginParam",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handlers.UserRegisterParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/user.BloomBlogUserRegisterResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/errno.ErrNo"
            }
          }
        }
      }
    },
    "/bloomblog/user/register": {
      "post": {
        "description": "Register a new user",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "tags": [
          "User"
        ],
        "summary": "User Registration",
        "parameters": [
          {
            "description": "User registration data",
            "name": "registerParam",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/handlers.UserRegisterParam"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "schema": {
              "$ref": "#/definitions/user.BloomBlogUserRegisterResponse"
            }
          },
          "400": {
            "description": "Bad Request",
            "schema": {
              "$ref": "#/definitions/errno.ErrNo"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "comment.BloomblogCommentActionResponse": {
      "type": "object",
      "properties": {
        "comment": {
          "description": "评论成功返回评论内容，不需要重新拉取整个列表",
          "allOf": [
            {
              "$ref": "#/definitions/comment.Comment"
            }
          ]
        },
        "status_code": {
          "description": "状态码，0-成功，其他值-失败",
          "type": "integer"
        },
        "status_msg": {
          "type": "string"
        }
      }
    },
    "comment.BloomblogCommentListResponse": {
      "type": "object",
      "properties": {
        "comment_list": {
          "description": "评论列表",
          "type": "array",
          "items": {
            "$ref": "#/definitions/comment.Comment"
          }
        },
        "status_code": {
          "description": "状态码，0-成功，其他值-失败",
          "type": "integer"
        },
        "status_msg": {
          "description": "返回状态描述",
          "type": "string"
        }
      }
    },
    "comment.Bloomblog_SlCommentListResponse": {
      "type": "object",
      "properties": {
        "comment_list": {
          "description": "评论列表",
          "type": "array",
          "items": {
            "$ref": "#/definitions/comment.Comment"
          }
        },
        "status_code": {
          "description": "状态码，0-成功，其他值-失败",
          "type": "integer"
        },
        "status_msg": {
          "description": "返回状态描述",
          "type": "string"
        }
      }
    },
    "comment.Comment": {
      "type": "object",
      "properties": {
        "content": {
          "description": "评论内容",
          "type": "string"
        },
        "create_date": {
          "description": "评论发布日期，格式 mm-dd",
          "type": "string"
        },
        "id": {
          "description": "视频评论id",
          "type": "integer"
        },
        "user": {
          "description": "评论用户信息",
          "allOf": [
            {
              "$ref": "#/definitions/user.User"
            }
          ]
        }
      }
    },
    "errno.ErrNo": {
      "type": "object",
      "properties": {
        "errCode": {
          "type": "integer"
        },
        "errMsg": {
          "type": "string"
        }
      }
    },
    "favorite.BloomblogFavoriteActionResponse": {
      "type": "object",
      "properties": {
        "status_code": {
          "description": "状态码，0-成功，其他值-失败",
          "type": "integer"
        },
        "status_msg": {
          "description": "返回状态描述",
          "type": "string"
        }
      }
    },
    "favorite.BloomblogFavoriteListResponse": {
      "type": "object",
      "properties": {
        "post_list": {
          "description": "用户点赞视频列表",
          "type": "array",
          "items": {
            "$ref": "#/definitions/feed.Post"
          }
        },
        "status_code": {
          "description": "状态码，0-成功，其他值-失败",
          "type": "integer"
        },
        "status_msg": {
          "description": "返回状态描述",
          "type": "string"
        }
      }
    },
    "feed.BloomblogFeedResponse": {
      "type": "object",
      "properties": {
        "next_time": {
          "description": "返回的帖子中最早的时间，用于下次请求",
          "type": "integer"
        },
        "post_list": {
          "description": "帖子列表",
          "type": "array",
          "items": {
            "$ref": "#/definitions/feed.Post"
          }
        },
        "status_code": {
          "description": "状态码，0-成功，其他值-失败",
          "type": "integer"
        },
        "status_msg": {
          "description": "返回状态描述",
          "type": "string"
        }
      }
    },
    "feed.Post": {
      "type": "object",
      "properties": {
        "author": {
          "description": "发帖用户信息",
          "allOf": [
            {
              "$ref": "#/definitions/user.User"
            }
          ]
        },
        "comment_count": {
          "description": "评论总数",
          "type": "integer"
        },
        "cover_url": {
          "type": "string"
        },
        "id": {
          "description": "帖子唯一标识",
          "type": "integer"
        },
        "image_urls": {
          "description": "帖子的图片地址列表",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "is_liked": {
          "description": "当前用户是否已点赞",
          "type": "boolean"
        },
        "like_count": {
          "description": "点赞总数",
          "type": "integer"
        },
        "modified_at": {
          "description": "帖子的修改时间",
          "type": "integer"
        },
        "text_content": {
          "description": "帖子的文字内容",
          "type": "string"
        },
        "title": {
          "description": "帖子标题",
          "type": "string"
        }
      }
    },
    "handlers.CommentActionParam": {
      "type": "object",
      "properties": {
        "action_type": {
          "type": "integer"
        },
        "comment_id": {
          "type": "integer"
        },
        "content": {
          "type": "string"
        },
        "parent_id": {
          "type": "integer"
        },
        "post_id": {
          "type": "integer"
        },
        "reply_id": {
          "type": "integer"
        },
        "token": {
          "type": "string"
        },
        "user_id": {
          "type": "integer"
        }
      }
    },
    "handlers.FavoriteActionParam": {
      "type": "object",
      "properties": {
        "action_type": {
          "description": "1-点赞，2-取消点赞",
          "type": "integer"
        },
        "post_id": {
          "description": "视频id",
          "type": "integer"
        },
        "token": {
          "description": "用户鉴权token",
          "type": "string"
        },
        "user_id": {
          "description": "用户id",
          "type": "integer"
        }
      }
    },
    "handlers.RelationActionParam": {
      "type": "object",
      "properties": {
        "action_type": {
          "description": "1-关注，2-取消关注",
          "type": "integer"
        },
        "to_user_id": {
          "description": "对方用户id",
          "type": "integer"
        },
        "token": {
          "description": "用户鉴权token",
          "type": "string"
        },
        "user_id": {
          "description": "用户id",
          "type": "integer"
        }
      }
    },
    "handlers.UserRegisterParam": {
      "type": "object",
      "properties": {
        "password": {
          "description": "用户密码",
          "type": "string"
        },
        "username": {
          "description": "用户名",
          "type": "string"
        }
      }
    },
    "publish.BloomblogPublishActionResponse": {
      "type": "object",
      "properties": {
        "status_code": {
          "description": "状态码，0-成功，其他值-失败",
          "type": "integer"
        },
        "status_msg": {
          "description": "返回状态描述",
          "type": "string"
        }
      }
    },
    "publish.BloomblogPublishListResponse": {
      "type": "object",
      "properties": {
        "post_list": {
          "description": "用户发布的帖子列表",
          "type": "array",
          "items": {
            "$ref": "#/definitions/feed.Post"
          }
        },
        "status_code": {
          "description": "状态码，0-成功，其他值-失败",
          "type": "integer"
        },
        "status_msg": {
          "description": "返回状态描述",
          "type": "string"
        }
      }
    },
    "relation.BloomblogRelationActionResponse": {
      "type": "object",
      "properties": {
        "status_code": {
          "description": "0-success，others-failure",
          "type": "integer"
        },
        "status_msg": {
          "description": "return statement description",
          "type": "string"
        }
      }
    },
    "relation.BloomblogRelationFollowListResponse": {
      "type": "object",
      "properties": {
        "status_code": {
          "description": "0-success others-failure",
          "type": "integer"
        },
        "status_msg": {
          "description": "status description",
          "type": "string"
        },
        "user_list": {
          "description": "user list",
          "type": "array",
          "items": {
            "$ref": "#/definitions/user.User"
          }
        }
      }
    },
    "relation.BloomblogRelationFollowerListResponse": {
      "type": "object",
      "properties": {
        "status_code": {
          "type": "integer"
        },
        "status_msg": {
          "type": "string"
        },
        "user_list": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/user.User"
          }
        }
      }
    },
    "user.BloomBlogUserRegisterResponse": {
      "type": "object",
      "properties": {
        "status_code": {
          "description": "status code, 0 for success, others for failure",
          "type": "integer"
        },
        "status_msg": {
          "description": "description for status",
          "type": "string"
        },
        "token": {
          "description": "credential token",
          "type": "string"
        },
        "user_id": {
          "description": "user id",
          "type": "integer"
        }
      }
    },
    "user.BloomBlogUserResponse": {
      "type": "object",
      "properties": {
        "status_code": {
          "description": "status code, 0 for success, others for failure",
          "type": "integer"
        },
        "status_msg": {
          "description": "description for status",
          "type": "string"
        },
        "user": {
          "description": "user information",
          "allOf": [
            {
              "$ref": "#/definitions/user.User"
            }
          ]
        }
      }
    },
    "user.User": {
      "type": "object",
      "properties": {
        "follow_count": {
          "description": "follow count",
          "type": "integer"
        },
        "follower_count": {
          "description": "followers count",
          "type": "integer"
        },
        "id": {
          "description": "user id",
          "type": "integer"
        },
        "is_follow": {
          "description": "true-followed，false-not followed",
          "type": "boolean"
        },
        "name": {
          "description": "user name",
          "type": "string"
        }
      }
    }
  },
  "securityDefinitions": {
    "BearerAuth": {
      "type": "apiKey",
      "name": "Authorization",
      "in": "header"
    }
  }
}