tribler.core.database.restapi.database_endpoint
Attributes
Classes
This is the top-level endpoint class that serves other endpoints. |
Functions
|
Parse input to boolean True or False. |
Module Contents
- type tribler.core.database.restapi.database_endpoint.RequestType = TriblerRequest[tuple[MetadataStore]]
- tribler.core.database.restapi.database_endpoint.TORRENT_CHECK_TIMEOUT = 20
- tribler.core.database.restapi.database_endpoint.json2pony_columns
- tribler.core.database.restapi.database_endpoint.parse_bool(obj: str) bool
Parse input to boolean True or False. Allow parsing text ‘false’, ‘true’ ‘1’, ‘0’ to boolean.
- Parameters:
obj – Object to parse
- class tribler.core.database.restapi.database_endpoint.DatabaseEndpoint(middlewares: tuple = (), client_max_size: int = MAX_REQUEST_SIZE)
Bases:
tribler.core.restapi.rest_endpoint.RESTEndpointThis is the top-level endpoint class that serves other endpoints.
- /metadata
/torrents /<public_key>
- path = '/api/metadata'
- mds: tribler.core.database.store.MetadataStore | None = None
- required_components = ('mds',)
- download_manager: tribler.core.libtorrent.download_manager.download_manager.DownloadManager | None = None
- torrent_checker: tribler.core.torrent_checker.torrent_checker.TorrentChecker | None = None
- content_discovery_community: tribler.core.content_discovery.community.ContentDiscoveryCommunity | None = None
- classmethod sanitize_parameters(parameters: multidict.MultiDictProxy | multidict.MultiMapping[str]) dict[str, str | float | list[str] | set[bytes] | bytes | None]
Sanitize the parameters for a request that fetches channels.
- async get_torrent_health(request: RequestType) tribler.core.restapi.rest_endpoint.RESTResponse
Fetch the swarm health of a specific torrent.
- async get_torrent_health_history(request: RequestType) tribler.core.restapi.rest_endpoint.RESTResponse
Fetch the swarm health of a specific torrent.
- add_download_progress_to_metadata_list(contents_list: list[dict]) None
Retrieve the download status from libtorrent and attach it to the torrent descriptions in the content list.
- async get_popular_torrents(request: RequestType) tribler.core.restapi.rest_endpoint.RESTResponse
Get the list of most popular torrents.
- async local_search(request: RequestType) tribler.core.restapi.rest_endpoint.RESTResponse
Perform a search for a given query.
- async completions(request: RequestType) tribler.core.restapi.rest_endpoint.RESTResponse
Return auto-completion suggestions for a given query.
- async add_tag(request: RequestType) tribler.core.restapi.rest_endpoint.RESTResponse
Add a custom tag to the given download.
- async remove_tag(request: RequestType) tribler.core.restapi.rest_endpoint.RESTResponse
Remove a custom tag from the given download.
- async update_tags(request: RequestType) tribler.core.restapi.rest_endpoint.RESTResponse
Set the tags for the given download.