Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thanks for making this! #88

Closed
evanpurkhiser opened this issue Sep 1, 2023 · 1 comment
Closed

Thanks for making this! #88

evanpurkhiser opened this issue Sep 1, 2023 · 1 comment
Labels
triage This will looked at

Comments

@evanpurkhiser
Copy link

Not an issue, just wanted to say thank you!!

Planning to use this in my venmo-auto-cashout tool

@github-actions github-actions bot added the triage This will looked at label Sep 1, 2023
@juftin
Copy link
Owner

juftin commented Sep 9, 2023

Sweet! and thank you! I will check that out. If you ever need it, there's a still undocumented app helper class in the plugins:

"""
Lunchable App Demo
"""

import logging
from typing import Dict, List

from lunchable.models import PlaidAccountObject, TransactionObject
from lunchable.plugins import LunchableTransactionsApp
from lunchable.plugins.base.base_app import LunchableDataContainer

logging.basicConfig(level=logging.DEBUG)

# get the app, cache time defaults to 0 which does not use local storage cache
app = LunchableTransactionsApp(cache_time=0)

# Get the latest data from the API for all resources, all time
app.get_latest_cache()

# Access the app data container
app_data: LunchableDataContainer = app.lunch_data

# Data is stored in a dictionary with the key being the resource id
transactions: Dict[int, TransactionObject] = app_data.transactions
# Access transactions by id, or get all transactions with `.values()`
all_transactions: List[TransactionObject] = list(transactions.values())

# Refresh just the PlaidAccountObject data
app.get_latest_cache(include=[PlaidAccountObject])
all_accounts: List[PlaidAccountObject] = list(app.lunch_data.plaid_accounts.values())

@juftin juftin closed this as completed Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage This will looked at
Projects
None yet
Development

No branches or pull requests

2 participants