{"id":16775207,"url":"https://github.com/arunkumar9t2/rxsuggestions","last_synced_at":"2025-06-19T17:35:55.408Z","repository":{"id":102600187,"uuid":"82974115","full_name":"arunkumar9t2/rxSuggestions","owner":"arunkumar9t2","description":"⌨️  RxJava library to fetch suggestions for keywords using Google Suggest API","archived":false,"fork":false,"pushed_at":"2018-06-03T18:57:07.000Z","size":1809,"stargazers_count":93,"open_issues_count":4,"forks_count":12,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-02T02:45:55.337Z","etag":null,"topics":["android","google-suggestions","rxjava-library","search","search-suggestions"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arunkumar9t2.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-23T21:40:56.000Z","updated_at":"2024-03-04T16:38:15.000Z","dependencies_parsed_at":"2023-06-30T01:45:11.524Z","dependency_job_id":null,"html_url":"https://github.com/arunkumar9t2/rxSuggestions","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/arunkumar9t2/rxSuggestions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arunkumar9t2%2FrxSuggestions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arunkumar9t2%2FrxSuggestions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arunkumar9t2%2FrxSuggestions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arunkumar9t2%2FrxSuggestions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arunkumar9t2","download_url":"https://codeload.github.com/arunkumar9t2/rxSuggestions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arunkumar9t2%2FrxSuggestions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260797404,"owners_count":23064774,"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":["android","google-suggestions","rxjava-library","search","search-suggestions"],"created_at":"2024-10-13T06:51:18.834Z","updated_at":"2025-06-19T17:35:50.394Z","avatar_url":"https://github.com/arunkumar9t2.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![API](https://img.shields.io/badge/API-16%2B-brightgreen.svg)](https://android-arsenal.com/api?level=16)[ ![Download](https://api.bintray.com/packages/arunkumar9t2/maven/suggestions/images/download.svg) ](https://bintray.com/arunkumar9t2/maven/suggestions/_latestVersion)\n# Notice\n\nVersion 2 supporting RxJava 2 is in development in `master` branch. For version 1 with RxJava 1 support, visit [v 1.0 branch](https://github.com/arunkumar9t2/rxSuggestions/tree/v1.0)\n\n# RxSuggestions\n\nA RxJava library to fetch search suggestions backed by `Google Suggest`.\n\nIf you have a content based app, this library makes it easier to show search suggestions so that your users spend less time typing the whole word.\n\nThe implementation is decoupled meaning the suggestions fetching can be used for any purpose and not only limited to search.\n\n# Demo\n![RxSuggestionsDemo](https://raw.githubusercontent.com/arunkumar9t2/rxSuggestions/master/art/demo.gif)\n# Download\n\nLibrary is available via `jcenter()`.\n\n* Add `jcenter()` to your project level `build.gradle` file.\n\n```groovy\nallprojects {\n    repositories {\n        jcenter()\n    }\n}\n```\n\n* Add library dependency to module level `build.gradle` file.\n\n```groovy\ndependencies{\n    compile 'in.arunkumarsampath:suggestions:1.0.3'\n}\n```\n\n# Project Setup\n\nThis library is compiled with Java 8 and thus requires your project to have Java 8 compilation enabled. This was done since the old Jack compiler is deprecated in favor of improved Java 8 compiler starting from Android Studio 3.0+ and to take advantage of `lamdas` and `try with resources`.\n\nIf you are not using Android Studio 3.0+, [follow this guide.](https://developer.android.com/studio/write/java8-support.html) Else if you already are, then add these lines to force compilation with Java 8.\n\n```groovy\nandroid {\n  // Configure only for each module that uses Java 8\n  // language features (either in its source code or\n  // through dependencies).\n  compileOptions {\n    sourceCompatibility JavaVersion.VERSION_1_8\n    targetCompatibility JavaVersion.VERSION_1_8\n  }\n}\n```\n\n# Usage\n\nThis library provides two different ways to fetch suggestions.\n\n* Using `RxSuggestion#fetch(String)`. Example: Fetch suggestions for the word `Batman`:\n\n    ```java\n    RxSuggestions.fetch(\"Batman\")\n                .subscribeOn(Schedulers.io())\n                .observeOn(AndroidSchedulers.mainThread())\n                .subscribe(suggestions -\u003e {\n                    // List of suggestions here.\n                });\n    ```\n\n* This library provides a convenient `Transformer` which takes a stream of strings and converts them in their suggestions. This is very helpful if you use library such as `RxBinding` with `EditText`.\n\n    ```java\n    RxTextView.afterTextChangeEvents(searchBox)\n                .map(changeEvent -\u003e changeEvent.editable().toString())\n                .compose(RxSuggestions.suggestionsTransformer())\n                .doOnNext(this::setSuggestions) // Your suggestions\n                .doOnError(t -\u003e Log.e(TAG, t.toString()))\n                .subscribe()\n    ```\n    Input transforming to reduce network requests is also handled by library itself so you don't have to use `debounce` etc.\n\n# Motivation\n\nThis feature was initially developed for use in my browser app [Chromer.](https://github.com/arunkumar9t2/chromer)\n\n# Contributions\n\nIf you are a developer and would like to improve this library, please consider making a pull request or create an issue so I can look into it.\n\n* Code style is Android Studio default.\n* No hungarian notation.\n\n# License\n\nCopyright 2017 Arunkumar\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farunkumar9t2%2Frxsuggestions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farunkumar9t2%2Frxsuggestions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farunkumar9t2%2Frxsuggestions/lists"}