OpenQuizz
Une application de gestion des contenus pédagogiques
Resource Class Reference
Inheritance diagram for Resource:
Collaboration diagram for Resource:

Public Member Functions

def __init__ (self, api=None, *args, **kwargs)
 
def dispatch_request (self, *args, **kwargs)
 
def validate_payload (self, func)
 
- Public Member Functions inherited from MethodViewType
def __init__ (cls, name, bases, d)
 
- Public Member Functions inherited from View
def dispatch_request (self)
 
def as_view (cls, name, *class_args, **class_kwargs)
 

Data Fields

 api
 
- Data Fields inherited from MethodViewType
 methods
 

Static Public Attributes

 representations = None
 
list method_decorators = []
 
- Static Public Attributes inherited from View
 methods
 
 provide_automatic_options
 
 decorators
 

Detailed Description

Represents an abstract RESTX resource.

Concrete resources should extend from this class
and expose methods for each supported HTTP method.
If a resource is invoked with an unsupported HTTP method,
the API will return a response with status 405 Method Not Allowed.
Otherwise the appropriate method is called and passed all arguments
from the url rule used when adding the resource to an Api instance.
See :meth:`~flask_restx.Api.add_resource` for details.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  api = None,
args,
**  kwargs 
)

Member Function Documentation

◆ dispatch_request()

def dispatch_request (   self,
args,
**  kwargs 
)

Reimplemented from MethodView.

◆ validate_payload()

def validate_payload (   self,
  func 
)
Perform a payload validation on expected model if necessary

Field Documentation

◆ api

api

◆ method_decorators

list method_decorators = []
static

◆ representations

representations = None
static

The documentation for this class was generated from the following file: