-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy pathconst.py
79 lines (74 loc) · 1.51 KB
/
const.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
"""Constants and allowed parameter values specified in the News API."""
TOP_HEADLINES_URL = "https://newsapi.org/v2/top-headlines"
EVERYTHING_URL = "https://newsapi.org/v2/everything"
SOURCES_URL = "https://newsapi.org/v2/sources"
#: The 2-letter ISO 3166-1 code of the country you want to get headlines for. If not specified,
#: the results span all countries.
countries = {
"ae",
"ar",
"at",
"au",
"be",
"bg",
"br",
"ca",
"ch",
"cn",
"co",
"cu",
"cz",
"de",
"eg",
"es",
"fr",
"gb",
"gr",
"hk",
"hu",
"id",
"ie",
"il",
"in",
"is",
"it",
"jp",
"kr",
"lt",
"lv",
"ma",
"mx",
"my",
"ng",
"nl",
"no",
"nz",
"ph",
"pk",
"pl",
"pt",
"ro",
"rs",
"ru",
"sa",
"se",
"sg",
"si",
"sk",
"th",
"tr",
"tw",
"ua",
"us",
"ve",
"za",
"zh",
}
#: The 2-letter ISO-639-1 code of the language you want to get articles for. If not specified,
#: the results span all languages.
languages = {"ar", "en", "de", "es", "fr", "he", "it", "nl", "no", "pt", "ru", "sv", "ud", "zh"}
#: The category you want to get articles for. If not specified,
#: the results span all categories.
categories = {"business", "entertainment", "general", "health", "science", "sports", "technology"}
#: The order to sort article results in. If not specified, the default is ``"publishedAt"``.
sort_method = {"relevancy", "popularity", "publishedAt"}