Integrating APIs with XDK - Beats Music Sample App

Download Intel XDK and sign up for an Intel XDK account > find this app under Start A New Project > Work with a Demo or find the source code for this sample app here: https://github.com/gomobile/sample-masherybeatsmusic

The Beats Music Sample App displays music playlist content including album images and song titles as shown below. XDK's App Designer which features code and design (drag and drop functionality) was used to create this app. Intel App Framework, one of four optional frameworks in XDK (Bootstrap 3, jQuery Mobile, and Topcoat) was selected for this project. Please see the below instructions for building the "Beats Music Sample App" with Intel XDK.

Intel XDK: Download the Beats Music Sample App
Open Intel XDK > Log In > Start A New Project > Work with a Demo > Mashery Beats Music > USE THIS DEMO > Name your project > Create > OK

Beats Music: Obtain Your Beats Music API Key
Go to https://developer.beatsmusic.com Register > Click confirmation link in your email > My Account > Get API Keys > Register Application > Copy Your API Key For Later Use

Beats Music: Test Your Beats Music API Key & Get Current "Featured" Playlist Content
Go to Playground (aka I/O Docs) https://developer.beatsmusic.com/io-docs Select Highlights > Get Featured (Drop Down Will Appear) > Try It! (Response Body with Featured Playlist Content will display along with Request URI, Request Headers, and Response Status)

Intel XDK: Insert Your Beats Music API Key Into The Beats Music Sample App
Return to your Beats Music Sample App in Intel XDK and in the left file directory select js > api.js > Input your Beats Music API key into 'PLACE-YOUR-API-KEY-HERE' > Save > Select the EMULATE tab > Press the Featured or Editor Picks Button to display Beats Music Featured or Editor Picks Playlist Content

Congratulations! You are done.

Additional Notes
Select the DEVELOP tab and in the left file directory select js > api.js

You will notice that various comments in the JavaScript code are included to help you better understand the API method mechanics including "Check if valid API key" and "Make featured API call to Beats Music." The Beats Music Sample App is part of a series of Mashery sample apps that demonstrate API integration in Intel XDK. To discover other interesting RESTful APIs for your next app, visit http://developer.mashery.com/apis.

Para obtener información más completa sobre las optimizaciones del compilador, consulte nuestro Aviso de optimización.