Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 77c6f79

Browse files
Rename variable api key news api
1 parent ce9d944 commit 77c6f79

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

‎lib/config/constant_config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
class ConstantConfig {
2-
final String apiKeyNewsApi = '3f1bdb0927c94f8da5708f7a36f7d06f';
2+
final String keyNewsApi = '3f1bdb0927c94f8da5708f7a36f7d06f';
33
}

‎lib/feature/data/datasource/news/news_remote_data_source.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ class NewsRemoteDataSourceImpl implements NewsRemoteDataSource {
3232
'/v2/top-headlines',
3333
queryParameters: {
3434
'country': 'id',
35-
'apiKey': constantConfig.apiKeyNewsApi,
35+
'apiKey': constantConfig.keyNewsApi,
3636
},
3737
);
3838
} else {
3939
response = await dio.get(
4040
'/v2/top-headlines',
4141
queryParameters: {
4242
'country': 'id',
43-
'apiKey': constantConfig.apiKeyNewsApi,
43+
'apiKey': constantConfig.keyNewsApi,
4444
'category': category,
4545
},
4646
);
@@ -58,7 +58,7 @@ class NewsRemoteDataSourceImpl implements NewsRemoteDataSource {
5858
'/v2/top-headlines',
5959
queryParameters: {
6060
'country': 'id',
61-
'apiKey': constantConfig.apiKeyNewsApi,
61+
'apiKey': constantConfig.keyNewsApi,
6262
'q': keyword,
6363
},
6464
);

‎test/feature/data/datasource/news/news_remote_data_source_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void main() {
7575
'/v2/top-headlines',
7676
queryParameters: {
7777
'country': 'id',
78-
'apiKey': constantConfig.apiKeyNewsApi,
78+
'apiKey': constantConfig.keyNewsApi,
7979
},
8080
),
8181
);
@@ -98,7 +98,7 @@ void main() {
9898
queryParameters: {
9999
'category': tCategory,
100100
'country': 'id',
101-
'apiKey': constantConfig.apiKeyNewsApi,
101+
'apiKey': constantConfig.keyNewsApi,
102102
},
103103
),
104104
);
@@ -174,7 +174,7 @@ void main() {
174174
'/v2/top-headlines',
175175
queryParameters: {
176176
'country': 'id',
177-
'apiKey': constantConfig.apiKeyNewsApi,
177+
'apiKey': constantConfig.keyNewsApi,
178178
'q': tKeyword,
179179
},
180180
),

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /