<s> from flask . views import MethodView <EOL> from robotics . decorators import analytics <EOL> class Neck ( MethodView ) : <EOL> """<STR_LIT>""" <EOL> @ analytics ( "<STR_LIT>" ) <EOL> def get ( self ) : <EOL> from flask import abort <EOL> abort ( <NUM_LIT> ) <EOL> @ analytics ( "<STR_LIT>" ) <EOL> def patch ( self ) : <EOL> from flask import request , jsonify <EOL> data = request . get_json ( force = True ) <EOL> if "<STR_LIT>" in data : <EOL> value = data [ "<STR_LIT>" ] <EOL> self . rotate ( value ) <EOL> if "<STR_LIT>" in data : <EOL> value = data [ "<STR_LIT>" ] <EOL> self . tilt ( value ) <EOL> if "<STR_LIT>" in data : <EOL> value = data [ "<STR_LIT>" ] <EOL> self . lean ( value ) <EOL> return jsonify ( data ) <EOL> def rotate ( self , value ) : <EOL> """<STR_LIT>""" <EOL> from robotics . arduino import Arduino <EOL> neck_controller = Arduino ( "<STR_LIT>" ) <EOL> neck_controller . write ( value ) <EOL> def tilt ( self , value ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def lean ( self , value ) : <EOL> """<STR_LIT>""" <EOL> pass </s>
