-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for fetching slugs from atlasobscura daily
- Refactored constants and types into their own files
- Loading branch information
1 parent
7296f1a
commit 7ae3e73
Showing
3 changed files
with
87 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const BASE_URL = "http://www.atlasobscura.com"; | ||
export const PLACES_LIST_URL = BASE_URL + "/extension_image_pool/v2/pool.json"; | ||
export const FETCH_INTERVAL = 24; // Fetch json content every n hours. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export type Place = { | ||
id: number; | ||
title: string; | ||
subtitle: string; | ||
city: string; | ||
state: string; | ||
country: string; | ||
location: string; | ||
url: string; | ||
destination_url: string; | ||
image_url_v2: string; | ||
image_attribution: string; | ||
background_image_url: string; | ||
}; | ||
|
||
export type PlacesJSONContent = { | ||
slugs: { | ||
slug: string; | ||
upvotes?: number; | ||
}[]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters