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-mashery-foodessentials
The FoodEssentials Sample App utilizes the FoodEssentials API for Food Product Search, Label Array, and Ingredients information. XDK's App Designer which features code and design (drag and drop functionality) was used to create this app. jQuery Mobile, one of four optional frameworks in XDK (other frameworks include Intel's App Framework, Bootstrap 3, and Topcoat) was selected for this project. Please see the below instructions for building the "FoodEssentials Sample App" with Intel XDK.
Intel XDK: Download The FoodEssentials Sample App
Open Intel XDK > Log In > Start A New Project > Work with a Demo > Mashery FoodEssentials API > USE THIS DEMO > Name your project > Create > OK
FoodEssentials: Obtain Your FoodEssentials API Key
Go to http://developer.foodessentials.com/ Register > Click confirmation link in your email > My Account > Get API Keys > Register Application > Copy Your API Key For Later Use
FoodEssentials: Test Your FoodEssentials API Key & Get Food Product Information
Go to FoodEssentials Interactive Documentation I/O Docs http://developer.foodessentials.com/io-docs and Click Create Session > Try it! > Click Search Products > Try It! (Response Body with FoodEssentials' Search Products results data will display along with Request URI, Request Headers, Request Body, Response Status, and Response Headers)
Intel XDK: Input Your FoodEssentials API Key Into FoodEssentials Sample App
Return to your FoodEssentials Sample App in Intel XDK and in the left file directory select foodessentials.js > Input your FoodEssentials API key into 'PLACE-YOUR-API-KEY-HERE'> Save > Select the EMULATE tab > Type Orange in the input box > Press Search to view product results > Press Get Label Summary to view product ingredients
Congratulations! You are done.
Additional Notes
Select the DEVELOP tab and in the left file directory select foodessentials.js
You will notice that various comments in the JavaScript code are included to help you better understand the API method mechanics including "Check Key Validity" and "Search Callback." The FoodEssentials 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.