Usage
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
You can easily import this library using:
from pynytimes import NYTAPI
Then you can simply add your API key (get your API key from The New York Times Dev Portal):
nyt = NYTAPI("Your API key", parse_dates=True)
Make sure that if you commit your code to GitHub you don't accidentially commit your API key.
The following parameters can be set, only the key
parameter is required.
session
Optionally set your own request.session
requests.sessions.Session
False
requests.Session()
parse_dates
Enable the parsing of dates into datetime.datetime
or datetime.date
objects
bool
False
False