How to use the mediacloud.api.MediaCloud.SORT_PUBLISH_DATE_ASC function in mediacloud

To help you get started, we’ve selected a few mediacloud examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mitmedialab / MediaCloud-Dashboard / app / core / apicache.py View on Github external
def cached_admin_sentence_list(api_key, q, fq='', start_index=0, rows=1000, sort=mcapi.MediaCloud.SORT_PUBLISH_DATE_ASC):
    user_mc = _get_user_mc(api_key, True)
    return user_mc.sentenceList(q, fq, start=start_index, rows=rows, sort=sort)
github mitmedialab / MediaCloud-API-Client / mediacloud / api.py View on Github external
    def sentenceList(self, solr_query, solr_filter='', start=0, rows=1000, sort=MediaCloud.SORT_PUBLISH_DATE_ASC):
        # Search for sentences and page through results
        return self._queryForJson(self.V2_API_URL+'sentences/list',
                                  {'q': solr_query,
                                   'fq': solr_filter,
                                   'start': start,
                                   'rows': rows,
                                   'sort': sort
                                   })