New York Times

class orangecontrib.text.nyt.NYT(api_key)[source]

Class for fetching records from the NYT API.

Parameters:api_key (str) – NY Time API key.

Checks whether api key given at initialization is valid.

search(query, date_from=None, date_to=None, max_docs=None, on_progress=None, should_break=None)[source]
  • query (str) – Search query.
  • date_from (date) – Start date limit.
  • date_to (date) – End date limit.
  • max_docs (int) – Maximal number of documents returned.
  • on_progress (callback) – Called after every iteration of downloading.
  • should_break (callback) – Callback for breaking the computation before the end. If it evaluates to True, downloading is stopped and document downloaded till now are returned in a Corpus.

Search results.

Return type: