Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

user

user: User

用户信息,当手动调用登录或者 load 之后,此对象会自动实例化 通过调用 user.toJSON() 获取可以用于存储的对象,当下次实例化的时候,通过 client.load 恢复登录状态

Accessors

cookie

cookie:

isLogin

isLogin:

Methods

checkLogin

  • checkLogin(): Promise<void>

getArtistAlbums

  • getArtistAlbums(id: number, limit?: number, offset?: number): Promise<any>
  • 获取歌手的全部专辑

    Parameters

    • id: number
    • Default value limit: number = 30
    • Default value offset: number = 0

    Returns Promise<any>

getArtistHotSongs

  • getArtistHotSongs(id: number): Promise<any>
  • 获取歌手的最热 50 首歌曲

    Parameters

    • id: number

    Returns Promise<any>

getArtistInfo

  • getArtistInfo(id: number): Promise<any>

getArtistList

  • 根据类型获取歌手列表

    Parameters

    • catalogue: ArtistCatalogueCode

      歌手类型

    • Default value limit: number = 50

      返回分页数量限制

    • Default value offset: number = 0

      返回分页偏移

    Returns Promise<any>

getArtistMvs

  • getArtistMvs(id: number, limit?: number, offset?: number): Promise<any>
  • 获取歌手的全部 MV

    不知道为什么,当 limit 为某些值的时候,offset 的结果会出现紊乱

    经过测试,在 30 以内的有 9 10 14 20 21 24 25 的 limit 值不正确,请尽量不要使用这几个值。

    Parameters

    • id: number
    • Default value limit: number = 30
    • Default value offset: number = 0

    Returns Promise<any>

getArtistSongs

  • getArtistSongs(id: number, limit?: number, offset?: number): Promise<any>
  • 获取歌手的全部歌曲

    经过测试,这里实际上的结果和 getArtistHotSongs 一致

    Parameters

    • id: number
    • Default value limit: number = 30
    • Default value offset: number = 0

    Returns Promise<any>

load

  • load(store: any): void
  • 从存储当中恢复用户

    Parameters

    • store: any

      用户的信息,用于恢复使用

    Returns void

request

  • request(host: string, path: string, method: string, payload?: any): Promise<any>
  • Parameters

    • host: string
    • path: string
    • method: string
    • Default value payload: any = {csrf_token: '',}

    Returns Promise<any>

requestWithSetCookie

  • requestWithSetCookie(host: string, path: string, method: string, payload?: any): Promise<any>

subscribeArtist

  • subscribeArtist(id: number, action?: "subscribe" | "unsubscribe"): Promise<any>
  • 收藏/取消收藏歌手

    Parameters

    • id: number

      歌手 ID

    • Default value action: "subscribe" | "unsubscribe" = "subscribe"

    Returns Promise<any>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc