parameters: (self, request, repo_base, repo_name, card_name, format=None)
return_statement: return Response(res, status=status.HTTP_200_OK)
docstring: Change a card's name, query, and/or make it public or private
          ---
          parameters:
            - name: new_name
              in: path
              type: string
              description: new name for the card
            - name: new_query
              in: path
              type: string
              description: new query for the card
            - name: public
              in: path
              type: bool
              description: whether the card is public or not
docstring_summary: Change a card's name, query, and/or make it public or private
          ---
          parameters:
            - name: new_name
              in: path
              type: string
              description: new name for the card
            - name: new_query
              in: path
              type: string
              description: new query for the card
            - name: public
              in: path
              type: bool
              description: whether the card is public or not
docstring_tokens: Change a card s name query and / or make it public or private --- parameters : - name : new_name in : path type : string description : new name for the card - name : new_query in : path type : string description : new query for the card - name : public in : path type : bool description : whether the card is public or not
function: def patch(self, request, repo_base, repo_name, card_name, format=None):
          """
          Change a card's name, query, and/or make it public or private
          ---
          parameters:
            - name: new_name
              in: path
              type: string
              description: new name for the card
            - name: new_query
              in: path
              type: string
              description: new query for the card
            - name: public
              in: path
              type: bool
              description: whether the card is public or not
          """
          username = request.user.get_username()
          data = request.data
          new_name = data.get('new_name', None)
          new_query = data.get('new_query', None)
  
          # public needs to be able to parse 'false', so uses json.loads
          public = json.loads(data.get('public', 'null'))
  
          serializer = CardSerializer(
              username=username, repo_base=repo_base)
          res = serializer.update_card(
              repo_name, card_name, new_query, new_name, public)
          return Response(res, status=status.HTTP_200_OK)
function_tokens: def patch ( self , request , repo_base , repo_name , card_name , format = None ) : username = request . user . get_username ( ) data = request . data new_name = data . get ( 'new_name' , None ) new_query = data . get ( 'new_query' , None ) # public needs to be able to parse 'false', so uses json.loads public = json . loads ( data . get ( 'public' , 'null' ) ) serializer = CardSerializer ( username = username , repo_base = repo_base ) res = serializer . update_card ( repo_name , card_name , new_query , new_name , public ) return Response ( res , status = status . HTTP_200_OK )