Skip to content

Commit dc17f4b

Browse files
authored
Merge pull request #25 from danielmichaels/issue#18
Make 'en' default language for get_top_headlines method; issue #18
2 parents 1ed277c + d8cb0d3 commit dc17f4b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

newsapi/newsapi_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class NewsApiClient(object):
99
def __init__(self, api_key):
1010
self.auth = NewsApiAuth(api_key=api_key)
1111

12-
def get_top_headlines(self, q=None, sources=None, language=None, country=None, category=None, page_size=None,
12+
def get_top_headlines(self, q=None, sources=None, language='en', country=None, category=None, page_size=None,
1313
page=None):
1414
"""
1515
Returns live top and breaking headlines for a country, specific category in a country, single source, or multiple sources..
@@ -81,7 +81,7 @@ def get_top_headlines(self, q=None, sources=None, language=None, country=None, c
8181
else:
8282
raise TypeError('country param should be of type str')
8383

84-
# Category
84+
# Category
8585
if category is not None:
8686
if type(category) == str:
8787
if category in const.categories:

0 commit comments

Comments
 (0)