Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SABnzbd

Hierarchy

  • SABnzbd

Index

Constructors

constructor

  • new SABnzbd(host: string, port: string, apiKey: string): SABnzbd
  • Base SABnzbd class

    example

    Instantiating a new class

    new SABnzbd("127.0.0.1", "8080", "6e961fd677a74326a07f1df4c06e3f38")
    

    Parameters

    • host: string

      SABnzbd Host

    • port: string

      SABnzbd Port

    • apiKey: string

      API Key

    Returns SABnzbd

Properties

Private Readonly url

url: URL

Methods

addFileAndWaitTillFinish

  • addFileAndWaitTillFinish(url: string, params?: AddURLParams): Promise<string[]>
  • Add NZB by URL and wait for it to finish download. It will throw if the download is paused.

    Parameters

    • url: string

      URL-encoded version of the link to the NZB to be fetched

    • params: AddURLParams = ...

      Input parameter

    Returns Promise<string[]>

addURL

  • addURL(url: string, params?: AddURLParams): Promise<string[]>
  • Add NZB by URL

    Parameters

    • url: string

      URL-encoded version of the link to the NZB to be fetched

    • params: AddURLParams = ...

      Input parameter

    Returns Promise<string[]>

history

  • history(ids?: string[]): Promise<History>
  • Full history output with details about all jobs.

    Parameters

    • ids: string[] = ...

      Filter jobs by ids

    Returns Promise<History>

isDownloadFinished

  • isDownloadFinished(ids: string[]): Promise<boolean>
  • Parameters

    • ids: string[]

    Returns Promise<boolean>

queue

  • queue(ids?: string[]): Promise<Queue>
  • Full queue output with details about all jobs.

    Parameters

    • Optional ids: string[]

      Filter jobs by ids

    Returns Promise<Queue>

Private request

  • request(params: URLSearchParams): Promise<unknown>
  • Parameters

    • params: URLSearchParams

    Returns Promise<unknown>

version

  • version(): Promise<string>
  • Get version of running SABnzbd

    Returns Promise<string>

Generated using TypeDoc