NYTimes v1 API returns 401, updated to v2 API

I tried running the script and it wasn't working. Running it in the browser returns a 404 response. I got the script working again w/ the v2 API. Here's the changes I made.