diff options
Diffstat (limited to 'src/content.rs')
-rw-r--r-- | src/content.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/content.rs b/src/content.rs index 8d025c9..a192446 100644 --- a/src/content.rs +++ b/src/content.rs | |||
@@ -10,10 +10,11 @@ use cursive::Cursive; | |||
10 | use cursive::views::Dialog; | 10 | use cursive::views::Dialog; |
11 | use serde_json::Value; | 11 | use serde_json::Value; |
12 | use self::regex::Regex; | 12 | use self::regex::Regex; |
13 | use CONFIGURATION; | ||
13 | 14 | ||
14 | pub fn query_url_gen(title: &str) -> String { | 15 | pub fn query_url_gen(title: &str) -> String { |
15 | // query config | 16 | // query config |
16 | let mut url = String::from("https://en.wikipedia.org"); | 17 | let mut url = CONFIGURATION.wiki_url.clone(); |
17 | url.push_str("/w/api.php?"); | 18 | url.push_str("/w/api.php?"); |
18 | url.push_str("action=query&"); | 19 | url.push_str("action=query&"); |
19 | url.push_str("format=json&"); | 20 | url.push_str("format=json&"); |
@@ -31,7 +32,7 @@ pub fn query_url_gen(title: &str) -> String { | |||
31 | pub fn search_url_gen(search: &str) -> String { | 32 | pub fn search_url_gen(search: &str) -> String { |
32 | // search config | 33 | // search config |
33 | let search = search.replace(" ", "%20"); | 34 | let search = search.replace(" ", "%20"); |
34 | let mut url = String::from("https://en.wikipedia.org"); | 35 | let mut url = CONFIGURATION.wiki_url.clone(); |
35 | url.push_str("/w/api.php?"); | 36 | url.push_str("/w/api.php?"); |
36 | url.push_str("action=opensearch&"); | 37 | url.push_str("action=opensearch&"); |
37 | url.push_str("format=json&"); | 38 | url.push_str("format=json&"); |