Welcome to the NY Times Most Popular SDK documentation. This guide will help you get started with integrating and using the NytMostPopular SDK in your project.
- API version:
2.0.0
- SDK version:
1.0.0
Provides services for getting the most popular articles on NYTimes.com based on emails, shares, or views. Get most emailed articles for the last day: /emailed/1.json
Get most shared articles on Facebook for the last day: /shared/1/facebook.json
Get most viewed articles for the last seven days: /viewed/7.json
## Example Calls https://api.nytimes.com/svc/mostpopular/v2/emailed/7.json?api-key=yourkey
https://api.nytimes.com/svc/mostpopular/v2/shared/1/facebook.json?api-key=yourkey
https://api.nytimes.com/svc/mostpopular/v2/viewed/1.json?api-key=yourkey
This SDK is compatible with the following versions: TypeScript >= 4.8.4
To get started with the SDK, we recommend installing using npm
:
npm install nyt-most-popular
The SDK provides various services to interact with the API.
Below is a list of all available services with links to their detailed documentation:
Name |
---|
MostPopularService |
The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.
Below is a list of all available models with links to their detailed documentation:
This SDK is licensed under the MIT License.
See the LICENSE file for more details.