Automating a hybrid app in the latest appium version

I am trying to automate a hybrid app but after upgrading to appium 2 my old code displayed in the attached picture is not working anymore and I can’t find the way to enter the webview context

-MobileCapabilityType is not working anymore
-getContextHandles doesn’t exist anymore