There has been a changed of API as mentioned here. Look at the examples or the docs for more information.