# Generated with protoc-gen-openapi # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi openapi: 3.0.3 info: title: "" version: 0.0.1 paths: /api/v1/admin/videos: get: tags: - VideoService operationId: VideoService_ListAdminVideos parameters: - name: status in: query schema: type: string - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideosReply' /api/v1/admin/videos/reviews: get: tags: - VideoService operationId: VideoService_ListPendingReviewVideos parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideosReply' /api/v1/admin/videos/{bvid}: get: tags: - VideoService operationId: VideoService_GetAdminVideo parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.Video' delete: tags: - VideoService operationId: VideoService_DeleteAdminVideo parameters: - name: bvid in: path required: true schema: type: string - name: reason in: query schema: type: string responses: "200": description: OK content: {} /api/v1/admin/videos/{bvid}/approve: post: tags: - VideoService operationId: VideoService_ApproveVideo parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.ApproveVideoRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.Video' /api/v1/admin/videos/{bvid}/play: get: tags: - VideoService operationId: VideoService_GetReviewVideoPlay parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoPlay' /api/v1/admin/videos/{bvid}/reject: post: tags: - VideoService operationId: VideoService_RejectVideo parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.RejectVideoRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.Video' /api/v1/admin/videos/{bvid}/take-down: post: tags: - VideoService operationId: VideoService_TakeDownVideo parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.TakeDownVideoRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.Video' /api/v1/auth/login: post: tags: - UserService operationId: UserService_Login requestBody: content: application/json: schema: $ref: '#/components/schemas/user.v1.LoginRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/user.v1.LoginReply' /api/v1/auth/logout: post: tags: - UserService operationId: UserService_Logout requestBody: content: application/json: schema: $ref: '#/components/schemas/user.v1.LogoutRequest' required: true responses: "200": description: OK content: {} /api/v1/auth/refresh: post: tags: - UserService operationId: UserService_Refresh requestBody: content: application/json: schema: $ref: '#/components/schemas/user.v1.RefreshRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/user.v1.LoginReply' /api/v1/auth/register: post: tags: - UserService operationId: UserService_Register requestBody: content: application/json: schema: $ref: '#/components/schemas/user.v1.RegisterRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/user.v1.LoginReply' /api/v1/search/videos: get: tags: - VideoService operationId: VideoService_SearchVideos parameters: - name: query in: query schema: type: string - name: order in: query schema: type: integer format: enum - name: ownerId in: query schema: type: string - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.SearchVideosReply' /api/v1/users/me: get: tags: - UserService operationId: UserService_GetMe responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/user.v1.User' patch: tags: - UserService operationId: UserService_UpdateMe requestBody: content: application/json: schema: $ref: '#/components/schemas/user.v1.UpdateMeRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/user.v1.User' /api/v1/users/me/avatar: put: tags: - UserService operationId: UserService_UpdateMyAvatar requestBody: content: application/json: schema: type: string required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/user.v1.User' delete: tags: - UserService operationId: UserService_DeleteMyAvatar responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/user.v1.User' /api/v1/users/me/video-coins: get: tags: - VideoService operationId: VideoService_ListMyCoinedVideos parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideoHistoryReply' /api/v1/users/me/video-comments: get: tags: - VideoService operationId: VideoService_ListMyVideoComments parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideoCommentHistoryReply' /api/v1/users/me/video-favorites: get: tags: - VideoService operationId: VideoService_ListMyFavoriteVideos parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideoHistoryReply' /api/v1/users/me/video-likes: get: tags: - VideoService operationId: VideoService_ListMyLikedVideos parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideoHistoryReply' /api/v1/users/me/watch-history: get: tags: - VideoService operationId: VideoService_ListMyWatchHistory parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideoHistoryReply' /api/v1/users/{userId}: get: tags: - UserService operationId: UserService_GetUser parameters: - name: userId in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/user.v1.User' /api/v1/users/{userId}/videos: get: tags: - VideoService operationId: VideoService_ListUserVideos parameters: - name: userId in: path required: true schema: type: string - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideosReply' /api/v1/videos: get: tags: - VideoService operationId: VideoService_ListVideos parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideosReply' /api/v1/videos/recommended: get: tags: - VideoService operationId: VideoService_ListRecommendedVideos parameters: - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideosReply' /api/v1/videos/{bvid}: get: tags: - VideoService operationId: VideoService_GetVideo parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.Video' delete: tags: - VideoService operationId: VideoService_DeleteVideo parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: {} /api/v1/videos/{bvid}/coin: post: tags: - VideoService operationId: VideoService_CoinVideo parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.CoinVideoRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoEngagement' /api/v1/videos/{bvid}/comments: get: tags: - VideoService operationId: VideoService_ListVideoComments parameters: - name: bvid in: path required: true schema: type: string - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideoCommentsReply' post: tags: - VideoService operationId: VideoService_CreateVideoComment parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.CreateVideoCommentRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoComment' /api/v1/videos/{bvid}/comments/{commentId}: delete: tags: - VideoService operationId: VideoService_DeleteVideoComment parameters: - name: bvid in: path required: true schema: type: string - name: commentId in: path required: true schema: type: string responses: "200": description: OK content: {} /api/v1/videos/{bvid}/comments/{commentId}/like: post: tags: - VideoService operationId: VideoService_LikeVideoComment parameters: - name: bvid in: path required: true schema: type: string - name: commentId in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoCommentInteraction' delete: tags: - VideoService operationId: VideoService_UnlikeVideoComment parameters: - name: bvid in: path required: true schema: type: string - name: commentId in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoCommentInteraction' /api/v1/videos/{bvid}/comments/{rootCommentId}/replies: get: tags: - VideoService operationId: VideoService_ListVideoCommentReplies parameters: - name: bvid in: path required: true schema: type: string - name: rootCommentId in: path required: true schema: type: string - name: pageSize in: query schema: type: integer format: int32 - name: pageToken in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.ListVideoCommentsReply' /api/v1/videos/{bvid}/danmakus: post: tags: - VideoService operationId: VideoService_CreateDanmaku parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.CreateDanmakuRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.DanmakuItem' /api/v1/videos/{bvid}/danmakus/{danmakuId}: delete: tags: - VideoService operationId: VideoService_DeleteDanmaku parameters: - name: bvid in: path required: true schema: type: string - name: danmakuId in: path required: true schema: type: string responses: "200": description: OK content: {} /api/v1/videos/{bvid}/engagement: get: tags: - VideoService operationId: VideoService_GetVideoEngagement parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoEngagement' /api/v1/videos/{bvid}/favorite: post: tags: - VideoService operationId: VideoService_FavoriteVideo parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoEngagement' delete: tags: - VideoService operationId: VideoService_UnfavoriteVideo parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoEngagement' /api/v1/videos/{bvid}/like: post: tags: - VideoService operationId: VideoService_LikeVideo parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoLike' delete: tags: - VideoService operationId: VideoService_UnlikeVideo parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoLike' /api/v1/videos/{bvid}/play: get: tags: - VideoService operationId: VideoService_GetVideoPlay parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoPlay' /api/v1/videos/{bvid}/shares: post: tags: - VideoService operationId: VideoService_ShareVideo parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.ShareVideoRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoShare' /api/v1/videos/{bvid}/submit-review: post: tags: - VideoService operationId: VideoService_SubmitVideoForReview parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.SubmitVideoForReviewRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.Video' /api/v1/videos/{bvid}/upload-status: get: tags: - VideoService operationId: VideoService_GetVideoUploadStatus parameters: - name: bvid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoUploadStatus' /api/v1/videos/{bvid}/view-sessions: post: tags: - VideoService operationId: VideoService_StartVideoView parameters: - name: bvid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.StartVideoViewRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoViewSession' /api/v1/videos/{bvid}/view-sessions/{sessionId}:complete: post: tags: - VideoService operationId: VideoService_CompleteVideoView parameters: - name: bvid in: path required: true schema: type: string - name: sessionId in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/video.v1.CompleteVideoViewRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/video.v1.VideoViewResult' components: schemas: user.v1.LoginReply: type: object properties: accessToken: type: string expiresAt: type: string format: date-time user: $ref: '#/components/schemas/user.v1.User' refreshToken: type: string refreshExpiresAt: type: string format: date-time user.v1.LoginRequest: required: - username - password type: object properties: username: type: string password: type: string user.v1.LogoutRequest: type: object properties: accessToken: type: string description: Used by gRPC clients and as an HTTP fallback when no Bearer header is set. user.v1.RefreshRequest: required: - refreshToken type: object properties: refreshToken: type: string user.v1.RegisterRequest: required: - username - password - displayName type: object properties: username: type: string password: type: string displayName: type: string user.v1.UpdateMeRequest: required: - displayName type: object properties: displayName: type: string bio: type: string user.v1.User: type: object properties: id: type: string username: type: string displayName: type: string avatarUrl: type: string bio: type: string coinBalance: type: string isAdmin: type: boolean experience: type: string level: type: integer format: int32 video.v1.ApproveVideoRequest: required: - bvid type: object properties: bvid: type: string video.v1.CoinVideoRequest: required: - bvid - targetAmount type: object properties: bvid: type: string targetAmount: type: integer format: int32 video.v1.CompleteVideoViewRequest: required: - bvid - sessionId type: object properties: bvid: type: string sessionId: type: string video.v1.CreateDanmakuRequest: required: - bvid - text type: object properties: bvid: type: string timeSeconds: type: number format: double text: type: string color: type: string video.v1.CreateVideoCommentRequest: required: - bvid - content type: object properties: bvid: type: string content: type: string parentCommentId: type: string video.v1.DanmakuConfig: type: object properties: enabled: type: boolean format: type: string items: type: array items: $ref: '#/components/schemas/video.v1.DanmakuItem' video.v1.DanmakuItem: type: object properties: timeSeconds: type: number format: double text: type: string color: type: string id: type: string userId: type: string userName: type: string createdAt: type: string format: date-time video.v1.ListVideoCommentHistoryReply: type: object properties: items: type: array items: $ref: '#/components/schemas/video.v1.VideoCommentHistoryItem' nextPageToken: type: string video.v1.ListVideoCommentsReply: type: object properties: comments: type: array items: $ref: '#/components/schemas/video.v1.VideoComment' nextPageToken: type: string video.v1.ListVideoHistoryReply: type: object properties: items: type: array items: $ref: '#/components/schemas/video.v1.VideoHistoryItem' nextPageToken: type: string video.v1.ListVideosReply: type: object properties: videos: type: array items: $ref: '#/components/schemas/video.v1.Video' nextPageToken: type: string video.v1.RejectVideoRequest: required: - bvid - reason type: object properties: bvid: type: string reason: type: string video.v1.SearchVideosReply: type: object properties: videos: type: array items: $ref: '#/components/schemas/video.v1.Video' nextPageToken: type: string totalHits: type: string processingTimeMs: type: string video.v1.ShareVideoRequest: required: - bvid - requestId type: object properties: bvid: type: string requestId: type: string video.v1.StartVideoViewRequest: required: - bvid type: object properties: bvid: type: string video.v1.SubmitVideoForReviewRequest: required: - bvid - title type: object properties: bvid: type: string title: type: string description: type: string tags: type: array items: type: string video.v1.TakeDownVideoRequest: required: - bvid - reason type: object properties: bvid: type: string reason: type: string video.v1.Video: type: object properties: bvid: type: string title: type: string description: type: string ownerName: type: string ownerAvatarUrl: type: string coverUrl: type: string durationSeconds: type: string viewCount: type: string danmakuCount: type: string likeCount: type: string coinCount: type: string favoriteCount: type: string shareCount: type: string publishTime: type: string format: date-time tags: type: array items: type: string ownerId: type: string status: type: integer format: enum createdAt: type: string format: date-time updatedAt: type: string format: date-time commentCount: type: string reviewReason: type: string submittedAt: type: string format: date-time reviewedAt: type: string format: date-time video.v1.VideoComment: type: object properties: id: type: string bvid: type: string userId: type: string userName: type: string userAvatarUrl: type: string content: type: string createdAt: type: string format: date-time rootId: type: string parentId: type: string replyToUserId: type: string replyToUserName: type: string likeCount: type: string liked: type: boolean replyCount: type: string deleted: type: boolean video.v1.VideoCommentHistoryItem: type: object properties: video: $ref: '#/components/schemas/video.v1.Video' comment: $ref: '#/components/schemas/video.v1.VideoComment' video.v1.VideoCommentInteraction: type: object properties: commentId: type: string liked: type: boolean likeCount: type: string video.v1.VideoEngagement: type: object properties: bvid: type: string liked: type: boolean favorited: type: boolean myCoinAmount: type: integer format: int32 likeCount: type: string favoriteCount: type: string coinCount: type: string shareCount: type: string coinBalance: type: string video.v1.VideoHistoryItem: type: object properties: video: $ref: '#/components/schemas/video.v1.Video' interactedAt: type: string format: date-time coinAmount: type: integer format: int32 video.v1.VideoLike: type: object properties: bvid: type: string liked: type: boolean likeCount: type: string video.v1.VideoPlay: type: object properties: bvid: type: string streams: type: array items: $ref: '#/components/schemas/video.v1.VideoStream' danmaku: $ref: '#/components/schemas/video.v1.DanmakuConfig' video.v1.VideoShare: type: object properties: bvid: type: string shareCount: type: string video.v1.VideoStream: type: object properties: id: type: string label: type: string codec: type: string mimeType: type: string url: type: string width: type: integer format: int32 height: type: integer format: int32 bandwidth: type: integer format: int32 defaultStream: type: boolean video.v1.VideoUploadStatus: type: object properties: bvid: type: string status: type: integer format: enum failureReason: type: string manifestUrl: type: string coverUrl: type: string video.v1.VideoViewResult: type: object properties: counted: type: boolean viewCount: type: string remainingToday: type: integer format: int32 nextEligibleAt: type: string format: date-time video.v1.VideoViewSession: type: object properties: sessionId: type: string startedAt: type: string format: date-time tags: - name: UserService - name: VideoService