class SavedShow(RequestFactory.showoneformatted(SavedRequest)): '''Re-do a saved request with show one format''' def take_action(self, args): return super(SavedShow, self).act(method='GET', args=args)
class GET(RequestFactory.unformatted(UnSavedRequest)): '''Do GET request''' def take_action(self, args): '''Override parent method''' super(GET, self).act(method='GET', args=args)
class SavedRedo(RequestFactory.unformatted(SavedRequest)): '''Re-do a saved request''' def take_action(self, args): super(SavedRedo, self).act(method=None, args=args)
class SavedList(RequestFactory.listformatted(SavedRequest)): '''Re-do a saved request with list format''' def take_action(self, args): return super(SavedList, self).act(method='GET', args=args)
class UnSavedShow(RequestFactory.showoneformatted(UnSavedRequest)): '''Show a particular resource''' def take_action(self, args): return super(UnSavedShow, self).act(method='GET', args=args)
class UnSavedList(RequestFactory.listformatted(UnSavedRequest)): '''Fetch a list of resources''' def take_action(self, args): return super(UnSavedList, self).act(method='GET', args=args)
class DELETE(RequestFactory.unformatted(UnSavedRequest)): '''Do DELETE request''' def take_action(self, args): super(DELETE, self).act(method='DELETE', args=args)
class PATCH(RequestFactory.unformatted(UnSavedRequest)): '''Do PATCH request''' def take_action(self, args): super(PATCH, self).act(method='PATCH', args=args)
class PUT(RequestFactory.unformatted(UnSavedRequest)): '''Do PUT request''' def take_action(self, args): super(PUT, self).act(method='PUT', args=args)