INNER CODE UNIT · Python

_set_data

siznax/wptools · wptools/core.py:226

    def _set_data(self, action):
        """
        Abstract method to capture API response data
        """
        raise NotImplementedError("A subclass must implement this method.")

    def info(self, action=None):
        """
        returns cached request info for given action,
        or list of cached actions
        """
        if action in self.cache:
            return self.cache[action]['info']
        return self.cache.keys() or None

    def query(self, action=None):
        """
        returns cached query string (without &format=json) for given action,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…