Skip to content

Unofficial Haskell Client Library for the YNAB API

Notifications You must be signed in to change notification settings

linzjax/ynab-haskell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ynab-haskell

Work in progress: This is currently just a pet project, so I make no promises about maintaining it or functionality.

Getting your YNAB API Token

Head on over to YNAB's Personal Access Tokens page for instructions on generating a token.

Current Progress

To Do

In Progress

  • Implement functionality for all API endpoints
  • Add Tests
  • Rethink naming format

Done

Endpoint Progress

Attempting to implement functionality for all endpoints listed here, as of 2018-09-06.

User

  • [GET] /user - getUser

Budgets

  • [GET] /budgets
    • getBudgets
  • [GET] /budgets/{budget_id}
    • getBudgetById (budgetId :: Text)
  • [GET] /budgets/{budget_id}/settings
    • getBudgetSettingsById (budgetId :: Text)

Accounts

The Accounts for a budget.

  • [GET] /budgets/{budget_id}/accounts
    • getAccounts (budgetId :: Text)
  • [GET] /budgets/{budget_id}/accounts/{account_id}
    • getAccountById (budgetId :: Text) (accountId :: Text)

Categories

The Categories for a budget.

  • [GET] /budgets/{budget_id}/categories
    • getCategories (budgetId :: Text)
  • [GET] /budgets/{budget_id}/categories/{category_id}
    • getCategoriesById (budgetId :: Text) (categoryId :: Text)

Payees

The Payees for a budget.

  • [GET] /budgets/{budget_id}/payees
    • getPayees (budgetId :: Text)
  • [GET] /budgets/{budget_id}/payees/{payee_id}
    • getPayeeById (budgetId :: Text) (payeeId :: Text)

Payee Locations

When you enter a transaction and specify a payee on the YNAB mobile apps, the GPS coordinates for that location are stored, with your permission, so that the next time you are in the same place (like the Grocery store) we can pre-populate nearby payees for you! It’s handy and saves you time. This resource makes these locations available. Locations will not be available for all payees.

  • [GET] /budgets/{budget_id}/payee_locations
    • getPayeeLocations (budgetId :: Text)

Note about these two: since I don't use payee locations, I currently have no idea if these end points work. They should work in theory.

  • [GET] /budgets/{budget_id}/payee_locations/{payee_location_id}
    • getPayeeLocationById (budgetId :: Text) (plId :: Text)
  • [GET] /budgets/{budget_id}/payees/{payee_id}/payee_locations
    • getPayeeLocations (budgetId :: Text) (payeeId :: Text)

Months

Each budget contains one or more months, which is where To be Budgeted, Age of Money and Category (budgeted / activity / balances) amounts are available.

  • [GET] /budgets/{budget_id}/months
    • getBudgetMonths (budgetId :: Text)
  • [GET] /budgets/{budget_id}/months/{month}
    • getBudgetMonth (budgetId :: Text) (monthstring :: Text (i.e. "2018-09-01" or "current"))

Transactions

The Transactions for a budget.

  • [GET] /budgets/{budget_id}/transactions

    • getTransactions (budgetId :: Text)
  • [POST] /budgets/{budget_id}/transactions

    • postTransaction (budgetId :: Text) (SaveTransactionWrapper (transaction :: SaveTransaction))
    • postTransactions (budgetId :: Text) (SaveTransactionsWrapper (transactions :: [SaveTransaction]))
  • [POST] /budgets/{budget_id}/transactions/bulk

  • [GET] /budgets/{budget_id}/accounts/{account_id}/transactions

    • getTransactionsByAccountId (budgetId :: Text) (accountId :: Text)
  • [GET] /budgets/{budget_id}/categories/{category_id}/transactions

    • getTransactionsByCategoryId (budgetId :: Text) (categoryId :: Text)
  • [GET] /budgets/{budget_id}/payees/{payee_id}/transactions

    • getTransactionsByPayeeId (budgetId :: Text) (payeeId :: Text)
  • [GET] /budgets/{budget_id}/transactions/{transaction_id}

    • getTransactionsByTransactionId (budgetId :: Text) (transactionId :: Text)
  • [PUT] /budgets/{budget_id}/transactions/{transaction_id}

Scheduled Transactions

The Scheduled Transactions for a budget.

  • [GET] /budgets/{budget_id}/scheduled_transactions
    • getScheduledTransactions (budgetId :: Text)
  • [GET] /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}
    • getScheduledTransactionById (budgetId :: Text) (schedulTransactionId :: Text)

Shoutout to ConnorGriffin for his README.md format inspiration.

About

Unofficial Haskell Client Library for the YNAB API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published