mirror of
https://github.com/LukeHagar/Prowlarr-TS-SDK.git
synced 2025-12-06 04:21:03 +00:00
CustomFilter
(customFilter)
Overview
Available Operations
- getApiV1CustomfilterId
- putApiV1CustomfilterId
- deleteApiV1CustomfilterId
- getApiV1Customfilter
- postApiV1Customfilter
getApiV1CustomfilterId
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.customFilter.getApiV1CustomfilterId({
id: 367030,
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { customFilterGetApiV1CustomfilterId } from "prowlarr/funcs/customFilterGetApiV1CustomfilterId.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 customFilterGetApiV1CustomfilterId(prowlarr, {
id: 367030,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("customFilterGetApiV1CustomfilterId failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetApiV1CustomfilterIdRequest | ✔️ | 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.CustomFilterResource>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
putApiV1CustomfilterId
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.customFilter.putApiV1CustomfilterId({
id: "<id>",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { customFilterPutApiV1CustomfilterId } from "prowlarr/funcs/customFilterPutApiV1CustomfilterId.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 customFilterPutApiV1CustomfilterId(prowlarr, {
id: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("customFilterPutApiV1CustomfilterId failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.PutApiV1CustomfilterIdRequest | ✔️ | 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.CustomFilterResource>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
deleteApiV1CustomfilterId
Example Usage
import { Prowlarr } from "prowlarr";
const prowlarr = new Prowlarr({
security: {
xApiKey: process.env["PROWLARR_X_API_KEY"] ?? "",
},
});
async function run() {
await prowlarr.customFilter.deleteApiV1CustomfilterId({
id: 400472,
});
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { customFilterDeleteApiV1CustomfilterId } from "prowlarr/funcs/customFilterDeleteApiV1CustomfilterId.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 customFilterDeleteApiV1CustomfilterId(prowlarr, {
id: 400472,
});
if (res.ok) {
const { value: result } = res;
} else {
console.log("customFilterDeleteApiV1CustomfilterId failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.DeleteApiV1CustomfilterIdRequest | ✔️ | 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 | */* |
getApiV1Customfilter
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.customFilter.getApiV1Customfilter();
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { customFilterGetApiV1Customfilter } from "prowlarr/funcs/customFilterGetApiV1Customfilter.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 customFilterGetApiV1Customfilter(prowlarr);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("customFilterGetApiV1Customfilter 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.CustomFilterResource[]>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |
postApiV1Customfilter
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.customFilter.postApiV1Customfilter();
console.log(result);
}
run();
Standalone function
The standalone function version of this method:
import { ProwlarrCore } from "prowlarr/core.js";
import { customFilterPostApiV1Customfilter } from "prowlarr/funcs/customFilterPostApiV1Customfilter.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 customFilterPostApiV1Customfilter(prowlarr);
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("customFilterPostApiV1Customfilter failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request |
models.CustomFilterResource | ✔️ | 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.CustomFilterResource>
Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.APIError | 4XX, 5XX | */* |