def create_subscription(self, url, events):
        """
        Create subscription
        :param events: Events to subscribe
        :param url: Url to send events
        """
        params = {
            'url': url,
            'events': events
        }

        url = self.SUBSCRIPTIONS_URL

        connection = Connection(self.token)
        connection.set_url(self.production, url)
        connection.add_header('Content-Type', 'application/json')
        connection.add_params(params, json_format=True)

        return connection.post_request()
def create_subscription ( self , url , events ) : params = { 'url' : url , 'events' : events } url = self . SUBSCRIPTIONS_URL connection = Connection ( self . token ) connection . set_url ( self . production , url ) connection . add_header ( 'Content-Type' , 'application/json' ) connection . add_params ( params , json_format = True ) return connection . post_request ( )
Create subscription
        :param events: Events to subscribe
        :param url: Url to send events