aboutsummaryrefslogtreecommitdiff
path: root/src/environment
diff options
context:
space:
mode:
authorPridon Tetradze <[email protected]>2022-06-26 13:46:59 +0400
committerGitHub <[email protected]>2022-06-26 13:46:59 +0400
commit2e058526d896ab4ee5173ceb80d1248ac08ff594 (patch)
tree9550b812ea66f069396fef043cff1d10aeaec859 /src/environment
parent8626e2d8e258e11837d27a1e99ef3277e7dfdf3b (diff)
downloadcountryfetch-2e058526d896ab4ee5173ceb80d1248ac08ff594.tar.xz
countryfetch-2e058526d896ab4ee5173ceb80d1248ac08ff594.zip
Flag ASCII art, remove tabularization & refactor (#3)
* initial flag image converter * add flags caching * refactor, remove tabularization, make flag ASCII optional. * update readme * update readme
Diffstat (limited to 'src/environment')
-rw-r--r--src/environment/environment.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/environment/environment.ts b/src/environment/environment.ts
index ef48c3d..18434f8 100644
--- a/src/environment/environment.ts
+++ b/src/environment/environment.ts
@@ -2,9 +2,15 @@ import home_dir from "https://deno.land/x/[email protected]/home_dir/mod.ts";
import { join } from "https://deno.land/[email protected]/path/mod.ts";
export const environment = {
+ // Backend from where the information is fetched
baseUrl: "https://restcountries.com/v3.1/",
+ // Update cache if it has been longer than given DAYS since last sync
syncInterval: 7,
+ // Directory where country information should be stored.
cacheDir: join(home_dir() as string, ".cache", "countryfetch"),
+ // Determines the size of ASCII art flag size
+ flagWidth: 40,
+ // Fields that should be fetched from API
queries:
- "all?fields=name,capital,currencies,population,flag,languages,region,subregion,timezones,latlng,capitalInfo,tld",
+ "all?fields=name,capital,currencies,population,flag,languages,region,subregion,timezones,latlng,capitalInfo,tld,flags",
};