0.3.10 • Published 4 years ago

myfitnesspal-foodcalories v0.3.10

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

myfitnesspal-foodcalories

NPM

Get JSON Nutrient Data from myfitnesspal.

Reliability improved: now with auto retries.

myfitnesspal-foodcalories [flags] <start> <stop>
# <start>: start id (use 1001 for first item in myfitnesspal) 
# <stop>: stop id (excluding) (note: Id == nutrient no.) 
# [-o|--output]: write output to file (null) 
# [-c|--connections]: maximum number of connections (4) 
# [-t|--timegap]: request time gap in milliseconds (250) 
# [-r|--retries]: times to retry failed requests (4) 
# [-v|--verbose]: get detailed logs 
# [--help]: show help 
 
myfitnesspal-foodcalories 1001
# {"Id": "1001", "Number": "1001", "Name": "Butter - Salted", ...} 
myfitnesspal-foodcalories 1001 1100
# {"Id": "1001", "Number": "1001", "Name": "Butter - Salted", ...} 
# {"Id": "1002", "Number": "1002", "Name": "Butter, whipped, with salt", ...} 
# ... 
myfitnesspal-foodcalories 1000 1002 --output nutrients.txt
# STDERR: ["1000"] 
# (["1000"] is the list of failed ids) 
# (id 1001 is written to file) 
myfitnesspal-foodcalories 1001 1100 -o somanyfoods.txt -c 20 -t 512 -r 10 -v
# (try this) 
var foodcalories = require('myfitnesspal-foodcalories');
// foodcalories(<id>)

foodcalories('1001').then((ans) => console.log(ans));
// {"Id": "1001", "Number": "1001", "Name": "Butter - Salted", ...}
0.3.10

4 years ago

0.3.9

5 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.22

7 years ago

0.0.21

7 years ago

0.0.20

7 years ago

0.0.19

7 years ago

0.0.18

7 years ago

0.0.17

7 years ago

0.0.16

7 years ago

0.0.15

7 years ago

0.0.14

7 years ago

0.0.13

7 years ago

0.0.12

7 years ago

0.0.11

7 years ago

0.0.10

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago