Files
Prowlarr-TS-SDK/docs/sdks/command

Command

(command)

Overview

Available Operations

getApiV1CommandId

Example Usage

import { Prowlarr } from "prowlarr";

const prowlarr = new Prowlarr({
  security: {
    xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
  },
});

async function run() {
  const result = await prowlarr.command.getApiV1CommandId({
    id: 274829,
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { ProwlarrCore } from "prowlarr/core.js";
import { commandGetApiV1CommandId } from "prowlarr/funcs/commandGetApiV1CommandId.js";

// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
  security: {
    xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
  },
});

async function run() {
  const res = await commandGetApiV1CommandId(prowlarr, {
    id: 274829,
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("commandGetApiV1CommandId failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetApiV1CommandIdRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.CommandResource>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

deleteApiV1CommandId

Example Usage

import { Prowlarr } from "prowlarr";

const prowlarr = new Prowlarr({
  security: {
    xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
  },
});

async function run() {
  await prowlarr.command.deleteApiV1CommandId({
    id: 932632,
  });


}

run();

Standalone function

The standalone function version of this method:

import { ProwlarrCore } from "prowlarr/core.js";
import { commandDeleteApiV1CommandId } from "prowlarr/funcs/commandDeleteApiV1CommandId.js";

// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
  security: {
    xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
  },
});

async function run() {
  const res = await commandDeleteApiV1CommandId(prowlarr, {
    id: 932632,
  });
  if (res.ok) {
    const { value: result } = res;
    
  } else {
    console.log("commandDeleteApiV1CommandId failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.DeleteApiV1CommandIdRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

postApiV1Command

Example Usage

import { Prowlarr } from "prowlarr";

const prowlarr = new Prowlarr({
  security: {
    xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
  },
});

async function run() {
  const result = await prowlarr.command.postApiV1Command();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { ProwlarrCore } from "prowlarr/core.js";
import { commandPostApiV1Command } from "prowlarr/funcs/commandPostApiV1Command.js";

// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
  security: {
    xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
  },
});

async function run() {
  const res = await commandPostApiV1Command(prowlarr);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("commandPostApiV1Command failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request models.CommandResourceInput ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.CommandResource>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*

getApiV1Command

Example Usage

import { Prowlarr } from "prowlarr";

const prowlarr = new Prowlarr({
  security: {
    xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
  },
});

async function run() {
  const result = await prowlarr.command.getApiV1Command();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { ProwlarrCore } from "prowlarr/core.js";
import { commandGetApiV1Command } from "prowlarr/funcs/commandGetApiV1Command.js";

// Use `ProwlarrCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const prowlarr = new ProwlarrCore({
  security: {
    xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
  },
});

async function run() {
  const res = await commandGetApiV1Command(prowlarr);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("commandGetApiV1Command failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.CommandResource[]>

Errors

Error Type Status Code Content Type
errors.APIError 4XX, 5XX */*