@marceloclp/monzojs
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

MonzoJS

Unofficial wrapper for the Monzo API written in TypeScript.

NPM

MonzoJS does not handle authentication, and you must already have your access token in hands.

Installation

npm i @marceloclp/monzojs

Usage

MonzoJS exports all endpoints as unauthed endpoints in case you do not need access to all of the methods:

import { getTransactions } from '@marceloclp/monzojs'

const example = async () => {
  // Note the use of the access token.
  const transactions = await getTransactions('myAccessToken', { limit: 50 })
}

Or you can import the client which will return an object containing all authenticated endpoints:

import MonzoClient from '@marceloclp/monzojs'

const example = async () => {
  const client = MonzoClient('myAccessToken')
  const transactions = await client.getTransactions({ limit: 50 })
  const accounts = await client.getAccounts()
}

API

Here is a list of all the existing endpoints:

Accounts

  • getAccounts()

Attachments

  • uploadAttachment()
  • registerAttachment()
  • deregisterAttachment()

Balance

  • getBalance()

Feed Items

  • createFeedItem()

Pots

  • getPots()
  • depositIntoPot()
  • withdrawFromPot()

Receipts

  • getReceipt()
  • createReceipt()
  • updateReceipt()
  • deleteReceipt()

Transactions

  • getTransaction()
  • getTransactions()
  • annotateTransaction()
  • safelyAnnotateTransaction()

Webhooks

  • getWebhooks()
  • createWebhook()
  • deleteWebhook()

Readme

Keywords

Package Sidebar

Install

npm i @marceloclp/monzojs

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

67.4 kB

Total Files

84

Last publish

Collaborators

  • marceloclp