Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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
})