parameters: (self, action)
docstring: Handle API actions call.
docstring_summary: Handle API actions call.
docstring_tokens: Handle API actions call .
function: def handle_action(self, action):
  
          """
          Handle API actions call.
          """
  
          print("HTTP API /actions call: {0}.".format(action))
  
          actions = {
              "startGame": self.start_game,
              "nextLevel": self.next_level,
          }
          handler = actions.get(action)
          print("handler:", handler)
          if handler:
              handler()
              return HTTPResponse(status="200 Action Executed")
          else:
              return HTTPResponse(status="404 Unknown Action")
function_tokens: def handle_action ( self , action ) : print ( "HTTP API /actions call: {0}." . format ( action ) ) actions = { "startGame" : self . start_game , "nextLevel" : self . next_level , } handler = actions . get ( action ) print ( "handler:" , handler ) if handler : handler ( ) return HTTPResponse ( status = "200 Action Executed" ) else : return HTTPResponse ( status = "404 Unknown Action" )