We’ve just made the NY Times Article Search Plug-in available. The API allows you to interact with NY Times articles. To make it easier to use the API to make mobile apps in Appery.io, we created a plug-in with some ready-made services (interfaces) to use the NY Times Article Search API.
- Login to appery.io and start new Application
- Select Create new -> From Plug-in, check NY Times Article Search Plugin
- On the NY Times developers site http://developer.nytimes.com/page you need to register and get API keys for Article Search API. Then you need to fill the parameter article_api_key in NYTIMES_Settings
To find articles you are interested in using the app, you follow these steps:
- In the Search enter the keywords
- Choose the dates when the article was published
- Click Search Article button
- You will get the list of articles
Under the Hood
Now that we’ve walked through the app, let’s take a peek under the hood.
The NYTIMES_ArticleSearch service is linked to UI components as part of the design of the app. It is used to search the article.
For mapping the NYTIMES_ArticleSearch service add it to the StartScreen and make it as shown below:
On the Request tab for begin_date and end_date parameters add the following JS code:
On the Response tab for date response field add the following JS code: