{"id":38279623,"url":"https://github.com/sritejakv/splitwise-java","last_synced_at":"2026-01-17T01:56:24.300Z","repository":{"id":57727938,"uuid":"195564780","full_name":"sritejakv/splitwise-java","owner":"sritejakv","description":"Java SDK for Splitwise","archived":false,"fork":false,"pushed_at":"2025-06-08T07:49:22.000Z","size":19,"stargazers_count":11,"open_issues_count":4,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T16:16:36.666Z","etag":null,"topics":["java","maven","mockito-junit-test","rest-api","splitwise","splitwise-sdk"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sritejakv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-06T17:13:37.000Z","updated_at":"2025-06-08T07:49:26.000Z","dependencies_parsed_at":"2023-02-08T07:45:31.429Z","dependency_job_id":null,"html_url":"https://github.com/sritejakv/splitwise-java","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sritejakv/splitwise-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sritejakv%2Fsplitwise-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sritejakv%2Fsplitwise-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sritejakv%2Fsplitwise-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sritejakv%2Fsplitwise-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sritejakv","download_url":"https://codeload.github.com/sritejakv/splitwise-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sritejakv%2Fsplitwise-java/sbom","scorecard":{"id":844040,"data":{"date":"2025-08-11","repo":{"name":"github.com/sritejakv/splitwise-java","commit":"489c2a7c803f2df86a6b4c80e7e66e177fecdfb3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 1/8 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T21:03:16.235Z","repository_id":57727938,"created_at":"2025-08-23T21:03:16.235Z","updated_at":"2025-08-23T21:03:16.235Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28491889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["java","maven","mockito-junit-test","rest-api","splitwise","splitwise-sdk"],"created_at":"2026-01-17T01:56:24.224Z","updated_at":"2026-01-17T01:56:24.287Z","avatar_url":"https://github.com/sritejakv.png","language":"Java","readme":"# splitwise-java\n**Java SDK for Splitwise**\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.sritejakv/splitwise.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.sritejakv%22%20AND%20a:%22splitwise%22)\n\n***\nThis library contains implementation of Splitwise SDK in Java. Currently the following [splitwise API](http://dev.splitwise.com/#introduction) calls \nare supported,\n\n`get_current_user`\n`get_user/:id`\n`update_user/:id`\n`get_groups`\n`get_group/:id`\n`create_group`\n`delete_group/:id`\n`add_user_to_group`\n`remove_user_from_group`\n`get_friends`\n`get_friend/:id`\n`create_friend`\n`delete_friend/:id`\n`get_expenses`\n`get_expense/:id`\n`delete_expense/:id`\n`get_comments?expense_id=`\n`get_notifications`\n`get_currencies`\n`get_categories`\n\nOther API implementations are expected to follow as future updates.\nPull requests and bugs are welcomed.\n\n**Maven**\n***\nAdd the following lines in **pom.xml** of the maven project to use the library,\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.sritejakv\u003c/groupId\u003e\n  \u003cartifactId\u003esplitwise\u003c/artifactId\u003e\n  \u003cversion\u003e1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n**Gradle**\n***\nAdd the following line in Gradle projects to use the library,\n\n```$xslt\ncompile(\"com.github.sritejakv:splitwise:1.0\")\n```\n\n**Authentication**\n***\nCurrently the authentication is performed using [ScribeJava](https://github.com/scribejava/scribejava)\nlibrary which supports both OAuth1.0 and OAuth2.0. In this library, **OAuth1.0** is included at this\npoint of time. Authentication using OAuth2.0 is expected in the future updates.\n\n**Registration**\n***\nThe library expects consumer key and consumer secret of Splitwise and can be fetched after registering\nyour application [here](https://secure.splitwise.com/oauth_clients).\n\n**Using the library**\n***\n\n**Authorization**\n\nAs already mentioned, the library expects consumer key and consumer secret from Splitwise. As splitwise\nuses OAuth authentication for access, the user should also fetch token verifier from the \nauthorization url. This is done in two steps,\n\n1. Initialize splitwise with consumer key and consumer secret.\n\n```$xslt\nSplitwise splitwise = new Splitwise(\"\u003cconsumerKey\u003e\", \"\u003cconsumerSecret\u003e\");\nString authorizationURL = splitwise.getAuthorizationUrl();\n```\n\n2. Open the authorizationURL in the browser. It is a simple process of logging into Splitwise and\ngiving the access. After giving the access, token verifier is shown in the url itself. Set the \naccess token using the verifier.\n\n```$xslt\nsplitwise.util.setAccessToken(\"\u003cverifier_from_authorizationURL\u003e\");\n```\n\nTo skip the process of authenticating every time, the token details fetched above can be used to\nset the token without actually going into authorizationURL.\n\n```$xslt\nOAuth1AccessToken accessToken = (OAuth1AccessToken) splitwise.util.getAccessToken();\nsplitwise.util.setAccessToken(accessToken.getToken(),\n                accessToken.getTokenSecret(),\n                accessToken.getRawResponse()\n        );\n```\n\nHowever, the user must authorize at least once to get the token verifier.\n\n**Access data from splitwise**\n\nOnce the authorization if performed and token details are fetched, they can be used to instantiate\nSplitwise class and set the access token as shown above.\n\n```$xslt\nSplitwise splitwise = new Splitwise(\"\u003cconsumerKey\u003e\", \"\u003cconsumerSecret\u003e\");\nsplitwise.util.setAccessToken(@NotNull \u003ctoken\u003e, @NotNull \u003ctokenSecret\u003e, \u003ctokenRawResponse\u003e);\n```\n\nThe complete list of methods the library supports are as follows,\n \n**Get Current User**\n\n`getCurrentUser()` can be used to fetch current user. It returns the user details in a JSON string.\n\n```$xslt\nString userDetailsJson = splitwise.getCurrentUser();\n```\n\n**Get User**\n\n`getUser(userId)` can be used to fetch user details. It returns user details in a JSON String.\n\n```$xslt\nString userId = \"324343\";\nString userDetailsJson = splitwise.getUser(userId);\n```\n\n**Update User**\n\n`updateUser(userId, userDetails)` can be used to update the details of the splitwise user. The \nuser fields that can be updated can be seen [here](http://dev.splitwise.com/#update_user-id).\n\n```$xslt\nMap\u003cString, String\u003e userDetails = new HashMap\u003cString, String\u003e(){{\n    put(\"first_name\", \"Lorem\");\n    put(\"last_name\", \"Ipsum\");\n}}\nString userId = 324343\nString response = splitwise.updateUser(userId, userDetails);\n```\n\n**Get Groups**\n\n`getGroups()` can be used to fetch all the splitwise groups of the current user. It returns a\nJSON string of the group details.\n\n```$xslt\nString groupDetails = splitwise.getGroups();\n```\n\n***Get Group***\n\n`getGroup(groupId)` can be used to fetch details of a specific splitwise group. It returns a\nJSON string of the group details.\n\n```$xslt\nString groupId = \"123\";\nString groupDetails = splitwise.getGroup(groupId);\n```\n\n***Create Group***\n\n`createGroup(groupDetails)` can be used to create splitwise group. `groupDetails` can contain \nall the item shown [here](http://dev.splitwise.com/#create_group).\n\n```$xslt\nMap\u003cString, String\u003e groupDetails = new HashMap\u003cString, String\u003e(){{\n    put(\"name\", \"Lorem\");\n    put(\"group_type\", \"Apartment\");\n}}\nString response = splitwise.createGroup(groupDetails);\n```\n\n**Delete Group**\n\n`deleteGroup(groupId)` can be used to delete a splitwise group.\n\n```$xslt\nString groupId = \"123\";\nString response = splitwise.deleteGroup(groupId);\n```\n\n***Add User to Group***\n\n`addUserToGroup(userDetails)` can be used to add a user to a group.\n\n```$xslt\nMap\u003cString, String\u003e userDetails = new HashMap\u003cString, String\u003e(){{\n    put(\"first_name\", \"Lorem\");\n    put(\"last_name\", \"Ipsum\");\n    put(\"email\", \"hello@world.com\");\n    put(\"user_id\", \"324343\");\n    put(\"group_id\", \"123\");\n}}\nString response = splitwise.addUserToGroup(userDetails);\n```\n\n***Remove User from Group***\n\n`removeUserFromGroup(groupId, userId)` can be used to remove a splitwise user from a splitwise group.\n\n```$xslt\nString userId = \"324343\";\nString groupId = \"123\";\nString response = splitwise.removeUserFromGroup(groupId, userId);\n```\n\n***Get Friends***\n\n`getFriends()` can be used to fetch all the splitwise friends of the current user. It returns a\nJSON string containing all the friend details.\n\n```$xslt\nString friends = splitwise.getFriends();\n```\n\n***Get Friend***\n\n`getFriend(userId)` can be used to fetch details of a splitwise friend. It returns a\nJSON string containing all the friend details.\n\n```$xslt\nString userId = \"324343\"\nString friendDetails = splitwise.getFriend(userId);\n```\n\n***Create a friend***\n\n`createFriend(firstName, lastName, email)` can be used to add a friend into Splitwise.\n\n```$xslt\nString response = splitwise.createFriend(\"lorem\", \"ipsum\", \"hello@world.com\");\n```\n\n***Delete a friend***\n\n`deleteFriend(friendId)` can be used to delete a friend from Splitwise.\n\n```$xslt\nString friendId = \"345\";\nString response = splitwise.deleteFriend(friendId);\n```\n\n***Get Expenses***\n\n`getExpenses()` can be used to get all the expenses of the current user.  It returns a\nJSON string containing all the expenses.\n\n```$xslt\nString expenses = splitwise.getExpenses();\n```\n\n***Get Expense***\n\n`getExpense(expenseId)` can be used to get details of a splitwise expense. It returns a\nJSON string containing the expense details.\n\n```$xslt\nString expenseId = \"765\";\nString expenseDetails = splitwise.getExpense(expenseId);\n```\n\n***Delete Expense***\n\n`deleteExpense(expenseId)` can be used to delete a splitwise expense.\n\n```$xslt\nString expenseId = \"765\";\nString response = splitwise.deleteExpense(expenseId);\n```\n\n***Get Comments on an Expense***\n\n`getComments(expenseId)` can be used to get comments on a splitwise expense. It returns a\nJSON string containing the expense details.\n\n```$xslt\nString expenseId = \"987\";\nString comments = splitwise.getComments(expenseId);\n```\n\n***Get Notifications***\n\n`getNotifications()` can be used to get unseen notifications of the current user. It returns a\nJSON string containing all the unseen notifications.\n\n```$xslt\nString notifications = splitwise.getNotifications();\n```\n\n***Get Currencies***\n\n`getCurrencies()` can be used to fetch the currencies supported by Splitwise. It returns a\nJSON string containing all the currencies.\n\n```$xslt\nString currencies = splitwise.getCurrencies();\n```\n\n***Get Categories***\n\n`getCategories()` can be used to fetch the categories in Splitwise. It returns a\nJSON string containing all the categories.\n\n```$xslt\nString categories = splitwise.getCategories();\n```\n\n***Testing***\n***\n\nThe library includes test cases for some of the methods. It uses [Mockito](https://site.mockito.org/)\nframework to mock the methods needed in unit test cases.\n\nTest cases for two vital classes `Splitwise` and `OAuthUtl` are included in the library, \n`SplitwiseTest` and `OAuthUtilTest`.\n\n**License**\n***\n[MIT](http://www.opensource.org/licenses/mit-license.php)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsritejakv%2Fsplitwise-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsritejakv%2Fsplitwise-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsritejakv%2Fsplitwise-java/lists"}