{"id":48912435,"url":"https://github.com/libec/ynab-kmp-api","last_synced_at":"2026-04-17T00:08:51.055Z","repository":{"id":242475232,"uuid":"783815722","full_name":"libec/ynab-kmp-api","owner":"libec","description":"A multiplatform Kotlin library for a public YNAB API","archived":false,"fork":false,"pushed_at":"2024-12-06T09:19:39.000Z","size":250,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-06T10:24:45.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-08T16:17:19.000Z","updated_at":"2024-12-06T09:19:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f615b48-9689-49e8-931b-1326105e33ef","html_url":"https://github.com/libec/ynab-kmp-api","commit_stats":null,"previous_names":["libec/ynab-kmp-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/libec/ynab-kmp-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libec%2Fynab-kmp-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libec%2Fynab-kmp-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libec%2Fynab-kmp-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libec%2Fynab-kmp-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libec","download_url":"https://codeload.github.com/libec/ynab-kmp-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libec%2Fynab-kmp-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31909237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"ssl_error","status_checked_at":"2026-04-16T18:21:47.142Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-17T00:08:50.350Z","updated_at":"2026-04-17T00:08:51.020Z","avatar_url":"https://github.com/libec.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[YNAB](https://www.ynab.com/) (You Need A Budget) is a great piece of budgeting software with a [public API](https://api.ynab.com/). This is a multiplatform Kotlin library for that API that compiles for JVM for Android and LLVM for iOS.\n\nThe feature set is not 1:1 to the public API, but it's a good starting point built on solid foundations.\n\n## Motivation\nI'm an iOS developer interested in sharing code across platforms without compromising the native experience. I knew zero Kotlin before this, but learning by doing is my jam, and doing something useful like sharing data access code is a great starting point that is just a step away from sharing business logic to ensure consistency across the whole product.\n\n## Usage\n\nCheck `EndToEndTests` in Kotlin and in Swift for a executable example of how to use the library.\n\nReplace null with your token (also, don't commit your access token to git):\n\n```kotlin\nval accessToken: String? = null\n```\n\nInject your access token to start a session:\n```kotlin\nval ynabSession = YnabSession(UserAuthentication(accessToken))\n```\n\nSession scoped repositories hold your data for the lifetime of the session:\n```kotlin\nval budgetRepository = ynabSession.getBudgetsRepository()\nval accountsRepository = ynabSession.getAccountsRepository()\nval payeesRepository = ynabSession.getPayeesRepository()\nval categoriesRepository = ynabSession.getCategoriesRepository()\nval transactionsRepository = ynabSession.getTransactionsRepository()\n```\n\nFetch your data:\n```kotlin\nbudgetRepository.fetchAllBudgets()\naccountsRepository.fetchAccounts(budgetId = budget.id)\npayeesRepository.fetchPayees(budgetId = budget.id)\ncategoriesRepository.fetchCategories(budgetId = budget.id)\n```\n\nSubscribe to updates:\n```kotlin\nbudgetRepository.budgets.map { budgets -\u003e\n    // Do your domain or presentation magic here\n}\n\ncategoriesRepository.categories.map { categories -\u003e\n    // Do your domain or presentation magic here\n}\n```\n\n## Why bother with Repositories and not just expose Resources\nTo [quote myself](https://mobileit.cz/Blog/Pages/swift-ui-and-architecture-state.aspx):\n\n\u003e A repository is a design pattern that abstracts data access logic from business access logic by exposing the collection-like interface to access business entities. The actual implementation of the interface might communicate with the database,  REST API, and what your project requires...\n\nA repository is a great place for possible implementation of caching and compilation of delta requests as described in the [public API](https://api.ynab.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibec%2Fynab-kmp-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibec%2Fynab-kmp-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibec%2Fynab-kmp-api/lists"}