Sai Roy, please go
here, where you will read this:-
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
By providing a complete answer you are depriving nirjari patel of the opportunity to learn how to find such information for oneself.
Please don't be annoyed, but I have pulled rank and deleted the solution and explanation, NP will actually have a chance to learn how to navigate the API documentation.