def search_subscriptions(self, **kwargs):
        """
        Search for all subscriptions by parameters
        """
        params = [(key, kwargs[key]) for key in sorted(kwargs.keys())]
        url = "/notification/v1/subscription?{}".format(
            urlencode(params, doseq=True))

        response = NWS_DAO().getURL(url, self._read_headers)

        if response.status != 200:
            raise DataFailureException(url, response.status, response.data)

        data = json.loads(response.data)
        subscriptions = []
        for datum in data.get("Subscriptions", []):
            subscriptions.append(self._subscription_from_json(datum))
        return subscriptions
def search_subscriptions ( self , ** kwargs ) : params = [ ( key , kwargs [ key ] ) for key in sorted ( kwargs . keys ( ) ) ] url = "/notification/v1/subscription?{}" . format ( urlencode ( params , doseq = True ) ) response = NWS_DAO ( ) . getURL ( url , self . _read_headers ) if response . status != 200 : raise DataFailureException ( url , response . status , response . data ) data = json . loads ( response . data ) subscriptions = [ ] for datum in data . get ( "Subscriptions" , [ ] ) : subscriptions . append ( self . _subscription_from_json ( datum ) ) return subscriptions
Search for all subscriptions by parameters