UNPKG

@marceloclp/monzojs

Version:

Unofficial wrapper for the Monzo API written in TypeScript.

15 lines (14 loc) 620 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBalance = void 0; const create_request_1 = __importDefault(require("../utils/create-request")); /** * Returns balance information for a specific account. * * @see https://docs.monzo.com/#read-balance */ const getBalance = async (accessToken, { accountId }) => (0, create_request_1.default)(accessToken).withQuery({ account_id: accountId }).get(`balance`); exports.getBalance = getBalance;