lunch-money
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

Lunch Money JS

Installing

npm install lunch-money

The NPM module also makes types available to TypeScript.

Usage

import LunchMoney, { Asset } from 'lunch-money';

const lunchMoney = new LunchMoney( { token: 'my-api-token' } );

lunchMoney.getAssets().then( ( assets: Asset[] ) => {
	console.log( assets )
} ).catch ( error => {
	console.error( error );
} );

Or, if you are using ESM:

import {LunchMoney} from 'lunch-money'
const lunchMoney = new LunchMoney( { token: 'my-api-token' } );
const assets = await lunchMoney.getAssets();

API

Get all assets (manually managed accounts):

LunchMoney.getAssets() : Promise<Asset>

Get all transactions:

LunchMoney.getTransactions( arguments?: TransactionsEndpointArguments ) : Promise<Transaction[]>

Create transactions

LunchMoney.createTransactions(
	transactions: DraftTransaction[],
	applyRules = false,
	checkForRecurring = false,
	debitAsNegative = false
) : Promise<any>

Examples

There are many open source projects with example code you can use to quickly build your integration:

https://lunchmoney.dev/#awesome-projects

Readme

Keywords

Package Sidebar

Install

npm i lunch-money

Weekly Downloads

6

Version

0.5.0

License

MIT

Unpacked Size

22.9 kB

Total Files

6

Last publish

Collaborators

  • joehoyle
  • lunchbag
  • iloveitaly