Files
Prowlarr-TS-SDK/docs/sdks/history/README.md

17 KiB
Raw Blame History

History

(history)

Overview

Available Operations

getApiV1History

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.history.getApiV1History({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { ProwlarrCore } from "prowlarr/core.js";
import { historyGetApiV1History } from "prowlarr/funcs/historyGetApiV1History.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 historyGetApiV1History(prowlarr, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("historyGetApiV1History failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetApiV1HistoryRequest ✔️ 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.HistoryResourcePagingResource>

Errors

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

getApiV1HistorySince

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.history.getApiV1HistorySince({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { ProwlarrCore } from "prowlarr/core.js";
import { historyGetApiV1HistorySince } from "prowlarr/funcs/historyGetApiV1HistorySince.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 historyGetApiV1HistorySince(prowlarr, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("historyGetApiV1HistorySince failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetApiV1HistorySinceRequest ✔️ 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.HistoryResource[]>

Errors

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

getApiV1HistoryIndexer

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.history.getApiV1HistoryIndexer({});

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { ProwlarrCore } from "prowlarr/core.js";
import { historyGetApiV1HistoryIndexer } from "prowlarr/funcs/historyGetApiV1HistoryIndexer.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 historyGetApiV1HistoryIndexer(prowlarr, {});
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("historyGetApiV1HistoryIndexer failed:", res.error);
  }
}

run();

Parameters

Parameter Type Required Description
request operations.GetApiV1HistoryIndexerRequest ✔️ 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.HistoryResource[]>

Errors

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