Subscribed channels¶
-
class
Tribler.Core.Modules.restapi.channels.channels_subscription_endpoint.
ChannelsModifySubscriptionEndpoint
(session, cid)[source]¶ This class is responsible for methods that modify the list of RSS feed URLs (adding/removing feeds).
-
render_DELETE
(request)[source]¶ -
DELETE
/channels/subscribed/(string: channelid)
¶
Unsubscribe from a specific channel. Returns error 404 if you are not subscribed to this channel.
Example request:
curl -X DELETE http://localhost:8085/channels/subscribed/da69aaad39ccf468aba2ab9177d5f8d8160135e6
Example response:
{ "unsubscribed" : True }
statuscode 404: if you are not subscribed to the specified channel. -
-
render_GET
(request)[source]¶ -
GET
/channels/subscribed/(string: channelid)
¶
Shows the status of subscription to a specific channel along with number of existing votes in the channel
Example request:
curl -X GET http://localhost:8085/channels/subscribed/da69aaad39ccf468aba2ab9177d5f8d8160135e6
Example response:
{ "subscribed" : True, "votes": 111 }
-
-
render_PUT
(request)[source]¶ -
PUT
/channels/subscribed/(string: channelid)
¶
Subscribe to a specific channel. Returns error 409 if you are already subscribed to this channel.
Example request:
curl -X PUT http://localhost:8085/channels/subscribed/da69aaad39ccf468aba2ab9177d5f8d8160135e6
Example response:
{ "subscribed" : True }
statuscode 409: (conflict) if you are already subscribed to the specified channel. -
-
-
class
Tribler.Core.Modules.restapi.channels.channels_subscription_endpoint.
ChannelsSubscribedEndpoint
(session)[source]¶ This class is responsible for requests regarding the subscriptions to channels.
-
render_GET
(_)[source]¶ -
GET
/channels/subscribed
¶
Returns all the channels the user is subscribed to.
Example request:
curl -X GET http://localhost:8085/channels/subscribed
Example response:
{ "subscribed": [{ "id": 3, "dispersy_cid": "da69aaad39ccf468aba2ab9177d5f8d8160135e6", "name": "My fancy channel", "description": "A description of this fancy channel", "subscribed": True, "votes": 23, "torrents": 3, "spam": 5, "modified": 14598395, "can_edit": True, }, ...] }
-
-