consumable-code-news-api

所属分类:工具库
开发工具:kotlin
文件大小:0KB
下载次数:0
上传日期:2021-07-28 07:38:03
上 传 者sh-1993
说明:  消耗品代码新闻api,
(consumable-code-news-api,)

文件列表:
LICENSE (11350, 2021-07-28)
action.yml (368, 2021-07-28)
app/ (0, 2021-07-28)
app/build.gradle (2183, 2021-07-28)
app/proguard-rules.pro (751, 2021-07-28)
app/src/ (0, 2021-07-28)
app/src/androidTest/ (0, 2021-07-28)
app/src/androidTest/java/ (0, 2021-07-28)
app/src/androidTest/java/com/ (0, 2021-07-28)
app/src/androidTest/java/com/frogobox/ (0, 2021-07-28)
app/src/androidTest/java/com/frogobox/newsapi/ (0, 2021-07-28)
app/src/androidTest/java/com/frogobox/newsapi/ExampleInstrumentedTest.kt (668, 2021-07-28)
app/src/main/ (0, 2021-07-28)
app/src/main/AndroidManifest.xml (714, 2021-07-28)
app/src/main/java/ (0, 2021-07-28)
app/src/main/java/com/ (0, 2021-07-28)
app/src/main/java/com/frogobox/ (0, 2021-07-28)
app/src/main/java/com/frogobox/newsapi/ (0, 2021-07-28)
app/src/main/java/com/frogobox/newsapi/MainActivity.kt (3729, 2021-07-28)
app/src/main/res/ (0, 2021-07-28)
app/src/main/res/drawable-v24/ (0, 2021-07-28)
app/src/main/res/drawable-v24/ic_launcher_foreground.xml (1702, 2021-07-28)
app/src/main/res/drawable/ (0, 2021-07-28)
app/src/main/res/drawable/ic_launcher_background.xml (5606, 2021-07-28)
app/src/main/res/layout/ (0, 2021-07-28)
app/src/main/res/layout/activity_main.xml (1294, 2021-07-28)
app/src/main/res/mipmap-anydpi-v26/ (0, 2021-07-28)
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml (272, 2021-07-28)
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml (272, 2021-07-28)
app/src/main/res/mipmap-hdpi/ (0, 2021-07-28)
app/src/main/res/mipmap-hdpi/ic_launcher.png (3593, 2021-07-28)
app/src/main/res/mipmap-hdpi/ic_launcher_round.png (5339, 2021-07-28)
app/src/main/res/mipmap-mdpi/ (0, 2021-07-28)
app/src/main/res/mipmap-mdpi/ic_launcher.png (2636, 2021-07-28)
app/src/main/res/mipmap-mdpi/ic_launcher_round.png (3388, 2021-07-28)
... ...

![ScreenShoot Apps](https://raw.githubusercontent.com/amirisback/amirisback/master/docs/image/deprecated.png?raw=true) ## consumable-code-news-api [![](https://jitpack.io/v/amirisback/consumable-code-news-api.svg?style=flat-square)](https://jitpack.io/#amirisback/consumable-code-news-api)
Eliminates the method of retrieving json data using retrofit repeatedly. so this project has a set of functions to retrieve data without the need for fetching data using the retrofit of the API ## Attention Please :bangbang: Please use frogo-consume-api [Click Here](https://github.com/frogobox/frogo-consume-api) to get the latest updates ## Documentation The News API https://newsapi.org/ ## Screenshoot Apps | News API | Chuck Data 1 | Chuck Data 2 | |:------------------:|:----------------------------:|:---------------------:| | | | | ## Version Release This Is Latest Release $version_release = 1.0.7 What's New?? * Update Build Gradle * * Enhance Performance * ## How To Use This Project

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories: allprojects { repositories { ... maven { url 'https://jitpack.io' } } }

Step 2. Add the dependency

dependencies { // library consumable code news api implementation 'com.github.amirisback:consumable-code-news-api:1.0.7' }

Step 3. Declaration ConsumeNewsApi

val consumeNewsApi = ConsumeNewsApi(NewsUrl.NEWS_API_KEY) // Your API_KEY consumeNewsApi.usingChuckInterceptor(this) // Using Chuck Interceptor consumeNewsApi.getTopHeadline( // Adding Base Parameter on main function null, null, CATEGORY_HEALTH, COUNTRY_ID, null, null, object : NewsResultCallback { override fun getResultData(data: ArticleResponse) { // Your Ui or data } override fun failedResult(statusCode: Int, errorMessage: String?) { // Your failed to do } override fun onShowProgress() { // Your Progress Show } override fun onHideProgress() { // Your Progress Hide } }) ## Contant Value Category object NewsConstant { const val CATEGORY_BUSINESS = "business" const val CATEGORY_ENTERTAIMENT = "entertainment" const val CATEGORY_GENERAL = "general" const val CATEGORY_HEALTH = "health" const val CATEGORY_SCIENCE = "science" const val CATEGORY_SPORTS = "sports" const val CATEGORY_TECHNOLOGY = "technology" } ## Function Main From This Project // Switch For Using Chuck Interceptor fun usingChuckInterceptor(context: Context) // Get Top Headline fun getTopHeadline( q: String?, sources: String?, category: String?, country: String?, pageSize: Int?, page: Int?, callback: NewsResultCallback ) // Get Everythings fun getEverythings( q: String?, from: String?, to: String?, qInTitle: String?, sources: String?, domains: String?, excludeDomains: String?, language: String?, sortBy: String?, pageSize: Int?, page: Int?, callback: NewsResultCallback ) // Get Sources fun getSources( language: String, country: String, category: String, callback: NewsResultCallback ) ## Colaborator Very open to anyone, I'll write your name under this, please contribute by sending an email to me - Mail To faisalamircs@gmail.com - Subject : Github _ [Github-Username-Account] _ [Language] _ [Repository-Name] - Example : Github_amirisback_kotlin_admob-helper-implementation Name Of Contribute - Muhammad Faisal Amir - Waiting List - Waiting List Waiting for your contribute ## Attention !!! Please enjoy and don't forget fork and give a star - Don't Forget Follow My Github Account - If you like this library, please help me / you can donate to buy patreon services

近期下载者

相关文件


收藏者