Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/h/a/Hacker-News-Droid-API-HEAD/APIContent.py   Hacker-News-Droid-API(Download)
        return cachedData
    else:
        hnData = APIUtils.parsePageContent(apiURL, apiURLBackup, '/submitted', None, format)
        if (hnData):
            logging.debug('getHackerNewsSubmittedContent: storing cached value for id %s' % id)
def getHackerNewsSimpleContent(fetcherURL, fetcherBackupURL, id, page='', format='json', url='', referer='', remote_addr=''):
    #don't cache paginated content
    if (page):
        return APIUtils.parsePageContent(fetcherURL, fetcherBackupURL, id, page, format)
    else:
        cachedData = getCache(id, format)
        if (cachedData):
            return cachedData
        else:
            hnData = APIUtils.parsePageContent(fetcherURL, fetcherBackupURL, id, page, format)
def getHackerNewsLatestContent(page='', format='json', url='', referer='', remote_addr='', limit=1):
    #only cache homepage data
    limit = int(limit)
    if (page):
        return APIUtils.parsePageContent(AppConfig.hackerNewsURL, AppConfig.hackerNewsURLBackup, '/latest', page, format, limit)
            return cachedData
        else:
            hnData = APIUtils.parsePageContent(AppConfig.hackerNewsURL, AppConfig.hackerNewsURLBackup,  '/latest', page, format, limit)
            if (hnData):
                logging.debug('getHackerNewsLatestContent: storing cached value for id %s' % id)