{"id":22864132,"url":"https://github.com/torbox-app/torbox-sdk-go","last_synced_at":"2025-05-04T04:55:33.472Z","repository":{"id":264514353,"uuid":"893559760","full_name":"TorBox-App/torbox-sdk-go","owner":"TorBox-App","description":"The official TorBox SDK in Golang","archived":false,"fork":false,"pushed_at":"2025-04-26T09:14:10.000Z","size":618,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-30T21:43:01.384Z","etag":null,"topics":["go","golang","sdk","sdk-go","sdk-golang","torbox"],"latest_commit_sha":null,"homepage":"https://api-docs.torbox.app","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TorBox-App.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-24T18:48:31.000Z","updated_at":"2025-04-26T09:31:25.000Z","dependencies_parsed_at":"2024-11-24T20:24:35.767Z","dependency_job_id":"03f91f7d-0834-4ee5-8432-046aee258e99","html_url":"https://github.com/TorBox-App/torbox-sdk-go","commit_stats":null,"previous_names":["torbox-app/torbox-sdk-go"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TorBox-App%2Ftorbox-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TorBox-App%2Ftorbox-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TorBox-App%2Ftorbox-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TorBox-App%2Ftorbox-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TorBox-App","download_url":"https://codeload.github.com/TorBox-App/torbox-sdk-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252133723,"owners_count":21699586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","sdk","sdk-go","sdk-golang","torbox"],"created_at":"2024-12-13T11:19:16.815Z","updated_at":"2025-05-03T02:31:45.649Z","avatar_url":"https://github.com/TorBox-App.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](https://raw.githubusercontent.com/TorBox-App/torbox-sdk-go/main/assets/banner.png)\n\n## Table of Contents\n\n- [Setup \\\u0026 Configuration](#setup--configuration)\n  - [Supported Language Versions](#supported-language-versions)\n  - [Authentication](#authentication)\n    - [Access Token Authentication](#access-token-authentication)\n      - [Setting the Access Token](#setting-the-access-token)\n  - [Services](#services)\n    - [Response Wrappers](#response-wrappers)\n      - [`TorboxApiResponse[T]`](#torboxapiresponset)\n      - [`TorboxApiError`](#torboxapierror)\n      - [`TorboxApiResponseMetadata`](#torboxapiresponsemetadata)\n  - [Models](#models)\n  - [License](#license)\n\n# Setup \u0026 Configuration\n\n## Supported Language Versions\n\nThis SDK is compatible with the following versions: `Go \u003e= 1.19.0`\n\n## Authentication\n\n### Access Token Authentication\n\nThe torbox-api API uses an Access Token for authentication.\n\nThis token must be provided to authenticate your requests to the API.\n\n#### Setting the Access Token\n\nWhen you initialize the SDK, you can set the access token as follows:\n\n```go\nimport (\n    \"torbox-sdk-go/pkg/torboxapi\"\n    \"torbox-sdk-go/pkg/torboxapiconfig\"\n  )\n\nconfig := torboxapiconfig.NewConfig()\nconfig.SetBearerToken(\"YOUR-TOKEN\")\n\nsdk := torboxapi.NewTorboxApi(config)\n```\n\nIf you need to set or update the access token after initializing the SDK, you can use:\n\n```go\nimport (\n    \"torbox-sdk-go/pkg/torboxapi\"\n    \"torbox-sdk-go/pkg/torboxapiconfig\"\n  )\n\nconfig := torboxapiconfig.NewConfig()\n\nsdk := torboxapi.NewTorboxApi(config)\nsdk.SetBearerToken(\"YOUR-TOKEN\")\n```\n\n## Services\n\nThe SDK provides various services to interact with the API.\n\n\u003cdetails\u003e \n\u003csummary\u003eBelow is a list of all available services with links to their detailed documentation:\u003c/summary\u003e\n\n| Name                                                                                |\n| :---------------------------------------------------------------------------------- |\n| [TorrentsService](documentation/services/torrents_service.md)                       |\n| [UsenetService](documentation/services/usenet_service.md)                           |\n| [WebDownloadsDebridService](documentation/services/web_downloads_debrid_service.md) |\n| [GeneralService](documentation/services/general_service.md)                         |\n| [NotificationsService](documentation/services/notifications_service.md)             |\n| [UserService](documentation/services/user_service.md)                               |\n| [RssFeedsService](documentation/services/rss_feeds_service.md)                      |\n| [IntegrationsService](documentation/services/integrations_service.md)               |\n| [QueuedService](documentation/services/queued_service.md)                           |\n\n\u003c/details\u003e\n\n### Response Wrappers\n\nAll services use response wrappers to provide a consistent interface to return the responses from the API.\n\nThe response wrapper itself is a generic struct that contains the response data and metadata.\n\n\u003cdetails\u003e\n\u003csummary\u003eBelow are the response wrappers used in the SDK:\u003c/summary\u003e\n\n#### `TorboxApiResponse[T]`\n\nThis response wrapper is used to return the response data from the API. It contains the following fields:\n\n| Name     | Type                        | Description                                 |\n| :------- | :-------------------------- | :------------------------------------------ |\n| Data     | `T`                         | The body of the API response                |\n| Metadata | `TorboxApiResponseMetadata` | Status code and headers returned by the API |\n\n#### `TorboxApiError`\n\nThis response wrapper is used to return an error. It contains the following fields:\n\n| Name     | Type                        | Description                                 |\n| :------- | :-------------------------- | :------------------------------------------ |\n| Err      | `error`                     | The error that occurred                     |\n| Body     | `T`                         | The body of the API response                |\n| Metadata | `TorboxApiResponseMetadata` | Status code and headers returned by the API |\n\n#### `TorboxApiResponseMetadata`\n\nThis struct is shared by both response wrappers and contains the following fields:\n\n| Name       | Type                | Description                                      |\n| :--------- | :------------------ | :----------------------------------------------- |\n| Headers    | `map[string]string` | A map containing the headers returned by the API |\n| StatusCode | `int`               | The status code returned by the API              |\n\n\u003c/details\u003e\n\n## Models\n\nThe SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.\n\n\u003cdetails\u003e \n\u003csummary\u003eBelow is a list of all available models with links to their detailed documentation:\u003c/summary\u003e\n\n| Name                                                                                                          | Description |\n| :------------------------------------------------------------------------------------------------------------ | :---------- |\n| [CreateTorrentRequest](documentation/models/create_torrent_request.md)                                        |             |\n| [CreateTorrentOkResponse](documentation/models/create_torrent_ok_response.md)                                 |             |\n| [ControlTorrentOkResponse](documentation/models/control_torrent_ok_response.md)                               |             |\n| [RequestDownloadLinkOkResponse](documentation/models/request_download_link_ok_response.md)                    |             |\n| [GetTorrentListOkResponse](documentation/models/get_torrent_list_ok_response.md)                              |             |\n| [GetTorrentCachedAvailabilityOkResponse](documentation/models/get_torrent_cached_availability_ok_response.md) |             |\n| [ExportTorrentDataOkResponse](documentation/models/export_torrent_data_ok_response.md)                        |             |\n| [GetTorrentInfoOkResponse](documentation/models/get_torrent_info_ok_response.md)                              |             |\n| [CreateUsenetDownloadRequest](documentation/models/create_usenet_download_request.md)                         |             |\n| [CreateUsenetDownloadOkResponse](documentation/models/create_usenet_download_ok_response.md)                  |             |\n| [GetUsenetListOkResponse](documentation/models/get_usenet_list_ok_response.md)                                |             |\n| [CreateWebDownloadRequest](documentation/models/create_web_download_request.md)                               |             |\n| [CreateWebDownloadOkResponse](documentation/models/create_web_download_ok_response.md)                        |             |\n| [GetWebDownloadListOkResponse](documentation/models/get_web_download_list_ok_response.md)                     |             |\n| [GetHosterListOkResponse](documentation/models/get_hoster_list_ok_response.md)                                |             |\n| [GetUpStatusOkResponse](documentation/models/get_up_status_ok_response.md)                                    |             |\n| [GetStatsOkResponse](documentation/models/get_stats_ok_response.md)                                           |             |\n| [GetNotificationFeedOkResponse](documentation/models/get_notification_feed_ok_response.md)                    |             |\n| [GetUserDataOkResponse](documentation/models/get_user_data_ok_response.md)                                    |             |\n| [AddReferralToAccountOkResponse](documentation/models/add_referral_to_account_ok_response.md)                 |             |\n| [GetAllJobsOkResponse](documentation/models/get_all_jobs_ok_response.md)                                      |             |\n| [GetAllJobsByHashOkResponse](documentation/models/get_all_jobs_by_hash_ok_response.md)                        |             |\n\n\u003c/details\u003e\n\n## License\n\nThis SDK is licensed under the MIT License.\n\nSee the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorbox-app%2Ftorbox-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorbox-app%2Ftorbox-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorbox-app%2Ftorbox-sdk-go/lists"}