eugenehoran / android-fatsecret-rest-api Goto Github PK
View Code? Open in Web Editor NEWImplementation of FatSecret REST API. method.search & method.get
Implementation of FatSecret REST API. method.search & method.get
I have implemented this FATSECRET API in my Android Project through Android Studio, but I keep getting this "no value for foods" error in the logcat everytime I search for some food. I don't know how but it was working at the very first time. After that it just doesn't work. Please help!!!
I implemented your code and there were no errors. I run it on my device but when i search an item in the search bar, on the logcat of eclipse I recieve error "No value for foods".
Please help me I am stuck on this issue for past 3 days.
I am getting following issue, Can anyone help?
{
"error": {
"code": 21,
"message": "Invalid IP address detected: '182.64.123.132'"
}
}
Hello
I am facing problem while fetching all the results(without specifying max_results and page_number) for the method "foods.search".
{ "foods": { "food": [ {"food_description": "Per 160g - Calories: 206kcal | Fat: 0.45g | Carbs: 44.50g | Protein: 4.24g", "food_id": "4501", "food_name": "White Rice", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/generic/rice-white-cooked-regular" }, {"food_description": "Per 197g - Calories: 216kcal | Fat: 1.75g | Carbs: 44.76g | Protein: 5.03g", "food_id": "4513", "food_name": "Brown Rice", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/generic/rice-brown-cooked-regular" }, {"brand_name": "Dream Dinners", "food_description": "Per 1/2 cup - Calories: 107kcal | Fat: 0.00g | Carbs: 23.00g | Protein: 3.00g", "food_id": "83389", "food_name": "Jasmine Rice", "food_type": "Brand", "food_url": "https://www.fatsecret.com/calories-nutrition/dream-dinners/jasmine-rice" }, {"food_description": "Per 883g - Calories: 768kcal | Fat: 13.24g | Carbs: 147.80g | Protein: 16.95g", "food_id": "5157", "food_name": "Spanish Rice", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/generic/spanish-rice" }, {"food_description": "Per 100g - Calories: 135kcal | Fat: 1.07g | Carbs: 27.64g | Protein: 2.64g", "food_id": "4502", "food_name": "Cooked Rice", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/generic/rice-cooked" }, {"brand_name": "Mahatma", "food_description": "Per 3/4 cup prepared - Calories: 160kcal | Fat: 0.00g | Carbs: 35.00g | Protein: 4.00g", "food_id": "59015", "food_name": "Basmati Rice", "food_type": "Brand", "food_url": "https://www.fatsecret.com/calories-nutrition/mahatma/basmati-rice" }, {"food_description": "Per 162g - Calories: 161kcal | Fat: 2.22g | Carbs: 31.06g | Protein: 4.12g", "food_id": "5134", "food_name": "Rice with Vegetables", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/generic/rice-with-vegetables-no-sauce" }, {"food_description": "Per 630g - Calories: 598kcal | Fat: 1.07g | Carbs: 131.37g | Protein: 11.90g", "food_id": "4514", "food_name": "Yellow Rice", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/generic/yellow-rice-cooked-regular" }, {"food_description": "Per 100g - Calories: 130kcal | Fat: 0.28g | Carbs: 28.17g | Protein: 2.69g", "food_id": "39719", "food_name": "White Rice (Long-Grain, Cooked)", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/usda/white-rice-(long-grain-cooked)" }, {"brand_name": "La Preferida", "food_description": "Per 1/2 cup - Calories: 90kcal | Fat: 2.00g | Carbs: 17.00g | Protein: 2.00g", "food_id": "101948", "food_name": "Spanish Rice", "food_type": "Brand", "food_url": "https://www.fatsecret.com/calories-nutrition/161DA8CF-1207-45BC-9271-1215704BA6B7" }, {"food_description": "Per 918g - Calories: 753kcal | Fat: 31.64g | Carbs: 107.93g | Protein: 12.64g", "food_id": "308754", "food_name": "Mexican Rice", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/generic/mexican-rice" }, {"brand_name": "Mahatma", "food_description": "Per 3/4 cup prepared - Calories: 160kcal | Fat: 0.00g | Carbs: 36.00g | Protein: 3.00g", "food_id": "47574", "food_name": "Jasmine Long Grain Rice", "food_type": "Brand", "food_url": "https://www.fatsecret.com/calories-nutrition/mahatma/jasmine-long-grain-rice" }, {"food_description": "Per 907g - Calories: 1152kcal | Fat: 36.54g | Carbs: 183.80g | Protein: 17.59g", "food_id": "5152", "food_name": "Flavored Rice Mixture", "food_type": "Generic", "food_url": "https://www.fatsecret.com/calories-nutrition/generic/flavored-rice-mixture" }, {"brand_name": "Riceland", "food_description": "Per 1/4 cup - Calories: 150kcal | Fat: 1.00g | Carbs: 32.00g | Protein: 3.00g", "food_id": "61800", "food_name": "Whole Grain Long Rice", "food_type": "Brand", "food_url": "https://www.fatsecret.com/calories-nutrition/riceland/whole-grain-long-rice" }, {"food_description": "Per 1023g - C
Getting above trimmed response.
Hi!
I try to connect the FatSecret (search) and the response is:
{ "error": {"code": 8, "message": "Invalid signature: oauth_signature 'YcFEXTtpJHILCdjtqAKgskB2WP4='" }}
Do you have any idea what is the problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.