Commit graph

7 commits

Author SHA1 Message Date
William Carroll
e3ee0734e5 Document more API requests
I'm continuing to use restclient-mode, and I'm enjoying it. Updating the scratch
file with more endpoints and credentials.
2020-02-10 10:06:40 +00:00
William Carroll
1b74342219 Support a restclient.el scratch buffer
I've been using restclient.el and `restclient-mode` lately to test API calls,
and I'm enjoying. I think it might make sense to track these scratch files in
the repo. Who knows? They may serve as a form of documentation.
2020-02-07 21:35:18 +00:00
William Carroll
74211a3c02 Support serde for Monzo and YNAB transaction structs
Define transaction structs for both Monzo and YNAB. Each package has a `main`
function that runs some shallow but preliminary round-trip tests for the
serializers and decoders.

The fixtures.json file that each of them is referencing has been ignored in case
either contains confidential data of which I'm unaware.
2020-02-07 21:33:08 +00:00
William Carroll
4f63b99cee Support YNAB personal-access-token
Define my YNAB personal access token as an environment variable. Prefix Monzo
environment variables with "monzo_" to more easily differentiate between Monzo
credentials and YNAB credentials.
2020-02-07 21:30:24 +00:00
William Carroll
b47ca8b876 Support lorri
From what I currently understand, lorri is a tool (sponsored by Target) that
uses nix and direnv to build and switch between environments quickly and
easily.

When you run `lorri init` inside of a directory, lorri creates a shell.nix and
an .envrc file. The .envrc file calls `eval "$(lorri direnv)"` and the shell.nix
calls `<nixpkgs>.mkShell`, which creates a shell environment exposing
dependencies on $PATH and environment variables. lorri uses direnv to ensure
that $PATH and the environment variables are available depending on your CWD.

lorri becomes especially powerful because of Emacs's `direnv-mode`, which
ensures that Emacs buffers can access anything exposed by direnv as well.

I still need to learn more about how lorri works and how it will affect my
workflow, but I'm enjoying what I've seen thus far, and I'm optimistic about the
road ahead.
2020-02-07 11:01:24 +00:00
William Carroll
fafabc6e4a Support OAuth 2.0 login flow for Monzo API
After some toil and lots of learning, monzo_ynab is receiving access and refresh
tokens from Monzo. I can now use these tokens to fetch my transactions from the
past 24 hours and then forward them along to YNAB.

If YNAB's API requires OAuth 2.0 login flow for authorization, I should be able
to set that up in about an hour, which would be much faster than it took me to
setup the login flow for Monzo. Learning can be a powerful thing.

See the TODOs scattered around for a general idea of some (but not all) of the
work that remains.

TL;DR
- Package monzo_ynab with buildGo
- Move some utility functions to sibling packages
- Add a README with a project overview, installation instructions, and a brief
  note about my ideas for deployment

Note: I have some outstanding questions about how to manage state in Go. Should
I use channels? Should I use a library? Are top-level variables enough? Answers
to some or all of these questions and more coming soon...
2020-02-05 23:33:23 +00:00
William Carroll
138070f3f6 Inherit parent's .envrc variables
I discovered direnv's convenient `source_up` function today. I needed it to
inherit the values defined in ~/briefcase/.envrc, and it's working exactly as I
expected it would. What a fine piece of software direnv is.
2020-02-05 23:26:57 +00:00