Skip to content

Commit f21da8a

Browse files
authored
Update newsapi_client.py
1 parent 5dd8208 commit f21da8a

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

newsapi/newsapi_client.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def get_top_headlines(self, q=None, sources=None, language=None, country=None, c
5353

5454
def get_everything(self, q=None, sources=None, domains=None, from_parameter=None, to=None, language=None,
5555
sort_by=None, page=None, page_size=None):
56-
"""
56+
"""
5757
Search through millions of articles from over 5,000 large and small news sources and blogs.
5858
5959
Optional parameters:
@@ -63,22 +63,22 @@ def get_everything(self, q=None, sources=None, domains=None, from_parameter=None
6363
(str) sources - return headlines of news sources! some Valid values are:
6464
'bbc-news', 'the-verge', 'abc-news', 'crypto coins news',
6565
'ary news','associated press','wired','aftenposten','australian financial review','axios',
66-
'bbc news','bild','blasting news','bloomberg','business insider','engadget','google news',
67-
'hacker news','info money,'recode','techcrunch','techradar','the next web','the verge' etc.
66+
'bbc news','bild','blasting news','bloomberg','business insider','engadget','google news',
67+
'hacker news','info money,'recode','techcrunch','techradar','the next web','the verge' etc.
6868
69-
(str) domains - A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.
70-
(str) from_parameter - A date and optional time for the oldest article allowed.(e.g. 2018-03-05 or 2018-03-05T03:46:15)
69+
(str) domains - A comma-seperated string of domains (eg bbc.co.uk, techcrunch.com, engadget.com) to restrict the search to.
70+
(str) from_parameter - A date and optional time for the oldest article allowed.(e.g. 2018-03-05 or 2018-03-05T03:46:15)
7171
72-
(str) to - A date and optional time for the newest article allowed.
72+
(str) to - A date and optional time for the newest article allowed.
7373
74-
(str) language - The 2-letter ISO-639-1 code of the language you want to get headlines for. Valid values are:
75-
'ar','de','en','es','fr','he','it','nl','no','pt','ru','se','ud','zh'
74+
(str) language - The 2-letter ISO-639-1 code of the language you want to get headlines for. Valid values are:
75+
'ar','de','en','es','fr','he','it','nl','no','pt','ru','se','ud','zh'
7676
77-
(str) sort_by - The order to sort the articles in. Valid values are: relevancy, popularity, publishedAt.
78-
relevancy
77+
(str) sort_by - The order to sort the articles in. Valid values are: 'relevancy','popularity','publishedAt',
78+
'relevancy'
7979
80-
(int) page_size - The number of results to return per page (request). 20 is the default, 100 is the maximum.
81-
(int) page - Use this to page through the results if the total results found is greater than the page size.
80+
(int) page_size - The number of results to return per page (request). 20 is the default, 100 is the maximum.
81+
(int) page - Use this to page through the results if the total results found is greater than the page size.
8282
"""
8383

8484
# Define Payload
@@ -99,19 +99,19 @@ def get_everything(self, q=None, sources=None, domains=None, from_parameter=None
9999

100100
def get_sources(self, category=None, language=None, country=None):
101101

102-
"""
102+
"""
103103
Returns the subset of news publishers that top headlines...
104104
105105
Optional parameters:
106106
107-
(str) language - The 2-letter ISO-639-1 code of the language you want to get headlines for. Valid values are:
108-
'ar','de','en','es','fr','he','it','nl','no','pt','ru','se','ud','zh'
107+
(str) language - The 2-letter ISO-639-1 code of the language you want to get headlines for. Valid values are:
108+
'ar','de','en','es','fr','he','it','nl','no','pt','ru','se','ud','zh'
109109
110110
(str) country - The 2-letter ISO 3166-1 code of the country you want to get headlines! Valid values are:
111111
'ae','ar','at','au','be','bg','br','ca','ch','cn','co','cu','cz','de','eg','fr','gb','gr', 'hk','hu','id','ie','il','in','it','jp','kr','lt','lv','ma','mx','my','ng','nl','no','nz','ph' 'pl','pt','ro','rs','ru','sa','se','sg','si','sk','th','tr','tw','ua','us'
112112
113113
(str) category - The category you want to get headlines for! Valid values are:
114-
'business','entertainment','general','health','science','sports','technology'
114+
'business','entertainment','general','health','science','sports','technology'
115115
116116
"""
117117

0 commit comments

Comments
 (0)