elchicodepython / RealityMismatch

MIT License
1 stars 1 forks source link

Namespacing API #6

Closed elchicodepython closed 4 years ago

elchicodepython commented 5 years ago

Namespacing API

As its described here #5 , there is a need of having a way to define a namespace inside game level configuration.

High level idea of implementation (Not final)

from .settings import namespace from .views import openDoor

path = Path(namespace)

urlpatterns = [ path('actions/openDoor', openDoor), ]



This way path could incorporate the endpoints defined into the namespace specified in the settings file of the level.
elchicodepython commented 4 years ago

Namespaces are already resolved in feature/just-testing-ideas-for-the-structure branch that will be merged to develop soon. Each namespace will be defined in the manifest.json file of the level.

Levels does'nt need to define urls or views, just actions and the game sdk will provide the endpoints and business logic.