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>

load

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

    Parameters

    • store: any

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

    Returns void

multiSearch

  • multiSearch(keyword: string, type?: SearchType): Promise<any>
  • 获取多重搜索 PS: 理论上应该会有 Offset 和 Limit 参数,但是经过我的测试,Type 也没有用,不知道这个和 MusicClient#searchSuggest 的区别

    Parameters

    • keyword: string
    • Default value type: SearchType = SearchType.SONG

    Returns Promise<any>

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>

search

  • search(keyword: string, type?: SearchType, limit?: number, offset?: number): Promise<any>
  • 搜索,顾名思义

    Parameters

    • keyword: string
    • Default value type: SearchType = SearchType.SONG
    • Default value limit: number = 30
    • Default value offset: number = 0

    Returns Promise<any>

searchHot

  • searchHot(): Promise<any>

searchSuggest

  • searchSuggest(keyword: string): 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