-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
begin to refactor this repository to the new jmpa-io sdk standard
- Loading branch information
Showing
36 changed files
with
639 additions
and
1,106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
spaces_around_operators = true | ||
spaces_around_brackets = false | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[{Makefile,go.mod,go.sum,*.go,.gitmodules}] | ||
[Makefile*] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[Dockerfile] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
ignore: | ||
- cmd/example/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
name: Dependabot | Auto-merge | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
repository_dispatch: | ||
types: [update-dependabot-automerge] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
checks: read | ||
statuses: read | ||
|
||
jobs: | ||
dependabot-automerge: | ||
if: startsWith(github.head_ref, 'dependabot/') | ||
uses: jmpa-io/pipelines/.github/workflows/00-dependabot-automerge.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
# ignore general files. | ||
.DS_store | ||
.DS_Store | ||
.vscode/ | ||
|
||
# ignore test files. | ||
out | ||
test.sh | ||
# ignore generated files. | ||
/out | ||
package.yml | ||
coverage.* | ||
dist/ | ||
*.zip | ||
*.pem | ||
traces.txt | ||
|
||
# ignore log files. | ||
super-linter.log | ||
# ignore test files. | ||
/test.sh | ||
|
||
# ignore folders generated via CI/CD. | ||
/depot | ||
/bin/[0-9][0-9]-*.sh | ||
/cf/[0-9][0-9]-*.yml | ||
/.github/templates/[0-9][0-9]-* | ||
# ignore compiled binaries in root. | ||
/main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
# Default PROJECT, if not given by another Makefile. | ||
ifndef PROJECT | ||
PROJECT=pocketsmith-go | ||
endif | ||
|
||
# Targets. | ||
example: binary-go-example | ||
run: example | ||
PHONY += run | ||
|
||
---: ## --- | ||
|
||
# Includes the common Makefile. | ||
# NOTE: this recursively goes back and finds the `.git` directory and assumes | ||
# this is the root of the project. This could have issues when this assumtion | ||
# is incorrect. | ||
include $(shell while [[ ! -d .git ]]; do cd ..; done; pwd)/Makefile.common.mk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
<!-- markdownlint-disable MD041 MD010 --> | ||
[![pocketsmith-go](https://github.com/jmpa-io/pocketsmith-go/actions/workflows/cicd.yml/badge.svg)](https://github.com/jmpa-io/pocketsmith-go/actions/workflows/cicd.yml) | ||
[![pocketsmith-go](https://github.com/jmpa-io/pocketsmith-go/actions/workflows/README.yml/badge.svg)](https://github.com/jmpa-io/pocketsmith-go/actions/workflows/README.yml) | ||
|
||
<p align="center"> | ||
<img src="img/logo.png"/> | ||
</p> | ||
|
||
# `pocketsmith-go` | ||
## `pocketsmith-go` | ||
|
||
```diff | ||
+ 📚 A Go abstraction over the Pocketsmith API: | ||
+ https://developers.pocketsmith.com/docs. | ||
+ 📚 A Go abstraction over the Pocketsmith API: https://developers.pocketsmith.com/docs. | ||
``` | ||
|
||
<a href="LICENSE" target="_blank"><img src="https://img.shields.io/github/license/jmpa-io/pocketsmith-go.svg" alt="GitHub License"></a> | ||
[![CI/CD](https://github.com/jmpa-io/pocketsmith-go/actions/workflows/cicd.yml/badge.svg)](https://github.com/jmpa-io/pocketsmith-go/actions/workflows/cicd.yml) | ||
[![Automerge](https://github.com/jmpa-io/pocketsmith-go/actions/workflows/.github/workflows/dependabot-automerge.yml/badge.svg)](https://github.com/jmpa-io/pocketsmith-go/actions/workflows/.github/workflows/dependabot-automerge.yml) | ||
[![Codecov](https://codecov.io/github/jmpa-io/pocketsmith-go/graph/badge.svg?token=8LXBLNQSOW)](https://codecov.io/github/jmpa-io/pocketsmith-go) | ||
|
||
## `API Coverage` | ||
|
||
The following API endpoints are currently covered by this package: | ||
|
||
// TODO | ||
|
||
## `Usage` | ||
|
||
// TODO | ||
|
||
## `License` | ||
|
||
This work is published under the MIT license. | ||
|
||
Please see the [`LICENSE`](./LICENSE) file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package pocketsmith | ||
|
||
import "time" | ||
|
||
// Account defines a PocketSmith account. | ||
// https://developers.pocketsmith.com/reference#get_accounts-id | ||
type Account struct { | ||
ID int `json:"id"` | ||
Title string `json:"title"` | ||
Type string `json:"type"` | ||
IsNetWorth bool `json:"is_net_worth"` | ||
CurrencyCode string `json:"currency_code"` | ||
CurrentBalance float64 `json:"current_balance"` | ||
CurrentBalanceInBaseCurrency float64 `json:"current_balance_in_base_currency"` | ||
CurrentBalanceExchangeRate float64 `json:"current_balance_exchange_rate"` | ||
CurrentBalanceDate string `json:"current_balance_date"` | ||
PrimaryTransactionAccount TransactionAccount `json:"primary_transaction_account"` | ||
TransactionAccounts []TransactionAccount `json:"transaction_accounts"` | ||
CreatedAt time.Time `json:"created_at"` | ||
UpdatedAt time.Time `json:"updated_at"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package pocketsmith | ||
|
||
import "time" | ||
|
||
// Attachment defines a PocketSmith attachment. | ||
// https://developers.pocketsmith.com/reference#get_attachments-id | ||
type Attachment struct { | ||
ID int `json:"id"` | ||
Title string `json:"title"` | ||
FileName string `json:"file_name"` | ||
Type string `json:"type"` | ||
ContentType string `json:"content_type"` | ||
ContentTypeMeta struct { | ||
Title string `json:"title"` | ||
Description string `json:"description"` | ||
Extension string `json:"extension"` | ||
} `json:"content_type_meta"` | ||
OriginalURL string `json:"original_url"` | ||
Variants struct { | ||
ThumbURL string `json:"thumb_url"` | ||
LargeURL string `json:"large_url"` | ||
} `json:"variants"` | ||
CreatedAt time.Time `json:"created_at"` | ||
UpdatedAt time.Time `json:"updated_at"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.