The docs for getting a stream in the new API are here: https://dev.twitch.tv/docs/api/reference/#get-streams
So the main changes you’ll need to make are using the user_login querystring param to specify the user (if you wish to continue doing it by their username) rather than as part of the path. You’ll also have to include your client id as the Client-ID header, you can’t send it as a querystring param any more. Finally, the results you get back will differ so you will need to look at how the response differs as shown in the example on the docs page and adjust as accordingly.