Giter Site home page Giter Site logo

acgn-collection-workers's Introduction

解决一些 API 获取不到的网页内容

base: https://acgn-collection-workers.kahosan.workers.dev

Timeline

获取 Bangumi 的时间胶囊,可以解析「全站」和「自己」的数据,但登入视角的时间胶囊数据暂不支持

GET /timeline?type=all&page=1
Parameter Type Description Required
userId string 可以是用户名也可以是 ID,不传递时返回全站数据 false
type string 见下表 false
page number 页码,全站的数据只有一页 false
Type Description
'' 空字符串,对应 Bangumi 的默认页面
all 全站
say 吐槽
subject 收藏
progress 进度
blog 日志
mono 人物
relation 好友
group 小组
wiki 维基
index 目录

Response

展开
[
  {
    "date": "今天",
    "items": [
      {
        "user": {
          "name": "石烏漱",
          "href": "https://bgm.tv/user/807962",
          "avatar": "https://lain.bgm.tv/pic/user/l/000/80/79/807962.jpg?r=1698033896&hd=1"
        },
        "time": "36秒前 · mobile",
        "reply": {
          "content": "",
          "text": "",
          "href": ""
        },
        "action": {
          "type": "完成了",
          "desc": "4 of 12 话"
        },
        "contents": [
          {
            "name": "星屑テレパス",
            "url": "https://bgm.tv/subject/404115"
          }
        ]
      },
      {
        "user": {
          "name": "KuanChao",
          "href": "https://bgm.tv/user/494240",
          "avatar": "https://lain.bgm.tv/pic/user/l/icon.jpg"
        },
        "time": "39秒前 ",
        "reply": {
          "content": "",
          "text": "",
          "href": ""
        },
        "action": {
          "type": "读过",
          "desc": "第530话"
        },
        "contents": [
          {
            "name": "酒のほそ道",
            "url": "https://bgm.tv/subject/181113"
          }
        ]
      },
    ]
  }
]
类型定义
type Timeline = Array<{
  date: string
  items: TimelineItem[]
}>;

interface TimelineItem {
  user: {
    name: string
    href: string
    avatar: string
  }
  time: string
  reply: {
    content: string
    text: string
    href: string
  }
  action: {
    type: string
    desc: string
  }
  contents: Array<Record<'name' | 'url', string>>
}

Reviews

获取 Bangumi 条目页面的评论

GET /reviews?subjectId=69496
Parameter Type Description Required
subjectId number 条目 ID true

Board

获取 Bangumi 条目页面的讨论版

GET /board?subjectId=69496
Parameter Type Description Required
subjectId number 条目 ID true

Comments

获取 Bangumi 条目页面的吐槽

GET /comments?subjectId=69496
Parameter Type Description Required
subjectId number 条目 ID true

acgn-collection-workers's People

Contributors

kahosan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.