You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@rocky_codes/fatsecret

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rocky_codes/fatsecret

Fatsecret is an unofficial API wrapper for the FatSecret nutrition database.

1.0.9
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
0
Weekly downloads
 
Created
Source

fatsecret.js Logo

Github       Docs

Fatsecret.js is an unofficial API wrapper for the FatSecret nutrition database.

Highlights

  • ✔ Full OAuth2 support
  • ✔ Fully defined types
  • ✔ Classes & helper methods for responses
  • ✔ Automatic access token refreshing

Installation

# npm
npm install --save-dev fatsecret.js

# yarn
yarn add fatsecret.js

Basic Usage

Simple example of getting a food with id 1234 and logging it to the console.

// initialize new client
const client = new FatSecret.Client({
  credentials: {
    clientId: 'fatsecret client id',
    clientSecret: 'fatsecret client secret',
    scope: ['premier', 'barcode'], // your scopes
  },
});

// get food with id
const foundFood = await client.getFood({ foodId: '1234' });

console.log(foundFood); // Food {id: '1234'...}

📌 Only 4 food related methods currently supported.

FAQs

Package last updated on 16 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts