Creating API's using decorators