| uid | examples-overview |
|---|---|
| title | Examples Overview |
| description | Learn how the TorBoxSDK examples project is organized and where to find runnable code for common SDK workflows. |
This guide is for developers who want to learn TorBoxSDK by starting from runnable code instead of isolated snippets.
The examples live in the examples project:
The project currently contains 38 runnable scenarios grouped by onboarding, Main API workflows, Search API usage, Relay usage, and error handling patterns.
- dependency injection setup with
AddTorBox() - standalone
TorBoxClientusage without DI - configuration binding from
appsettings.json - end-to-end Main API workflows such as creating, listing, editing, and controlling downloads
- Search API workflows for torrents, Usenet, metadata, tutorials, and download handoff
- Relay API monitoring calls
- production-oriented error handling and cancellation patterns
Start with the runner and setup examples if you are new to the SDK. Move to the Main API guide when you want real resource workflows. Use the Search, Relay, and error-handling guide when you need cross-cutting patterns.
- Running the Examples Project
- Setup and Configuration Examples
- Main API Examples
- Search, Relay, and Error Handling Examples
| Need | Guide |
|---|---|
| Run the menu-driven sample app | Running the Examples Project |
Configure DI, appsettings.json, or standalone client usage |
Setup and Configuration Examples |
| Explore torrents, Usenet, web downloads, user, integrations, notifications, RSS, vendors, queued, stream, or general endpoints | Main API Examples |
| Explore Search API, Relay API, and resilience patterns | Search, Relay, and Error Handling Examples |
- Replace placeholder IDs, tokens, hashes, file paths, and URLs before running any workflow.
- Prefer environment variables or configuration binding for secrets; do not hardcode API keys.
- Keep the
CancellationTokenpattern used in the examples. - Treat
ExampleHelperas sample infrastructure, not as part of the public SDK surface.