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