Author Topic: update channel id in existent player  (Read 239 times)

Offline rickrs

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
update channel id in existent player
« on: February 18, 2017, 01:16:08 AM »
hi there, im using the tutorial from docs but and i can change the name of player, but now i need change the channel id for this player

i have this code in python

Code: [Select]
import sys
import json
from getpass import getpass
import scalalib, scws2
# set up logging...
log = scalalib.get_logger(level=('debug' if '-V' in sys.argv else 'info'),
                          format=' %(levelname)s %(message)s')
baseurl = "http://xxxxxxx/cm"
username = "xxx"
password = "xxx"

try:
    cm = scws2.ConManager(baseurl, auth=(username, password))

    cm.players.put(3, name="new name of player")
   
   
except (RuntimeError, IOError) as err:  # requests HTTPError super v1, v2
    # CM error msgs are automatically returned in the exception:
    log.error('%s %s %s, %s', err.name, err, err.errcode, err.description)



this code above works, but how i proceed to change the channelId for this player,i already know the channelId = 15

its simple? please send me orientations thanks.