{"id":13803754,"url":"https://github.com/pakoito/RxActions","last_synced_at":"2025-05-13T16:32:27.135Z","repository":{"id":139227812,"uuid":"47892183","full_name":"pakoito/RxActions","owner":"pakoito","description":"Simple ActionN composition to use with RxJava [STABLE]","archived":false,"fork":false,"pushed_at":"2017-03-22T00:06:58.000Z","size":64,"stargazers_count":33,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-14T04:57:05.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pakoito.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-12-12T19:48:18.000Z","updated_at":"2021-09-29T23:26:34.000Z","dependencies_parsed_at":"2024-01-03T01:49:09.588Z","dependency_job_id":null,"html_url":"https://github.com/pakoito/RxActions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxActions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxActions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxActions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pakoito%2FRxActions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pakoito","download_url":"https://codeload.github.com/pakoito/RxActions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253981927,"owners_count":21994359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-08-04T01:00:37.579Z","updated_at":"2025-05-13T16:32:22.117Z","avatar_url":"https://github.com/pakoito.png","language":"Java","funding_links":[],"categories":["Utilities"],"sub_categories":[],"readme":"# RxActions\n\nRxActions is a library to smooth RxJava usage by functionally composing actions.\n\nFor the RxJava 2.X version please go to [RxConsumers](https://github.com/pakoito/RxConsumers).\n\n## Rationale\n\nSometimes you have to describe side effects in your Observable chain, by means of doOnNext, doOnError, or even in the subscription. Writing several of those operators may incur on minimal performance penalties, and make the chain more verbose. RxActions allows you to combine those actions sequentially.\n\nOne acknowledged critique is that the composition can be done inlined and imperatively instead by using a lambda. That's not available on Java 1.6 versions without 3rd party tools, making it effectively more verbose.\n\n## Usage\n\nRxActions comes as lazily evaluated ActionN and its main use case is for doOnNext, doOnError, and subscribe operators. Please note subscribe comes in several flavours that accept ActionN for better composability.\n\nLog correct server response, cache it, and display on UI:\n\n    getApi().requestListFromServer()\n            .subscribe(RxActions.act(logElement(), cacheElements(), getUi.displayElements()));\n            \nLog an error to console, then display UI message:\n\n    getApi().requestListFromServer()\n            .subscribe(/* ... */,\n                       RxActions.act(logError(), getUi().displayErrorMessage()));\n                \nLog error, clear cache, and display a message before applying an error correction operator:\n\n    getApi().storeInDatabase()\n            .doOnError(RxActions.act(logError(), getUi().displayErrorMessage(), clearCache()))\n            .onErrorReturn(Collections.emptyList())\n            .subscribe(/* ... */);\n\n## Distribution\n\nAdd as a dependency to your `build.gradle`\n\n    repositories {\n        ...\n        maven { url \"https://jitpack.io\" }\n        ...\n    }\n    \n    dependencies {\n        ...\n        compile 'com.github.pakoito:RxActions:1.0.+'\n        ...\n    }\n\nor to your `pom.xml`\n\n    \u003crepositories\u003e\n        \u003crepository\u003e\n            \u003cid\u003ejitpack.io\u003c/id\u003e\n            \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n        \u003c/repository\u003e\n    \u003c/repositories\u003e\n    \n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.pakoito\u003c/groupId\u003e\n        \u003cartifactId\u003eRxActions\u003c/artifactId\u003e\n        \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n## License\n\nCopyright (c) pakoito 2015\n\nThe Apache Software License, Version 2.0\n\nSee LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakoito%2FRxActions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpakoito%2FRxActions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpakoito%2FRxActions/lists"}