Exemplo n.º 1
0
 class Meta:
     authentication = authentication.MultiAuthentication(
         BasicAuthenticationWithUser(realm="courtlistener.com"),
         authentication.SessionAuthentication())
     throttle = PerUserCacheThrottle(throttle_at=1000)
     resource_name = 'search'
     max_limit = 20
     include_absolute_url = True
     allowed_methods = ['get']
     filtering = {
         'q': ('search', ),
         'case_name': ('search', ),
         'judge': ('search', ),
         'stat_': ('boolean', ),
         'filed_after': ('date', ),
         'filed_before': ('date', ),
         'argued_after': ('date', ),
         'argued_before': ('date', ),
         'citation': ('search', ),
         'neutral_cite': ('search', ),
         'docket_number': ('search', ),
         'cited_gt': ('int', ),
         'cited_lt': ('int', ),
         'court': ('csv', ),
         'type': ('search', ),
     }
     ordering = [
         'dateFiled+desc',
         'dateFiled+asc',
         'dateArgued+desc',
         'dateArgued+asc',
         'citeCount+desc',
         'citeCount+asc',
         'score+desc',
     ]
Exemplo n.º 2
0
 class Meta:
     authentication = authentication.MultiAuthentication(
         BasicAuthenticationWithUser(realm="courtlistener.com"),
         authentication.SessionAuthentication())
     throttle = PerUserCacheThrottle(throttle_at=1000)
     resource_name = 'jurisdiction'
     queryset = Court.objects.exclude(jurisdiction='T')
     max_limit = 1000
     allowed_methods = ['get']
     filtering = {
         'id': ('exact', ),
         'date_modified': good_time_filters,
         'in_use': ALL,
         'has_opinion_scraper': ALL,
         'has_oral_argument_scraper': ALL,
         'position': numerical_filters,
         'short_name': ALL,
         'full_name': ALL,
         'url': ALL,
         'start_date': good_date_filters,
         'end_date': good_date_filters,
         'jurisdictions': ALL,
     }
     ordering = [
         'date_modified', 'start_date', 'end_date', 'position',
         'jurisdiction'
     ]
Exemplo n.º 3
0
 class Meta:
     authentication = authentication.MultiAuthentication(
         BasicAuthenticationWithUser(realm="courtlistener.com"),
         authentication.SessionAuthentication())
     throttle = PerUserCacheThrottle(throttle_at=1000)
     resource_name = 'document'
     queryset = Document.objects.all().select_related('docket', 'citation')
     max_limit = 20
     allowed_methods = ['get']
     include_absolute_url = True
     excludes = ['is_stub_document', 'cases_cited']
     filtering = {
         'id': ('exact', ),
         'time_retrieved': good_time_filters,
         'date_modified': good_time_filters,
         'date_filed': good_date_filters,
         'sha1': ('exact', ),
         'citation': ALL,
         'citation_count': numerical_filters,
         'precedential_status': ('exact', 'in'),
         'date_blocked': good_date_filters,
         'blocked': ALL,
         'extracted_by_ocr': ALL,
         'supreme_court_db_id': ('exact', ),
     }
     ordering = [
         'time_retrieved', 'date_modified', 'date_filed', 'date_blocked'
     ]
Exemplo n.º 4
0
 class Meta:
     authentication = authentication.MultiAuthentication(
         BasicAuthenticationWithUser(realm="courtlistener.com"),
         authentication.SessionAuthentication())
     throttle = PerUserCacheThrottle(throttle_at=1000)
     queryset = Citation.objects.all()
     max_limit = 20
     excludes = [
         'slug',
     ]  # Why?
Exemplo n.º 5
0
 class Meta:
     authentication = authentication.MultiAuthentication(
         BasicAuthenticationWithUser(realm="courtlistener.com"),
         authentication.SessionAuthentication())
     throttle = PerUserCacheThrottle(throttle_at=1000)
     resource_name = 'cited-by'
     queryset = Document.objects.all()
     excludes = ('is_stub_document', 'html', 'html_lawbox',
                 'html_with_citations', 'plain_text')
     include_absolute_url = True
     max_limit = 20
     list_allowed_methods = ['get']
     detail_allowed_methods = []
     filtering = {
         'id': ('exact', ),
     }
Exemplo n.º 6
0
    class Meta:
        authentication = authentication.MultiAuthentication(
            BasicAuthenticationWithUser(realm="courtlistener.com"),
            authentication.SessionAuthentication())

        throttle = PerUserCacheThrottle(throttle_at=1000)
        resource_name = 'docket'
        queryset = Docket.objects.all()
        max_limit = 20
        allowed_methods = ['get']
        include_absolute_url = True
        filtering = {
            'id': ('exact', ),
            'date_modified': good_time_filters,
            'court': ('exact', ),
            'date_blocked': good_date_filters,
            'blocked': ALL,
        }
        ordering = ['date_modified', 'date_blocked']