def modify_user_nickname(username, nickname)
      token = self.auth_token()
      result = HTTParty.put("#{@head_url}/users/#{username}", 
                            :body    => {:nickname => nickname}.to_json ,
                            :headers => { 'Content-Type' => 'application/json', 'Authorization'=>"Bearer #{token}" } )

      if result.response.code.to_i == 200
        return result["entities"][0]
      else
        nil
      end
    end
def modify_user_nickname(username, nickname)
      token = self.auth_token()
      result = HTTParty.put("#{@head_url}/users/#{username}", 
                            :body    => {:nickname => nickname}.to_json ,
                            :headers => { 'Content-Type' => 'application/json', 'Authorization'=>"Bearer #{token}" } )

      if result.response.code.to_i == 200
        return result["entities"][0]
      else
        nil
      end
    end
修改用户昵称