Channel recommendations

This endpoint allows you to get channels that another channel selected as recommended and manage your channel's recommendations (you can find them on your channel's page).

Getting recommended channels

Resource endpoint:

GET /api/v2/channels/:id/recommendations
  • id (integer) — the identifier of the required channel.

Request parameters:

None.

Request example:

GET /api/v2/channels/12345/recommendations

Response parameters:

Response example:

{
    channels:[channel big JSONs]
}

Adding a recommendation

Resource endpoint:

POST /api/v2/channels/:channel_id/recommendations
  • channel_id (integer) — the identifier of the channel that recommends another channel.

Request parameters:

  • id (integer) — the identifier of the channel that is recommended;
  • permalink (string) — the permalink of the channel that is recommended, optional parameter, may be used instead of id.

Request example:

POST /api/v2/channels/12345/recommendations?id=9876

Response parameters:

Response example:

{
    channels:[channel big JSONs]
}

Changing a recommendation position

This methods lets you change the position of the recommended channel in the list of recommendations. The position numbering starts from the first one which is the upper channel in the list.

Resource endpoint:

PUT /api/v2/channels/:channel_id/recommendations
  • channel_id (integer) — the identifier of the channel that recommends another channel.

Request parameters:

  • id (integer) — the identifier of the channel that is recommended;
  • position (integer) — the required position number of the channel.

Request example:

PUT /api/v2/channels/12345/recommendations?id=9876?position=2

Response parameters:

The empty JSON or JSON with an error message.

Deleting a recommendation

Resource endpoint:

DELETE /api/v2/channels/:channel_id/recommendations
  • channel_id (integer) — the identifier of the channel that recommends another channel.

Request parameters:

  • id (integer) — the identifier of the channel that is recommended.
  • permalink (string) — the permalink of the channel that is recommended, optional parameter, may be used instead of id.

Request example:

DELETE /api/v2/channels/12345/recommendations?id=9876

Response parameters:

Response example:

{
    channels:[channel big JSONs]
}

Response parameters:

The empty JSON or JSON with an error message.