{"id":19146658,"url":"https://github.com/mukeshsolanki/news-api-kotlin","last_synced_at":"2026-06-12T10:30:16.068Z","repository":{"id":71512811,"uuid":"237098536","full_name":"mukeshsolanki/News-API-Kotlin","owner":"mukeshsolanki","description":"An wrapper for https://newsapi.org/","archived":false,"fork":false,"pushed_at":"2020-09-13T12:48:30.000Z","size":150,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-03T16:49:42.355Z","etag":null,"topics":["android","android-library","kotlin","kotlin-library","library","newsapi","newsapi-andorid-library","newsapi-kotlin","newsapi-org","retofit2","wrapper","wrapper-api","wrapper-library"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/mukeshsolanki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"patreon":"mukeshsolanki","custom":"https://www.paypal.me/mukeshsolanki"}},"created_at":"2020-01-29T22:53:59.000Z","updated_at":"2022-08-12T12:53:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"b2a81ab6-5d57-4163-b0e4-3a6844b26779","html_url":"https://github.com/mukeshsolanki/News-API-Kotlin","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/mukeshsolanki%2FNews-API-Kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mukeshsolanki%2FNews-API-Kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mukeshsolanki%2FNews-API-Kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mukeshsolanki%2FNews-API-Kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mukeshsolanki","download_url":"https://codeload.github.com/mukeshsolanki/News-API-Kotlin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240229977,"owners_count":19768597,"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","android-library","kotlin","kotlin-library","library","newsapi","newsapi-andorid-library","newsapi-kotlin","newsapi-org","retofit2","wrapper","wrapper-api","wrapper-library"],"created_at":"2024-11-09T07:47:38.124Z","updated_at":"2026-06-12T10:30:15.971Z","avatar_url":"https://github.com/mukeshsolanki.png","language":"Kotlin","funding_links":["https://patreon.com/mukeshsolanki","https://www.paypal.me/mukeshsolanki","https://www.patreon.com/mukeshsolanki","https://www.patreon.com/bePatron?c=935498"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eNews-API-Android\u003c/h1\u003e\r\n\u003cp align=\"center\"\u003e\r\n  \u003ca href=\"https://www.codacy.com/manual/mukeshsolanki/News-API-Android?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=mukeshsolanki/News-API-Android\u0026amp;utm_campaign=Badge_Grade\"\u003e\u003cimg src=\"https://api.codacy.com/project/badge/Grade/7c635f39c24441d18c61d7b44b150e4e\"/\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://jitpack.io/#mukeshsolanki/News-API-Android\"\u003e \u003cimg src=\"https://jitpack.io/v/mukeshsolanki/News-API-Android/month.svg\" /\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://jitpack.io/#mukeshsolanki/News-API-Android\"\u003e \u003cimg src=\"https://jitpack.io/v/mukeshsolanki/News-API-Android.svg\" /\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://github.com/mukeshsolanki/News-API-Android/actions\"\u003e \u003cimg src=\"https://github.com/mukeshsolanki/News-API-Android/workflows/Build/badge.svg\" /\u003e\u003c/a\u003e\r\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\"/\u003e\u003c/a\u003e\r\n  \u003cbr /\u003e\u003cbr /\u003e\r\nNews-API-Android is an android/java/kotlin library for accessing News API. https://newsapi.org/\r\n\u003c/p\u003e\r\n \u003cbr /\u003e\u003cbr /\u003e\r\n\r\n# Support News-API-Android\r\n\r\nNews-API-Android is an independent project with ongoing development and support made possible thanks to donations made by [these awesome backers](BACKERS.md#sponsors). If you'd like to join them, please consider:\r\n\r\n- [Become a backer or sponsor on Patreon](https://www.patreon.com/mukeshsolanki).\r\n- [One-time donation via PayPal](https://www.paypal.me/mukeshsolanki)\r\n\r\n\u003ca href=\"https://www.patreon.com/bePatron?c=935498\" alt=\"Become a Patron\"\u003e\u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button.png\" /\u003e\u003c/a\u003e\r\n\r\n## How to integrate into your app?\r\nIntegrating the library into you app is extremely easy. A few changes in the build gradle and your all ready to use the library. Make the following changes.\r\n\r\nStep 1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:\r\n\r\n```java\r\nallprojects {\r\n  repositories {\r\n    ...\r\n    maven { url \"https://jitpack.io\" }\r\n  }\r\n}\r\n```\r\nStep 2. Add the dependency\r\n```java\r\ndependencies {\r\n        implementation 'com.github.mukeshsolanki:News-API-Android:\u003clatest-version\u003e'\r\n}\r\n```\r\n\r\n## How to use the library?\r\nOkay seems like you integrated the library in your project but **how do you use it**? Well its really easy just follow the steps below.\r\n\r\n```\r\n...\r\nNewsApi.initialize(\"YOUR_API_KEY\")\r\n...\r\n\r\nNewsApi.getSources(onSourcesListener = object :\r\n            OnSourcesListener {\r\n            override fun onSourcesResponse(sourcesResponse: SourcesResponse) {\r\n                Log.d(\"Response=\u003e\", sourcesResponse.toString())\r\n            }\r\n\r\n            override fun onError(apiError: ApiError?) {\r\n                Log.e(\"Response=\u003e\", apiError.toString())\r\n            }\r\n        })\r\n```\r\n\r\n## Method and Parameters\r\n| Method| Use |\r\n| ----------| --- |\r\n| getSources| This endpoint returns the subset of news publishers that top headlines (/v2/top-headlines) are available from. It's mainly a convenience endpoint that you can use to keep track of the publishers available on the API, and you can pipe it straight through to your users. |\r\n| getTopHeadlines | This endpoint provides live top and breaking headlines for a country, specific category in a country, single source, or multiple sources. You can also search with keywords. Articles are sorted by the earliest date published first. This endpoint is great for retrieving headlines for display on news tickers or similar. |\r\n| getEverything | Search through millions of articles from over 30,000 large and small news sources and blogs. This includes breaking news as well as lesser articles. This endpoint suits article discovery and analysis, but can be used to retrieve articles for display, too. |\r\n\r\nFor more details on these method follow [this](https://newsapi.org/docs/endpoints)\r\n\r\n## Makes use of\r\n* retrofit2 - 2.7.0\r\n* retrofit2:converter-gson - 2.7.0\r\n* ohttp logging-interceptor - 4.3.1\r\n* adapter-rxjava2 - 2.7.0\r\n* rxandroid:2.1.1\r\n\r\n## Author\r\nMaintained by [Mukesh Solanki](https://www.github.com/mukeshsolanki)\r\n\r\n## Contribution\r\n[![GitHub contributors](https://img.shields.io/github/contributors/mukeshsolanki/News-API-Android.svg)](https://github.com/mukeshsolanki/News-API-Android/graphs/contributors)\r\n\r\n* Bug reports and pull requests are welcome.\r\n\r\n## License\r\n```\r\nMIT License\r\n\r\nCopyright (c) 2018 Mukesh Solanki\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmukeshsolanki%2Fnews-api-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmukeshsolanki%2Fnews-api-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmukeshsolanki%2Fnews-api-kotlin/lists"}