Dynamic content via RSS feed (version for system administrator)

Материал из SmartPlayer
Версия от 16:07, 18 сентября 2023; N.Bloshkin (обсуждение | вклад) (Новая страница: «=== '''Setting''' === Next, the system administrator needs to set up a connection to our server via Swagger UI. {{Note|''Swagger (or OpenAPI)'' is a tool for creating, documenting, and testing web APIs. It helps developers easily understand and work with the API, providing a visual representation and automatically generated documentation. |warn}} {{Note|API connection URL: <code>https://restapi.smartplayer.org/</code>|warn}} The next step requires the system...»)

Description

Periodically, users find the need to display some additional text information on the device along with the main broadcast. To do this, dynamic content can be launched through the RSS feed in the broadcast.

Workflow

  1. First, the system administrator configures the user's application via RSS.
  2. Next, it is necessary for the user to create a suitable type of content, as described above, in their personal account.
  3. The next step is "Creating a broadcast".
  4. The penultimate action will be creating a schedule for the broadcast.
  5. Displaying the necessary content on the devices.
Functional logic

Operating Principle

Preparation

Location ID - Company

Initially, the system administrator needs to set up the operation using the RSS request and send the URL for API connection. This is done using the URL and will look something like this:
https://rc-api.smartplayer.org/v2/company-rss/feed/54
In this case, instead of the last digit (54) in the request, it is the Company ID. It can be viewed in the personal account on the user icon. In this way, we can view the public RSS feed.

Example of a public RSS feed

Setting

Next, the system administrator needs to set up a connection to our server via Swagger UI.

Swagger (or OpenAPI) is a tool for creating, documenting, and testing web APIs. It helps developers easily understand and work with the API, providing a visual representation and automatically generated documentation.

The next step requires the system administrator to find the RSS request specified in the Swagger UI.

RSS request to Swagger UI

Click on the "RSS" line, a window with an example of parameters and returned values will open.

Examples of parameters and return values

Then you need to click on the "Try it out" button, and a form with data will appear:

  • Device ID - this line needs to have the device value inserted. It can be viewed in the personal account.

The Device ID can be found by going to the "Devices" section of the personal account, selecting the necessary device, and clicking on "Information" in the right toolbar. In the menu that opens, it is necessary to take and copy the value from the "Device Identifier" section.

Device ID Location
  • Content Description/title - the content that will be displayed on the device.
Example showing Device ID and content description

Next, we insert the "Device Identifier" into the "Device ID" line, and in the "Content Description/title", we change the value as needed.

Создание запроса

После прохождения шагов, описанных выше, системный администратор должен нажать кнопку "Execute". Система выполнит запрос и покажет статус в виде ответа: "Company RSS updated"

Статус "Company RSS updated"

Для проверки правильности произведенного действия возвращаемся к RSS ленте и обновляем страницу.

Завершение подготовки

После всех описанных шагов, можно считать что динамическое подключение через RSS готово и настроено. Дальнейшие шаги должен для подготовки и воспроизведения контента на устройстве должен делать пользователь. Инструкция для дальнейших действий можно просмотреть по ссылке: Динамический контент через RSS ленту (пользовательская версия)

Итоговый результат

Системный администратор настроил подключение по RSS и подготовил "плацдарм" для пользователя. Остальные настройки пользователь должен проводить самостоятельно.