parameters: (self, color)
docstring: Handle API colors call.
docstring_summary: Handle API colors call.
docstring_tokens: Handle API colors call .
function: def handle_color(self, color):
  
          """
          Handle API colors call.
          """
  
          print("HTTP API /colors call: {0}.".format(color))
  
          colors = {
              "red": GAME_COLOR.red,
              "blue": GAME_COLOR.blue,
              "green": GAME_COLOR.green,
              "yellow": GAME_COLOR.yellow
          }
          raw_color = colors.get(color)
          if not raw_color is None:
              color_match = self.match_color(raw_color)
              if color_match:
                  level_end = self.end_level()
                  if level_end:
                      return HTTPResponse(status="204 Color Match - End Level")
                  else:
                      return HTTPResponse(status="200 Color Match")
              else:
                  return HTTPResponse(status="406 Color Mismatch")
          else:
              return HTTPResponse(status="404 Color Not Found")
function_tokens: def handle_color ( self , color ) : print ( "HTTP API /colors call: {0}." . format ( color ) ) colors = { "red" : GAME_COLOR . red , "blue" : GAME_COLOR . blue , "green" : GAME_COLOR . green , "yellow" : GAME_COLOR . yellow } raw_color = colors . get ( color ) if not raw_color is None : color_match = self . match_color ( raw_color ) if color_match : level_end = self . end_level ( ) if level_end : return HTTPResponse ( status = "204 Color Match - End Level" ) else : return HTTPResponse ( status = "200 Color Match" ) else : return HTTPResponse ( status = "406 Color Mismatch" ) else : return HTTPResponse ( status = "404 Color Not Found" )