"Winning the game was the most important thing for us," the 60-year-old told BBC Sport. "We played very well, and the best player for West Ham was their goalkeeper.
"Before we started the game, Chelsea and Arsenal won. We had to take the maximum. David Silva and Sergio Aguero are very important players. Seeing them playing that way is very important for the whole team.
"This team should always play in attacking way because of the players we have. We were absolutely sure playing the way we were, we would win away. We lost against Cardiff and Aston Villa, but football is like that."
The result takes City up to fourth in the Premier League, three points behind leaders Arsenal.