'Return the results of a query against the course catalog API. If no
query parameter is given, returns an empty result set.'

def get(self, request):

    client = self.get_catalog_api_client(request.user)
    if ('q' in request.GET):
        results = client.courses.get(**request.GET)
    else:
        results = {'count': 0, 'results': [], 'next': None, 'prev': None}
    return JsonResponse(results)
