INNER CODE UNIT · Python
info
siznax/wptools · wptools/core.py:232
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,
or list of cached actions
"""
if action in self.cache:
return self.cache[action]['query'].replace('&format=json', '')
return self.cache.keys() or None