ofd.ru
v1.1.2
Published
API клиент ОФД OFD.ru на TypeScript
Downloads
297
Maintainers
Readme
ofd.ru
API клиент для работы с OFD.RU. На данный момент поддерживается только работа с API Ferma.
Использование
Установка
npm
npm i ofd.ru
pnpm
pnpm add ofd.ru
Yarn
yarn add ofd.ru
bun
bun add ofd.ru
Библиотека требует Node.js версии 18 и выше, либо другой соответствующей среды исполнения, в которой доступен fetch
API.
Пример
import { Ferma } from "ofd.ru";
const ferma = new Ferma({
login: "<ваш API логин Ferma>",
password: "<ваш API пароль Ferma>",
});
// Создать чек
const receiptId = await ferma.createReceipt({
Inn: "<ИНН>",
/// ...
})