bilibili-api
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

bilibili-api

Node.js Promised Bilibili Android API

本项目是基于 Java 项目的子项目.

由于开学在即,所以目前只提供 登入 接口, 欢迎一起来开发。

使用

Typescript:

import Bilibili from 'bilibili-api'
const bilibili = new Bilibili()
async function test() {
    const result = await bilibili.login(username, password)
}

CommonJS:

const Bilibili = require('bilibili-api')
const bilibili = new Bilibili()
async function test() {
    const result = await bilibili.login(username, password)
}

接口

  • login 参数: username: string password: string
  • loginWithCaptcha 参数: username: string password: string captcha: string cookie:string
  • getCaptcha 参数: cookie?: string
    • cookierequest.jar.getCookieString() 所返回的字符串

测试

克隆项目到本地, 执行: pnpm iyarn
test 目录下的测试文件进行测试,然后执行: pnpm run devyarn dev
进行 单元测试: pnpm run testyarn test

Readme

Keywords

none

Package Sidebar

Install

npm i bilibili-api

Weekly Downloads

10

Version

0.0.2

License

MIT

Unpacked Size

146 kB

Total Files

75

Last publish

Collaborators

  • a632079