Example #1
0
 def __init__(self, *args, **kwargs):
     Resource.__init__(self, *args, **kwargs)
     self.region = None
     self.method_decorators = []
     self.method_decorators.append(add_id_links())
     self.method_decorators.append(add_address_poi_id(self))
     self.method_decorators.append(add_computed_resources(self))
     self.method_decorators.append(add_pagination_links())
     self.method_decorators.append(clean_links())
     self.method_decorators.append(authentification_required)
Example #2
0
 def __init__(self, authentication=True, *args, **kwargs):
     StatedResource.__init__(self, *args, **kwargs)
     self.region = None
     self.method_decorators.append(add_id_links())
     self.method_decorators.append(add_address_poi_id(self))
     self.method_decorators.append(add_computed_resources(self))
     self.method_decorators.append(add_pagination_links())
     self.method_decorators.append(clean_links())
     if authentication:
         #some rare API (eg journey) must handle the authenfication by themself, thus deactivate it
         #by default ALWAYS use authentication=True
         self.method_decorators.append(authentication_required)