Options
All
  • Public
  • Public/Protected
  • All
Menu

Class JDownloaderCryptoSuite

Hierarchy

Index

Constructors

constructor

  • Parameters

    • __namedParameters: object
      • apiVer: number
      • appKey: string
      • email: string
      • password: string

    Returns JDownloaderCryptoSuite

Properties

Private apiVer

apiVer: number

Private appKey

appKey: string

Private deviceEncryptionToken

deviceEncryptionToken: Buffer | null

Private deviceSecret

deviceSecret: Buffer

Private email

email: string

Private loginSecret

loginSecret: Buffer

Private regainToken

regainToken: string | null

Private serverEncryptionToken

serverEncryptionToken: Buffer | null

Private sessionToken

sessionToken: string | null

Methods

Protected callDevice

  • callDevice(query: string, deviceId: string, params?: object): Promise<any>
  • Call the device with an action

    Parameters

    • query: string

      The query to make to the device

    • deviceId: string

      The ID of the device

    • Optional params: object

      The parameters to the query

    Returns Promise<any>

Private callServer

  • callServer(query: string, key: Buffer, params: object): Promise<any>
  • Call the server with an action

    Parameters

    • query: string

      The query to make to the server

    • key: Buffer

      The singing key

    • params: object

      The parameters to the query

    Returns Promise<any>

Protected checkIfConnected

  • checkIfConnected(): void
  • Checks if the neccesary atributtes to query JDownloaderAPI are established

    Returns void

connect

  • connect(): Promise<void>
  • Connect to MyJDownloader with the credentils provided in the constructor

    Returns Promise<void>

Private createBody

  • createBody(rid: number, query: string, params?: object): object | object
  • Parameters

    • rid: number
    • query: string
    • Optional params: object

    Returns object | object

disconnect

  • disconnect(): Promise<void>
  • Discconects from JDownloaderAPI

    Returns Promise<void>

listDevices

  • listDevices(): Promise<IDevice[]>
  • List available devices connected to MyJDownloader

    Returns Promise<IDevice[]>

reconnect

  • reconnect(): Promise<void>
  • Reconnects to MyJDownloader with the credentils provided in the constructor

    Returns Promise<void>

Generated using TypeDoc