Does anyone know if something has changed in the NYT API access, or how to reroute access to the API so that the connection is successful?
For my MFA thesis a couple years ago, I was scripting NYT API data into InDesign, using the Extendables library, and it worked great to call the necessary API URL. Now, after some time not using the scripts I'd written, the "http.get()"
no longer seems to make the connection, and I receive an error from the Extendables "index.jsx"
(from within the "core-packages/http/lib"
file structure) and the "this.process_headers = function () {"
which highlights "this.status = raw_head[0].split(' ')[1].to('int');"
which returns "undefined is not an object"
in ESTK.
A snippet of my code is:
var article_callURL = String(ny_article_search_baseURL + "&begin_date=" + begin_date + "&end_date=" + end_date + "&page=" + offset + sort_oldest + ny_article_key);
$.writeln(article_callURL);
//==Using extendables.jsx
var http = require("http");
var article_response = http.get(article_callURL);
if (article_response.status_code == 200) {
$.writeln(article_response.body);
} else {
$.writeln("Connection failed");
}
ESTK will write the article_callURL
, but never gets passed the
var http = require("http");
code. If someone could help me resolve this, it'd be greatly appreciated.