re-actual

[![npm version](https://badge.fury.io/js/re-actual.svg)](https://badge.fury.io/js/re-actual) [![](https://github.com/believer/telefonnummer/workflows/Release/badge.svg)](https://github.com/believer/telefonnummer/actions?workflow=Release)

Usage no npm install needed!

<script type="module">
  import reActual from 'https://cdn.skypack.dev/re-actual';
</script>

README

ReScript bindings for Actual API

npm version

This package contains ReScrip bindings for the excellent Node API of Actual, @actual-app/api.

API documentation is best found in the official documentation. Some adjustments have been made to better suit the Reason ecosystem.

Get started

npm install re-actual

Add re-actual in bsconfig.json

{
  "dependencies": ["re-actual"]
}

Example

Here's a full example usage of getting accounts

open Actual;
open Js.Promise;

let api = Api.make;

let run = () => {
    api->Accounts.get
    |> then_(accounts => {
         Js.log(accounts);

         resolve();
       })
};

api->Run.withBudget("YOUR-BUDGET-ID", run);