amagi 0.1.5

Rust SDK, CLI, and Web API service skeleton for multi-platform social web adapters.
Documentation
use super::super::{ApiMethodSpec, HttpMethod};
use super::{
    TAG_ARTICLE, TAG_AUTH, TAG_BANGUMI, TAG_CAPTCHA, TAG_COMMENT, TAG_DANMAKU, TAG_DYNAMIC,
    TAG_EMOJI, TAG_LIVE, TAG_TOOL, TAG_USER, TAG_WORK,
};

pub(super) const BILIBILI_METHODS: [ApiMethodSpec; 27] = [
    ApiMethodSpec {
        method_key: "videoInfo",
        chinese_name: "单个视频作品数据",
        fetcher_name: "fetchVideoInfo",
        route: "/video",
        http_method: HttpMethod::Get,
        description: "Fetch a Bilibili video payload.",
        tags: TAG_WORK,
    },
    ApiMethodSpec {
        method_key: "videoStream",
        chinese_name: "单个视频下载信息数据",
        fetcher_name: "fetchVideoStreamUrl",
        route: "/video/stream",
        http_method: HttpMethod::Get,
        description: "Fetch stream URLs for a Bilibili video.",
        tags: TAG_WORK,
    },
    ApiMethodSpec {
        method_key: "videoDanmaku",
        chinese_name: "视频弹幕分段数据",
        fetcher_name: "fetchVideoDanmaku",
        route: "/video/{cid}/danmaku",
        http_method: HttpMethod::Get,
        description: "Fetch one danmaku segment for a Bilibili video.",
        tags: TAG_DANMAKU,
    },
    ApiMethodSpec {
        method_key: "comments",
        chinese_name: "评论数据",
        fetcher_name: "fetchComments",
        route: "/comments",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili comments.",
        tags: TAG_COMMENT,
    },
    ApiMethodSpec {
        method_key: "commentReplies",
        chinese_name: "指定评论的回复",
        fetcher_name: "fetchCommentReplies",
        route: "/comment-replies",
        http_method: HttpMethod::Get,
        description: "Fetch replies to a Bilibili comment.",
        tags: TAG_COMMENT,
    },
    ApiMethodSpec {
        method_key: "userCard",
        chinese_name: "用户主页数据",
        fetcher_name: "fetchUserCard",
        route: "/user",
        http_method: HttpMethod::Get,
        description: "Fetch a Bilibili user card.",
        tags: TAG_USER,
    },
    ApiMethodSpec {
        method_key: "userDynamicList",
        chinese_name: "用户主页动态列表数据",
        fetcher_name: "fetchUserDynamicList",
        route: "/user/dynamics",
        http_method: HttpMethod::Get,
        description: "Fetch a Bilibili user's dynamic list.",
        tags: TAG_USER,
    },
    ApiMethodSpec {
        method_key: "userSpaceInfo",
        chinese_name: "用户空间详细信息",
        fetcher_name: "fetchUserSpaceInfo",
        route: "/user/space",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili user space details.",
        tags: TAG_USER,
    },
    ApiMethodSpec {
        method_key: "uploaderTotalViews",
        chinese_name: "获取UP主总播放量",
        fetcher_name: "fetchUploaderTotalViews",
        route: "/user/total-views",
        http_method: HttpMethod::Get,
        description: "Fetch total play counts for a Bilibili uploader.",
        tags: TAG_USER,
    },
    ApiMethodSpec {
        method_key: "dynamicDetail",
        chinese_name: "动态详情数据",
        fetcher_name: "fetchDynamicDetail",
        route: "/dynamic",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili dynamic details.",
        tags: TAG_DYNAMIC,
    },
    ApiMethodSpec {
        method_key: "dynamicCard",
        chinese_name: "动态卡片数据",
        fetcher_name: "fetchDynamicCard",
        route: "/dynamic/card",
        http_method: HttpMethod::Get,
        description: "Fetch a Bilibili dynamic card.",
        tags: TAG_DYNAMIC,
    },
    ApiMethodSpec {
        method_key: "bangumiInfo",
        chinese_name: "番剧基本信息数据",
        fetcher_name: "fetchBangumiInfo",
        route: "/bangumi",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili bangumi metadata.",
        tags: TAG_BANGUMI,
    },
    ApiMethodSpec {
        method_key: "bangumiStream",
        chinese_name: "番剧下载信息数据",
        fetcher_name: "fetchBangumiStreamUrl",
        route: "/bangumi/stream",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili bangumi stream URLs.",
        tags: TAG_BANGUMI,
    },
    ApiMethodSpec {
        method_key: "liveRoomInfo",
        chinese_name: "直播间信息",
        fetcher_name: "fetchLiveRoomInfo",
        route: "/live",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili live room details.",
        tags: TAG_LIVE,
    },
    ApiMethodSpec {
        method_key: "liveRoomInit",
        chinese_name: "直播间初始化信息",
        fetcher_name: "fetchLiveRoomInitInfo",
        route: "/live/init",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili live room init data.",
        tags: TAG_LIVE,
    },
    ApiMethodSpec {
        method_key: "articleContent",
        chinese_name: "专栏正文内容",
        fetcher_name: "fetchArticleContent",
        route: "/article/content",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili article body content.",
        tags: TAG_ARTICLE,
    },
    ApiMethodSpec {
        method_key: "articleCards",
        chinese_name: "专栏显示卡片信息",
        fetcher_name: "fetchArticleCards",
        route: "/article/cards",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili article cards.",
        tags: TAG_ARTICLE,
    },
    ApiMethodSpec {
        method_key: "articleInfo",
        chinese_name: "专栏文章基本信息",
        fetcher_name: "fetchArticleInfo",
        route: "/article",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili article metadata.",
        tags: TAG_ARTICLE,
    },
    ApiMethodSpec {
        method_key: "articleListInfo",
        chinese_name: "文集基本信息",
        fetcher_name: "fetchArticleListInfo",
        route: "/article-list",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili article list metadata.",
        tags: TAG_ARTICLE,
    },
    ApiMethodSpec {
        method_key: "loginStatus",
        chinese_name: "登录基本信息",
        fetcher_name: "fetchLoginStatus",
        route: "/auth/status",
        http_method: HttpMethod::Get,
        description: "Fetch Bilibili login status.",
        tags: TAG_AUTH,
    },
    ApiMethodSpec {
        method_key: "loginQrcode",
        chinese_name: "申请二维码",
        fetcher_name: "requestLoginQrcode",
        route: "/auth/qrcode",
        http_method: HttpMethod::Get,
        description: "Request a Bilibili login QR code.",
        tags: TAG_AUTH,
    },
    ApiMethodSpec {
        method_key: "qrcodeStatus",
        chinese_name: "二维码状态",
        fetcher_name: "checkQrcodeStatus",
        route: "/auth/qrcode/status",
        http_method: HttpMethod::Get,
        description: "Check the status of a Bilibili login QR code.",
        tags: TAG_AUTH,
    },
    ApiMethodSpec {
        method_key: "avToBv",
        chinese_name: "AV转BV",
        fetcher_name: "convertAvToBv",
        route: "/convert/av-to-bv",
        http_method: HttpMethod::Get,
        description: "Convert a Bilibili AV identifier into a BV identifier.",
        tags: TAG_TOOL,
    },
    ApiMethodSpec {
        method_key: "bvToAv",
        chinese_name: "BV转AV",
        fetcher_name: "convertBvToAv",
        route: "/convert/bv-to-av",
        http_method: HttpMethod::Get,
        description: "Convert a Bilibili BV identifier into an AV identifier.",
        tags: TAG_TOOL,
    },
    ApiMethodSpec {
        method_key: "emojiList",
        chinese_name: "Emoji数据",
        fetcher_name: "fetchEmojiList",
        route: "/emoji",
        http_method: HttpMethod::Get,
        description: "Fetch the Bilibili emoji catalog.",
        tags: TAG_EMOJI,
    },
    ApiMethodSpec {
        method_key: "captchaFromVoucher",
        chinese_name: "从_v_voucher_申请_captcha",
        fetcher_name: "requestCaptchaFromVoucher",
        route: "/captcha",
        http_method: HttpMethod::Post,
        description: "Request a Bilibili captcha challenge from a voucher.",
        tags: TAG_CAPTCHA,
    },
    ApiMethodSpec {
        method_key: "validateCaptcha",
        chinese_name: "验证验证码结果",
        fetcher_name: "validateCaptchaResult",
        route: "/captcha/validate",
        http_method: HttpMethod::Post,
        description: "Validate a Bilibili captcha result.",
        tags: TAG_CAPTCHA,
    },
];