{"id":16558136,"url":"https://github.com/jaredsburrows/retrofit2-synchronous-adapter","last_synced_at":"2025-04-21T15:30:43.696Z","repository":{"id":18320210,"uuid":"84011094","full_name":"jaredsburrows/retrofit2-synchronous-adapter","owner":"jaredsburrows","description":"This adapter allows synchronous return types for Retrofit 2.","archived":false,"fork":false,"pushed_at":"2025-03-31T15:09:37.000Z","size":881,"stargazers_count":32,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T14:11:19.953Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jaredsburrows.github.io/retrofit2-synchronous-adapter/","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/jaredsburrows.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-03-05T23:43:00.000Z","updated_at":"2025-03-31T15:09:40.000Z","dependencies_parsed_at":"2024-02-03T00:26:53.028Z","dependency_job_id":"2ef89ced-fa3d-4c80-902e-b24cc9e52698","html_url":"https://github.com/jaredsburrows/retrofit2-synchronous-adapter","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/jaredsburrows%2Fretrofit2-synchronous-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredsburrows%2Fretrofit2-synchronous-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredsburrows%2Fretrofit2-synchronous-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaredsburrows%2Fretrofit2-synchronous-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaredsburrows","download_url":"https://codeload.github.com/jaredsburrows/retrofit2-synchronous-adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250080492,"owners_count":21371516,"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-10-11T20:09:41.304Z","updated_at":"2025-04-21T15:30:43.242Z","avatar_url":"https://github.com/jaredsburrows.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Retrofit 2 Synchronous Adapter\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Maven](https://img.shields.io/maven-central/v/com.jaredsburrows.retrofit/retrofit2-synchronous-adapter?label=maven\u0026style=flat)](https://search.maven.org/artifact/com.jaredsburrows.retrofit/retrofit2-synchronous-adapter)\n[![Build](https://github.com/jaredsburrows/retrofit2-synchronous-adapter/actions/workflows/build.yml/badge.svg)](https://github.com/jaredsburrows/retrofit2-synchronous-adapter/actions/workflows/build.yml)\n[![Twitter Follow](https://img.shields.io/twitter/follow/jaredsburrows.svg?style=social)](https://twitter.com/jaredsburrows)\n\nA synchronous `CallAdapter.Factory` implementation for Retrofit 2.\n\nThis project brings Retrofit 1's synchronous usage to Retrofit 2.\n\n## Usage\n\n```java\n// Setup retrofit\nRetrofit retrofit = new Retrofit.Builder()\n  .baseUrl(\"https://api.example.com\")\n  .addCallAdapterFactory(SynchronousCallAdapterFactory.create())\n  .build();\n\n// Create your service\ninterface Service {\n  @GET(\"/\") ApiResponse response();                 // Return type directly\n  @GET(\"/\") Response\u003cApiResponse\u003e responseApi();    // Return Response information with type\n  @GET(\"/\") ResponseBody body();                    // Return generic type directly\n  @GET(\"/\") Response\u003cResponseBody\u003e responseBody();  // Return Response information with generic type\n}\n\n// Initiate the service\nService example = retrofit.create(Service.class);\n\n// Make your HTTP request\nApiResponse response = example.response();\nResponseBody body = example.body();\nResponse\u003cResponseBody\u003e responseBody = example.responseBody();\nResponse\u003cApiResponse\u003e responseApi = example.responseApi();\n```\n\n## Download\n\n**Release:**\n```groovy\nrepositories {\n  mavenCentral()\n}\n\ndependencies {\n  compile 'com.jaredsburrows.retrofit:retrofit2-synchronous-adapter:0.6.0'\n}\n```\nRelease versions are available in the [Sonatype's release repository](https://repo1.maven.org/maven2/com/jaredsburrows/retrofit/retrofit2-synchronous-adapter/).\n\n**Snapshot:**\n```groovy\nrepositories {\n  maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }\n}\n\ndependencies {\n  compile 'com.jaredsburrows.retrofit:retrofit2-synchronous-adapter:0.7.0-SNAPSHOT'\n}\n```\nSnapshot versions are available in the [Sonatype's snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/com/jaredsburrows/retrofit/retrofit2-synchronous-adapter/).\n\nDocumentation is available at [jaredsburrows.github.io/retrofit2-synchronous-adapter/docs/0.x/](https://jaredsburrows.github.io/retrofit2-synchronous-adapter/docs/0.x/).\n\n## License\n\n```\nCopyright (C) 2017 Jared Burrows\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   https://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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredsburrows%2Fretrofit2-synchronous-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredsburrows%2Fretrofit2-synchronous-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredsburrows%2Fretrofit2-synchronous-adapter/lists"}