Skip to content

lukasmalkmus/expensify-go

Repository files navigation

lukasmalkmus/expensify-go

An Expensify API client. - by Lukas Malkmus

Go Reference Go Workflow Coverage Status Go Report Latest Release License


Table of Contents

  1. Introduction
  2. Usage
  3. Contributing
  4. License

Introduction

expensify-go is an opinionated client library for the Expensify API. I created it in order to add expenses which makes it the only method currently supported.

Usage

Installation

go get github.com/lukasmalkmus/expensify-go

Usage

// Get credentials from https://www.expensify.com/tools/integrations.
client, err := expensify.NewClient("XXX-REPLACE-ME-XXX", "XXX-REPLACE-ME-XXX")
if err != nil {
    // Handle error!
}

expense := &expensify.Expense{
    Merchant: "Apple Inc.",
    Created:  expensify.NewTime(time.Now()),
    Amount:   99,
    Currency: "USD",
}

res, err := client.Expense.Create(context.TODO(), "you@example.com", []*expensify.Expense{exp})
if err != nil {
    // Handle error!
}

fmt.Println(res[0].TransactionID)

Contributing

Feel free to submit PRs or to fill Issues. Every kind of help is appreciated.

License

© Lukas Malkmus, 2020

Distributed under MIT License (The MIT License).

See LICENSE for more information.

License Status

About

A very opinionated Expensify API client for Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published