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>

createPlaylist

  • createPlaylist(name: string): Promise<any>

doPlaylistTrack

  • 对歌单添加或者删除歌曲

    Parameters

    • pid: number

      歌单 ID

    • mid: number

      歌曲 ID

    • Default value op: PlaylistOperation = PlaylistOperation.ADD

      操作,添加函数删除

    Returns Promise<any>

getPlaylistCatalogue

  • getPlaylistCatalogue(): Promise<any>

getPlaylistHotTag

  • getPlaylistHotTag(): Promise<any>

getPlaylistInfo

  • getPlaylistInfo(id: number): 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>

subscribePlyalist

  • subscribePlyalist(playlistId: number, action?: "subscribe" | "unsubscribe"): Promise<any>
  • 收藏/取消收藏歌单

    Parameters

    • playlistId: number

      表单 ID

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

      收藏或者取消收藏

    Returns Promise<any>

updatePlaylist

  • updatePlaylist(id: number, name: string, desc: string, tags: string): Promise<any>
  • 更新歌单

    Parameters

    • id: number

      歌单 ID

    • name: string

      歌单名字

    • desc: string

      歌单描述

    • tags: string

      歌单标签

    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