Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Commit b8d6ad0

Browse files
committed
release v1.0.3
1 parent 040560e commit b8d6ad0

File tree

3 files changed

+63
-6
lines changed

3 files changed

+63
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# consumable-code-news-api By AmirIsBack
2-
- v1.0.2 - Development
2+
- v1.0.3 - Development
33
- Stable version
44

55
# About This Project
@@ -80,7 +80,7 @@ https://newsapi.org/
8080
# Version Release
8181
This Is Latest Release
8282

83-
$version_release = 1.0.2
83+
$version_release = 1.0.3
8484

8585
What's New??
8686

@@ -113,8 +113,8 @@ Add it in your root build.gradle at the end of repositories:
113113
consumeNewsApi.getTopHeadline( // Adding Base Parameter on main function
114114
null,
115115
null,
116-
null,
117-
"id",
116+
CATEGORY_HEALTH,
117+
COUNTRY_ID,
118118
null,
119119
null,
120120
object : NewsResultCallback<ArticleResponse> {

app/src/main/java/com/frogobox/newsapi/MainActivity.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import androidx.appcompat.app.AppCompatActivity
55
import com.frogobox.frogonewsapi.ConsumeNewsApi
66
import com.frogobox.frogonewsapi.callback.NewsResultCallback
77
import com.frogobox.frogonewsapi.data.response.ArticleResponse
8+
import com.frogobox.frogonewsapi.util.NewsConstant.CATEGORY_HEALTH
9+
import com.frogobox.frogonewsapi.util.NewsConstant.COUNTRY_ID
810
import com.frogobox.frogonewsapi.util.NewsUrl
911

1012
class MainActivity : AppCompatActivity() {
@@ -18,8 +20,8 @@ class MainActivity : AppCompatActivity() {
1820
consumeNewsApi.getTopHeadline(
1921
null,
2022
null,
21-
null,
22-
"id",
23+
CATEGORY_HEALTH,
24+
COUNTRY_ID,
2325
null,
2426
null,
2527
object : NewsResultCallback<ArticleResponse> {

frogonewsapi/src/main/java/com/frogobox/frogonewsapi/util/NewsConstant.kt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,59 @@ object NewsConstant {
4242
const val CATEGORY_SPORTS = "sports"
4343
const val CATEGORY_TECHNOLOGY = "technology"
4444

45+
const val COUNTRY_AE = "ae"
46+
const val COUNTRY_AR = "ar"
47+
const val COUNTRY_AT = "at"
48+
const val COUNTRY_AU = "au"
49+
const val COUNTRY_BE = "be"
50+
const val COUNTRY_BG = "bg"
51+
const val COUNTRY_BR = "br"
52+
const val COUNTRY_CA = "ca"
53+
const val COUNTRY_CH = "ch"
54+
const val COUNTRY_CN = "cn"
55+
const val COUNTRY_CO = "co"
56+
const val COUNTRY_CU = "cu"
57+
const val COUNTRY_CZ = "cz"
58+
const val COUNTRY_DE = "de"
59+
const val COUNTRY_EG = "eg"
60+
const val COUNTRY_FR = "fr"
61+
const val COUNTRY_GB = "gb"
62+
const val COUNTRY_GR = "gr"
63+
const val COUNTRY_HK = "hk"
64+
const val COUNTRY_HU = "hu"
65+
const val COUNTRY_ID = "id"
66+
const val COUNTRY_IE = "ie"
67+
const val COUNTRY_IL = "il"
68+
const val COUNTRY_IN = "in"
69+
const val COUNTRY_IT = "it"
70+
const val COUNTRY_JP = "jp"
71+
const val COUNTRY_KR = "kr"
72+
const val COUNTRY_LT = "lt"
73+
const val COUNTRY_LV = "lv"
74+
const val COUNTRY_MA = "ma"
75+
const val COUNTRY_MX = "mx"
76+
const val COUNTRY_MY = "my"
77+
const val COUNTRY_NG = "ng"
78+
const val COUNTRY_NL = "nl"
79+
const val COUNTRY_NO = "no"
80+
const val COUNTRY_NZ = "nz"
81+
const val COUNTRY_PH = "ph"
82+
const val COUNTRY_PL = "pl"
83+
const val COUNTRY_PT = "pt"
84+
const val COUNTRY_RO = "ro"
85+
const val COUNTRY_RS = "rs"
86+
const val COUNTRY_RU = "ru"
87+
const val COUNTRY_SA = "sa"
88+
const val COUNTRY_SE = "se"
89+
const val COUNTRY_SG = "sg"
90+
const val COUNTRY_SI = "si"
91+
const val COUNTRY_SK = "sk"
92+
const val COUNTRY_TH = "th"
93+
const val COUNTRY_TR = "tr"
94+
const val COUNTRY_TW = "tw"
95+
const val COUNTRY_UA = "ua"
96+
const val COUNTRY_US = "us"
97+
const val COUNTRY_VE = "ve"
98+
const val COUNTRY_ZA = "za"
99+
45100
}

0 commit comments

Comments
 (0)