mirror of
https://github.com/LukeHagar/Prowlarr-TS-SDK.git
synced 2025-12-06 04:21:03 +00:00
22 KiB
22 KiB
Newznab
(newznab)
Overview
Available Operations
getApiV1IndexerIdNewznab
Example Usage
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.newznab.getApiV1IndexerIdNewznab({
id: 395958,
});
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { newznabGetApiV1IndexerIdNewznab } from "prowlarr/funcs/newznabGetApiV1IndexerIdNewznab.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 newznabGetApiV1IndexerIdNewznab(prowlarr, {
id: 395958,
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("newznabGetApiV1IndexerIdNewznab failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetApiV1IndexerIdNewznabRequest | ✔️ | 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 | */* |
getIdApi
Example Usage
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.newznab.getIdApi({
id: 915193,
});
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { newznabGetIdApi } from "prowlarr/funcs/newznabGetIdApi.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 newznabGetIdApi(prowlarr, {
id: 915193,
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("newznabGetIdApi failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetIdApiRequest | ✔️ | 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 | */* |
getApiV1IndexerIdDownload
Example Usage
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.newznab.getApiV1IndexerIdDownload({
id: 159549,
});
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { newznabGetApiV1IndexerIdDownload } from "prowlarr/funcs/newznabGetApiV1IndexerIdDownload.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 newznabGetApiV1IndexerIdDownload(prowlarr, {
id: 159549,
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("newznabGetApiV1IndexerIdDownload failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetApiV1IndexerIdDownloadRequest | ✔️ | 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 | */* |
getIdDownload
Example Usage
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.newznab.getIdDownload({
id: 531578,
});
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { newznabGetIdDownload } from "prowlarr/funcs/newznabGetIdDownload.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 newznabGetIdDownload(prowlarr, {
id: 531578,
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("newznabGetIdDownload failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetIdDownloadRequest | ✔️ | 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 | */* |