import json
import requests
from api_auth import APICredentials, APIParams
  
class PublishingSchedule:
    def __init__(self):
        self.host = "https://services.uplynk.com"
  
    def run(self):
        self._update_publishing_schedule()
 
    def _update_publishing_schedule(self):
        publishing_schedule_id = '04359728c4d346ac918ba7b3edff2cb1'
        url = "{}{}{}".format(self.host, "/api/v4/syndication-schedule/", publishing_schedule_id)
 
        payload = {
            'video_quality': 'high',
        }
 
        headers = {'Content-Type': 'application/json'}
 
        response = requests.patch(
            url, params=APIParams(APICredentials()).get_params({}), data=json.dumps(payload), headers=headers
        )
 
        print(response.json())
  
PublishingSchedule().run()