(self, api_function)
| 366 | self.route["urls"] = (urls,) if isinstance(urls, str) else urls |
| 367 | |
| 368 | def __call__(self, api_function): |
| 369 | api = self.route.get("api", hug.api.from_object(api_function)) |
| 370 | (interface, callable_method) = self._create_interface(api, api_function) |
| 371 | for base_url in self.route.get("urls", ("/{0}".format(api_function.__name__),)): |
| 372 | api.http.add_sink(interface, base_url) |
| 373 | return callable_method |
| 374 | |
| 375 | |
| 376 | class StaticRouter(SinkRouter): |
nothing calls this directly
no test coverage detected