Discovered channels¶
-
class
Tribler.Core.Modules.restapi.channels.channels_discovered_endpoint.
ChannelsDiscoveredEndpoint
(session)[source]¶ This class is responsible for requests regarding the discovered channels.
-
render_GET
(_)[source]¶ -
GET
/channels/discovered
¶
A GET request to this endpoint returns all channels discovered in Tribler.
Example request:
curl -X GET http://localhost:8085/channels/discovered
Example response:
{ "channels": [{ "id": 3, "dispersy_cid": "da69aaad39ccf468aba2ab9177d5f8d8160135e6", "name": "My fancy channel", "description": "A description of this fancy channel", "subscribed": False, "votes": 23, "torrents": 3, "spam": 5, "modified": 14598395, "can_edit": True }, ...] }
-
-
render_PUT
(request)[source]¶ -
PUT
/channels/discovered
¶
Create your own new channel. The passed mode and descriptions are optional. Valid modes include: ‘open’, ‘semi-open’ or ‘closed’. By default, the mode of the new channel is ‘closed’.
Example request:
curl -X PUT http://localhost:8085/channels/discovered --data "name=fancy name&description=fancy description&mode=open"
Example response:
{ "added": 23 }
statuscode 500: if a channel with the specified name already exists. -
-
-
class
Tribler.Core.Modules.restapi.channels.channels_discovered_endpoint.
ChannelsDiscoveredSpecificEndpoint
(session, cid)[source]¶ This class is responsible for dispatching requests to perform operations in a specific discovered channel.
-
render_GET
(request)[source]¶ -
GET
/channels/discovered/(string: channelid)
¶
Return the name, description and identifier of a channel.
Example request:
curl -X GET http://localhost:8085/channels/discovered/4a9cfc7ca9d15617765f4151dd9fae94c8f3ba11
Example response:
{ "overview": { "name": "My Tribler channel", "description": "A great collection of open-source movies", "identifier": "4a9cfc7ca9d15617765f4151dd9fae94c8f3ba11" } }
statuscode 404: if your channel has not been created (yet). -
-