def collections_endpoint(**lookup):
 resource = _resource()
 response = None
 method = request.method
 if (method in ('GET', 'HEAD')):
  response = get(resource, lookup)
 elif (method == 'POST'):
  response = post(resource)
 elif (method == 'DELETE'):
  response = delete(resource, lookup)
 elif (method == 'OPTIONS'):
  send_response(resource, response)
 else:
  abort(405)
 return send_response(resource, response)

def collections_endpoint ( ** lookup ) : resource = _resource ( ) response = None method = request . method if ( method in ( 'GET' , 'HEAD' ) ) : response = get ( resource , lookup ) elif ( method == 'POST' ) : response = post ( resource ) elif ( method == 'DELETE' ) : response = delete ( resource , lookup ) elif ( method == 'OPTIONS' ) : send_response ( resource , response ) else : abort ( 405 ) return send_response ( resource , response )
resource endpoint handler .