If you find any errors, typos or have general feedback, select the text and click CTRL+ALT+ENTER.

What are we going to build?

In this tutorial, you’ll learn how to build an app that interacts with the USA Today API plug-in. You’ll be able to read the news, as well as music, movie and book reviews.

Before you begin

Tutorial level: intermediate.

Before using the USA Today API plug-in, you’ll need to sign up for a developer account (http://developer.usatoday.com/) to get keys. You can sign up after importing the plug-in.

Create a new project

1. Click “Create new app,” enter USATodayApp for an app name, and click “Create”.

Once the editor loads, you’ll see something like:NEWAPP

2. On the left-hand side, click Pages > startScreen – an editor with an empty startScreen will open:EmptyStartScreen

Import the plug-in

1. To import the plug-in, click CREATE NEW > From Plug-in:
CreateNewPlugin

2. In the News category, check “USA Today API”:
AddPlugin

3. Click “Import selected plug-ins”. You’ll be asked whether you want to set a file with API keys. Before being able to read news and reviews, you’ll need to sign up for a developer account. You will then get keys. You can skip entering the values right now; you can always set them in Services > USATODAY_ServicesSettings:USATodaySettings

4. Once the plugin is imported, you can test the app:Cropped

View & map the services

You can open the USATODAY_TopNews REST service, which is used for getting the list of top news offered by USA Today.

The service settings:
USATODAY_TopNewsSettings

Request parameters:RequestParams

Response parameters:ResponseParams

The service mappings:TopNewListMapping

The USATODAY_LeaguesList REST service is used for getting the list of available sports leagues. The service settings:USATodayLeaguesListSettings

Request parameters:USATodayLeaguesListRequest

Response parameters:USATodayLeaguesListSuccess

The service mappings:LeaguesListSuccessMapping