perform a request to the API, only when necessary

def _query(self):
        """ perform a request to the API, only when necessary """

        if not self.urls:
            self._resp = {}

        elif self._resp is None:
            params = [ ('url', url) for url in self.urls]
            query = urllib.urlencode(params)

            # query API
            r = self.opener.open(BITLOVE_ENCLOSURE_API + query)
            self._resp = json.loads(r.read())