New York Times¶
-
class
orangecontrib.text.nyt.NYT(api_key)[source]¶ An Orange text mining extension class for fetching records from the NYT API.
-
check_api_key()[source]¶ Checks whether the api key provided to this class instance, is valid.
Returns: True or False depending on the validation outcome.
-
run_query(query, date_from=None, date_to=None, max_records=10)[source]¶ Executes the NYT query specified by the input parameters and returns a list of records.
Parameters: - query (str) – The query keywords in a string, but separated with whitespaces.
- date_from (date) – Signifies to return articles from this date forth only.
- date_to (date) – Signifies to return articles up to this date only.
- max_records (int) – Specifies an upper limit to the number of retrieved records. Max 1000.
Returns: A list of records.
-