draxil / starling-el

Access to Starling bank info, from Emacs!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is this?

If you bank with starling bank, you can get a personal API token which lets you access information from your account. As with most computing activities I want to do this from emacs because.. Well if you are an emacs user you will understand!

Currently I use it to quickly glance at the state of my “spaces” from emacs, but more capibilities may follow. Depending on interest (mine and others!).

Warning!

This is currently just at the very early “itch scratch” stage, so may change wildly or be abandoned.

Getting Started

Getting a personal token

First you need a personal access token from starling, and to hook this up to your account. See

https://developer.starlingbank.com/get-started

Mostly, sign up for a dev account and then follow the section called “Personal Access”, connect your account and create a token.

Only grant rights you want the token to be allowed. I should add a proper list of what the code can do here at some point!

Save your token somewhere emacs can find it

You should be careful with your access token, it allows access to your personal financial information! Emacs has a whole system for managing passwords, see documentation on auth-sources if you’d like full detail, but simplest is to add a line to ~/.authinfo.gpg (or without .gpg on the end if you don’t want to encrypt it) a line like:

machine api.starlingbank.com login personal-token password <insert your personal token here>

On various platforms you can hook emacs into more sophisticated password management easily enough, important details here are the hostname and login (personal-token) which is how we find the token when we need it.

Install this package

There is no ELPA etc for this yet, if you happen to use straight + use-package:

(use-package plz
:straight t)
(use-package starling
:straight `(starling :type git :host github :repo "draxil/starling-el"))

Otherwise it’s currently a case of cloning this repo and giving emacs access (see [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Libraries.html][here] for clues). You’ll need plz installed as well, using the method of your choice, or M-x package-install and choose plz.

Proper packaging will probably come if you bug me :)

Using the package

Currently the only available UI is seen via M-x starling-spaces which should give a quick read on all your spaces. Press return (by default) on a space to see recent transactions.

Limitations

Many! But some notable ones:

  • Only cares about one account.
  • Only gets transactions for one month.

Internals you might be interested in!

The starling--do function should allow easy access to other starling API endpoints I haven’t bothered to use yet. See that function’s documentation for more.

Contributors

Joe - draxil@gmail.com

About

Access to Starling bank info, from Emacs!

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%