def register(self, resource, endpoint):
        '''
        This methods registers a resource with the router and connects all receivers to their respective signals

        :param resource:
            The resource class to register
        :type resource:
            A subclass of ``Resource`` class
        :param endpoint:
            the name of the resource's endpoint as it appears in the URL
        :type endpoint:
            str
        '''
        if not issubclass(resource, Resource):
            raise ValueError('Not and instance of ``Resource`` subclass')
        # register resource
        self._registry[endpoint] = resource
        # connect signal receivers
        resource.connect_signal_receivers()
def register ( self , resource , endpoint ) : if not issubclass ( resource , Resource ) : raise ValueError ( 'Not and instance of ``Resource`` subclass' ) self . _registry [ endpoint ] = resource resource . connect_signal_receivers ( )
This methods registers a resource with the router and connects all receivers to their respective signals

        :param resource:
            The resource class to register
        :type resource:
            A subclass of ``Resource`` class
        :param endpoint:
            the name of the resource's endpoint as it appears in the URL
        :type endpoint:
            str