Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azz/up-api-google-sheets
Prototype for using the Up Banking API in Google Sheets
https://github.com/azz/up-api-google-sheets
google-sheets hacktoberfest up-api up-banking
Last synced: 4 months ago
JSON representation
Prototype for using the Up Banking API in Google Sheets
- Host: GitHub
- URL: https://github.com/azz/up-api-google-sheets
- Owner: azz
- License: mit
- Created: 2020-09-23T14:26:30.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-27T22:54:07.000Z (10 months ago)
- Last Synced: 2024-03-27T23:37:34.563Z (10 months ago)
- Topics: google-sheets, hacktoberfest, up-api, up-banking
- Language: JavaScript
- Homepage:
- Size: 121 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# up-api-google-sheets
Prototype for using the [Up Banking API](https://developer.up.com.au/) in Google Sheets.
> **NOTE:** The Up API is in beta release for personal use only.
## Installation
1. Create a new Google Sheet and select "Extensions" → "Apps Script".
2. Paste in the contents of [`up.js`](https://github.com/azz/up-api-google-sheets/blob/master/up.js) into the code window.
3. Save the script, and rename the project to "Up API" and accept the authorization request (you may need to proceed through a security warning, as this is not a published Addon).
4. Click the "Run" button with the "onOpen" function selected.
5. Go back to your Google Sheet and you should have a new "Up API" drop-down. Select"Up API" → "Set Up...".## Usage
Once you have authenticated ("Up API" → "Set Up..."), you will be able to insert formulas.
All the formulas provided by this script can be inserted from the "Up API" menu. Doing so will insert the formula, apply some styling, then auto-size the columns. Alternatively, you can enter in the formulas manually.
You can share a sheet with someone else and they will have to use their own personal access token. None of your data will be shared.
Your token will only be stored for one day. After this time your data will be cleared and you will have to re-authenticate.
## Functions
-
UP_TRANSACTIONS(yeah, filterQuery, type) -
Retrieve transactions across all of your Up accounts.
-
UP_TRANSACTIONS_BETWEEN(yeah, since, until, filterQuery, type) -
Retrieve all transactions between two dates.
-
UP_TRANSACTIONS_FOR_ACCOUNT(yeah, accountId, filterQuery, type) -
Retrieve transactions from a specific Up account.
-
UP_ACCOUNTS(yeah) -
Retrieve all your Up accounts, including balances.
-
UP_CATEGORIES(yeah) -
Retrieve all Up pre-defined categories, including parent categories.
-
UP_TAGS(yeah) -
Retrieve all your user-defined tags.
-
UP_PING(yeah) -
Ping the Up API to validate your token.
## UP_TRANSACTIONS(yeah, filterQuery, type)
Retrieve transactions across all of your Up accounts.
**Kind**: global function
**Returns**: Up Transactions
**Customfunction**:
| Param | Type | Default | Description |
| ----------- | ----------------------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------- |
| yeah | | | Dependencies. |
| filterQuery | string
| | The filter querystring to use, e.g. `"filter[status]=HELD&filter[category]=booze"`. |
| type | "DEBIT"
\| "CREDIT"
| | Further filter transactions by direction (ALL/CREDIT/DEBIT). |
**Example**
```js
=UP_TRANSACTIONS(Yeah, "filter[category]=takeaway", "DEBIT") // All outgoing transactions classified as "takeaway".
```
## UP_TRANSACTIONS_BETWEEN(yeah, since, until, filterQuery, type)
Retrieve all transactions between two dates.
**Kind**: global function
**Returns**: Up Transactions
**Customfunction**:
| Param | Type | Default | Description |
| ----------- | ----------------------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------- |
| yeah | | | Dependencies. |
| since | Date
| | The start date. |
| until | Date
| | The end date. |
| filterQuery | string
| | The filter querystring to use, e.g. `"filter[status]=HELD&filter[category]=booze"`. |
| type | "DEBIT"
\| "CREDIT"
| | Further filter transactions by direction (ALL/CREDIT/DEBIT). |
**Example**
```js
=UP_TRANSACTIONS_BETWEEN(Yeah, TODAY() - 7, TODAY()) // All transactions in the last week.
```
**Example**
```js
=UP_TRANSACTIONS_BETWEEN(Yeah, A1, B1) // All transactions between the dates set in cells `A1` and `B1`.
```
## UP_TRANSACTIONS_FOR_ACCOUNT(yeah, accountId, filterQuery, type)
Retrieve transactions from a specific Up account.
**Kind**: global function
**Returns**: Up Transactions
**Customfunction**:
| Param | Type | Default | Description |
| ----------- | ----------------------------------------------------------------- | ------------- | ----------------------------------------------------------------------------------- |
| yeah | | | Dependencies. |
| accountId | string
| | The Up Account ID. |
| filterQuery | string
| | The filter querystring to use, e.g. `"filter[status]=HELD&filter[category]=booze"`. |
| type | "DEBIT"
\| "CREDIT"
| | Further filter transactions by direction (ALL/CREDIT/DEBIT). |
**Example**
```js
=UP_TRANSACTIONS_FOR_ACCOUNT(Yeah, "aaaa-bbbb-cccc-dddd-eee") // All transactions for the specified account.
```
## UP_ACCOUNTS(yeah)
Retrieve all your Up accounts, including balances.
**Kind**: global function
**Returns**: Up Accounts
**Customfunction**:
| Param | Description |
| ----- | ------------- |
| yeah | Dependencies. |
**Example**
```js
=UP_ACCOUNTS(Yeah) // Get all accounts.
```
## UP_CATEGORIES(yeah)
Retrieve all Up pre-defined categories, including parent categories.
**Kind**: global function
**Returns**: Up Categories
**Customfunction**:
| Param | Description |
| ----- | ------------- |
| yeah | Dependencies. |
**Example**
```js
=UP_CATEGORIES(Yeah) // Get all categories.
```
## UP_TAGS(yeah)
Retrieve all your user-defined tags.
**Kind**: global function
**Returns**: Up Tags
**Customfunction**:
| Param | Description |
| ----- | ------------- |
| yeah | Dependencies. |
**Example**
```js
=UP_TAGS(Yeah) // Get all tags.
```
## UP_PING(yeah)
Ping the Up API to validate your token.
**Kind**: global function
**Returns**: Up Ping
**Customfunction**:
**Example**
```js
=UP_PING(Yeah) // Ping the API.
```