The US president's week began with an angry outburst but ended with him celebrating four major political victories.