{"id":21006365,"url":"https://github.com/eyedol/voto-java-sdk","last_synced_at":"2025-05-15T01:33:49.462Z","repository":{"id":57716509,"uuid":"54233741","full_name":"eyedol/voto-java-sdk","owner":"eyedol","description":"VOTO Java SDK","archived":false,"fork":false,"pushed_at":"2025-04-25T11:59:31.000Z","size":606,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T05:09:16.197Z","etag":null,"topics":["api","asynchronous","rxjava","sdk","voto","voto-api","voto-java-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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eyedol.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2016-03-18T21:54:01.000Z","updated_at":"2024-08-23T17:52:14.000Z","dependencies_parsed_at":"2023-09-24T08:30:48.727Z","dependency_job_id":"fb6e0862-e287-4cf7-8849-6b2ddf1de33c","html_url":"https://github.com/eyedol/voto-java-sdk","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyedol%2Fvoto-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyedol%2Fvoto-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyedol%2Fvoto-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eyedol%2Fvoto-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eyedol","download_url":"https://codeload.github.com/eyedol/voto-java-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254256763,"owners_count":22040354,"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":["api","asynchronous","rxjava","sdk","voto","voto-api","voto-java-sdk"],"created_at":"2024-11-19T08:50:53.377Z","updated_at":"2025-05-15T01:33:48.288Z","avatar_url":"https://github.com/eyedol.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/eyedol/voto-java-sdk.svg?branch=develop)](https://travis-ci.org/eyedol/voto-java-sdk) [![Stories in Ready](https://badge.waffle.io/eyedol/voto-java-sdk.png?label=ready\u0026title=Ready)](http://waffle.io/eyedol/voto-java-sdk) [![codecov.io](https://codecov.io/github/eyedol/voto-java-sdk/coverage.svg?branch=develop)](https://codecov.io/github/eyedol/voto-java-sdk?branch=develop) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-voto--java--sdk-green.svg?style=true)](https://android-arsenal.com/details/1/3380)\n\n### VOTO JAVA SDK\n\nVOTO Java SDK is a wrapper around the [VOTO API][1] to make it very easy to use. The goal of this SDK is to ease \nVOTO API integration into both Android and Java applications.\n\nIt comes with three independent modules:\n\n- Synchronous module; Access the API synchronously\n- Asynchronous module; Access the API asynchronously\n- RxJava module; Access the API using RxJava\n\n**Note:** These are not official libraries from the VOTO team.\n\n###\u003ca name=\"Setup\"\u003e**Setup**\nAdd gradle dependency:\n\nAdd `jcenter` repostory:\n```groovy\nrepositories {\n    jcenter()\n}\n```\n\nSynchronous module:\n```groovy\ndependencies {\n    compile 'com.addhen:voto-sdk-sync:0.3.0'\n}\n```\n\nAsynchronous module:\n```groovy\ndependencies {\n    compile 'com.addhen:voto-sdk-async:0.3.0'\n}\n```\n\nRxJava module:\n```groovy\ndependencies {\n    compile 'com.addhen:voto-sdk-rxjava:0.3.0'\n}\n```\n### Usage\n#### GET Data From VOTO API\n\n##### Build API Client\n- Synchronous:\n```java\nSyncVotoApiClient syncVotoApilient = new SyncVotoApiClient.Builder(\u003capi_key\u003e)\n\t.withLogLevel(HttpLoggingInterceptor.Level.BODY)\n\t.build();\n```\n- Asynchronous:\n```java\nAsyncVotoApiClient asyncVotoClient = new AsyncVotoApiClient.Builder(\u003capi_key\u003e)\n\t.withLogLevel(HttpLoggingInterceptor.Level.BODY)\n\t.build();\n```\n\n- RxJava:\n```java\nRxJavaVotoApiClient rxVotoClient = new RxJavaVotoApiClient.Builder(\u003capi_key\u003e)\n\t.withLogLevel(HttpLoggingInterceptor.Level.BODY)\n\t.build();\n```\n\n##### Execute API Request\n- Synchronous:\n```java\nSyncVotoApiClient syncVotoApiClient = new SyncVotoApiClient.Builder(\"api_key\")\n\t.withLogLevel(HttpLoggingInterceptor.Level.BODY)\n\t.build();\n\t\nListSubscribersResponse listSubscribersResponse = null;\ntry {\n    listSubscribersResponse = syncVotoApiClient.listSubscribers(10);\n} catch (IOException e) {\n    e.printStackTrace();\n}\n\nSystem.out.println(listSubscribersResponse);\n```\n- Asynchronous:\n```java\nAsyncVotoApiClient asyncVotoApiClient = new AsyncVotoApiClient.Builder(\"api_key\")\n\t.withLogLevel(HttpLoggingInterceptor.Level.BODY)\n\t.build();\n\t\nasyncVotoApiClient.listSubscribers(10, new Callback\u003cListSubscribersResponse\u003e() {\n\t@Override\n    public void onResponse(Call\u003cListSubscribersResponse\u003e call, Response\u003cListSubscribersResponse\u003e response) {\n    ListSubscribersResponse listSubscribersResponse = response.body();\n    \tSystem.out.println(listSubscribersResponse);\n    }\n\n    @Override\n    public void onFailure(Call\u003cListSubscribersResponse\u003e call, Throwable t) {\n    \tt.printStackTrace();\n    }\n});\n```\n\n- RxJava:\n```java\nRxJavaVotoApiClient rxJavaVotoApiClient = new RxJavaVotoApiClient.Builder(\"api_key\")\n\t.withLogLevel(HttpLoggingInterceptor.Level.BODY)\n\t.build();\n\t\nrxJavaVotoApiClient.listSubscribers(10).subscribe(new Action1\u003cListSubscribersResponse\u003e() {\n\t@Override\n\tpublic void call(ListSubscribersResponse listSubscribersResponse) {\n    \tSystem.out.println(listSubscribersResponse);\n  \t}\n});\n```\n\n### Run sample\n\nMake sure you've your VOTO API key set in the `local.properties` file located in the root directory\nof the project. The property name should be `votoApiKey`. If you don't set this, a dummy API key will be used.\n\nAfter setting the voto api key, issue `./gradlew run`. This should run the sample app and output the results in the console.\n\nLicense\n--------\n\n    Copyright 2016 Henry Addo Open Source Project\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n[1]: https://go.votomobile.org/apidoc/index.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyedol%2Fvoto-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feyedol%2Fvoto-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feyedol%2Fvoto-java-sdk/lists"}