Skip to main content

system.kanoa.dashboard.addMarqueeDisplay

This function is part of the kanoaCore module

Description

Adds a display to the marqueeDisplay table

Syntax

addMarqueeDisplay(marqueeDisplayInfo, userId)
  • Parameters
      marqueeDisplayInfo (dict)
      - marqueeId (int)
      - siteCode (string)
      - location (string)
      - screenName (string)
      - theme (string): i.e. 'kanoa-dark'
      - enabled (bool)
      int userId - User ID
  • Returns
      marqueeDisplayId (int)
      msg (string): error message, None if successful
  • Code Examples

    # Example usage
    marqueeDisplayInfo = {
    "marqueeId": 12,
    "siteCode": 'Texas',
    "location": 'Break Room',
    "screenName": 'TV1',
    "enabled": True
    }
    userId = 123
    marqueeDisplayId, msg = system.kanoa.dashboard.addMarqueeDisplay(marqueeDisplayInfo, userId)
    if msg: system.perspective.sendMessage('showFailerToast', msg)
    else: system.perspective.sendMessage('showSuccessfulToast', 'Marquee has been added to the display')