atlas-obscura-api 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +68 -7
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -7,14 +7,17 @@
7
7
 
8
8
  > JavaScript NPM library for scraping **Atlas Obscura ([atlasobscura.com](https://atlasobscura.com))** [unofficial]
9
9
  >
10
- > - Browser + Node.js (SSR)
10
+ > - Browser + Node.js
11
11
  > - JavaScript / TypeScript
12
+ > - ESM + CJS support
12
13
  > - You can use in:
14
+ > - Serverless functions
13
15
  > - Firebase function
14
16
  > - AWS λ (lambda function)
15
17
  > - Chrome extension
16
18
  > - React native app
17
19
  > - Docker container
20
+ > - Node.js app
18
21
  > - ...
19
22
 
20
23
  ## 📦 Installation
@@ -33,6 +36,7 @@ Explore how to use the library with practical code snippets and sample outputs b
33
36
  - [Search](#search)
34
37
  - [Show place by ID (short)](#short-version-one-quick-request)
35
38
  - [Show place by ID (full)](#full-detail-two-internal-requests)
39
+ - [User](#user)
36
40
 
37
41
  ### All Places
38
42
 
@@ -209,6 +213,62 @@ atlasObscura.placeFull(494).then((place) => console.log(place));
209
213
  }
210
214
  ```
211
215
 
216
+ #### User
217
+
218
+ > Get user by nickname
219
+
220
+ ```javascript
221
+ import { atlasObscura } from 'atlas-obscura-api';
222
+
223
+ atlasObscura.user('bartholomej').then((user) => console.log(user));
224
+ ```
225
+
226
+ #### Results
227
+
228
+ ```javascript
229
+ {
230
+ "id": 251656,
231
+ "places": [
232
+ {
233
+ "id": 15078,
234
+ "title": "Roskilde Viking Ship Museum ",
235
+ "subtitle": "Nordic giants resurrected from the sea and restored to their former greatness.",
236
+ "url": "https://www.atlasobscura.com/places/roskilde-viking-ship-museum",
237
+ "location": "Roskilde, Denmark",
238
+ "thumbnail_url": "https://img.atlasobscura.com/DjHjzdzd3l7b8AN47HKwpt8GYmG83Yo2pVJdmr2bhWY/rs:fill:200:200:1/g:ce/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL3BsYWNl/X2ltYWdlcy8xODRm/NTFjYjAzMzM3OTFh/ZTBfSU1HXzAyODcu/SlBH.jpg",
239
+ "coordinates": {
240
+ "lat": 55.649645,
241
+ "lng": 12.077977
242
+ }
243
+ },
244
+ {
245
+ "id": 58990,
246
+ "title": "Grave of the Hel-Horse",
247
+ "subtitle": "According to legend, this is the burial place of a mythical three-legged death omen horse.",
248
+ "url": "https://www.atlasobscura.com/places/grave-of-the-hel-horse-roskilde",
249
+ "location": "Roskilde, Denmark",
250
+ "thumbnail_url": "https://img.atlasobscura.com/5jjvXXDD7Mravpa0EZiIluytCKiQYjfl_EtPakLaK-Q/rs:fill:200:200:1/g:ce/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL3BsYWNl/X2ltYWdlcy9jYjk1/MjBjMy01NjNlLTRj/ZjItOTY4Yi1iNmY5/MGY5ZWFkZjZiY2Zi/NmE2NTgwYWQ5NGFl/ZTJfMjAyNDA1MThf/MTIwMDIyLmpwZw.jpg",
251
+ "coordinates": {
252
+ "lat": 55.642489,
253
+ "lng": 12.079727
254
+ }
255
+ },
256
+ {
257
+ "id": 51651,
258
+ "title": "Kamo River Turtle Stepping Stones ",
259
+ "subtitle": "These turtle-shaped concrete stepping stones provide a unique river crossing in central Kyoto. ",
260
+ "url": "https://www.atlasobscura.com/places/kamogawa-river-turtle-stepping-stones",
261
+ "location": "Kyoto, Japan",
262
+ "thumbnail_url": "https://img.atlasobscura.com/XmjRSPUfP2jQwVQrLFRckpb_UPUTCuDWJ8zqZJt9Wfc/rs:fill:200:200:1/g:ce/c:2997:1998:nowe:4:1914/q:81/sm:1/scp:1/ar:1/aHR0cHM6Ly9hdGxh/cy1kZXYuczMuYW1h/em9uYXdzLmNvbS91/cGxvYWRzL3BsYWNl/X2ltYWdlcy85ZDEz/M2FiMi0xMWFkLTQ5/ODgtYThiYy1hYmI3/N2E0NTBhNzc3MDNl/M2FjMjcyOTJmMjQ3/MTlfN0MxRUJFMUYt/REU1Ni00M0VBLTg0/ODctN0U4MEZGMDVD/RDNDLmpwZWc.jpg",
263
+ "coordinates": {
264
+ "lat": 35.029859,
265
+ "lng": 135.771764
266
+ }
267
+ }
268
+ ]
269
+ }
270
+ ```
271
+
212
272
  ## 📦 Docker
213
273
 
214
274
  You can use this library in Docker.
@@ -241,15 +301,16 @@ docker run -p 3000:3000 atlas-obscura-api
241
301
 
242
302
  > Some examples
243
303
 
244
- - `/movie/535121`
245
- - `/search/quentin+tarantino`
246
- - `/creator/2120`
247
- - `/user-ratings/912-bart`
304
+ - `/places-all`
305
+ - `/search/prague`
306
+ - `/place-short/465`
307
+ - `/place-full/456`
308
+ - `/user/bartholomej`
248
309
 
249
310
  ## Used By
250
311
 
251
- - Atlas Obscura Offline mobile app (Android, iOS)
252
- - 🤷
312
+ - Mobile app: Atlas Obscura: Offline → [Play Store](https://play.google.com/store/apps/details?id=com.aquasoup.atlasobscura)
313
+ - Chrome extension: Atlas Obscura Tabs → [Chrome Web Store](https://chromewebstore.google.com/detail/atlas-obscura-tabs-unoffi/jdbhojildmiebfbfepepcampalojdpdc)
253
314
 
254
315
  ## Development
255
316
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atlas-obscura-api",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "Atlas Obscura API in JavaScript. NPM library for scrapping atlasobscura.com",
5
5
  "author": "BART! <bart@bartweb.cz>",
6
6
  "dependencies": {