changed out example address to example domain.
This commit is contained in:
@@ -104,9 +104,9 @@ cd api
|
|||||||
uvicorn main:app --reload
|
uvicorn main:app --reload
|
||||||
```
|
```
|
||||||
|
|
||||||
- API root: http://127.0.0.1:8000
|
- API root: https://fundi.api.example.com
|
||||||
- Interactive docs (Swagger UI): http://127.0.0.1:8000/docs
|
- Interactive docs (Swagger UI): https://fundi.api.example.com/docs
|
||||||
- OpenAPI schema: http://127.0.0.1:8000/openapi.json
|
- OpenAPI schema: https://fundi.api.example.com/openapi.json
|
||||||
|
|
||||||
By default the API reads `fundi-scraped-output.json` (current/upcoming events)
|
By default the API reads `fundi-scraped-output.json` (current/upcoming events)
|
||||||
and `fundi-archive-output.json` (past events, from `--archive`) from the repo
|
and `fundi-archive-output.json` (past events, from `--archive`) from the repo
|
||||||
@@ -227,32 +227,32 @@ instead of a guessed time.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# All events
|
# All events
|
||||||
curl http://127.0.0.1:8000/events
|
curl https://fundi.api.example.com/events
|
||||||
|
|
||||||
# Only free events
|
# Only free events
|
||||||
curl 'http://127.0.0.1:8000/events?free=true'
|
curl 'https://fundi.api.example.com/events?free=true'
|
||||||
|
|
||||||
# Upcoming events featuring an artist whose name contains "randali"
|
# Upcoming events featuring an artist whose name contains "randali"
|
||||||
curl 'http://127.0.0.1:8000/events?artist=randali&upcoming=true'
|
curl 'https://fundi.api.example.com/events?artist=randali&upcoming=true'
|
||||||
|
|
||||||
# Everything on a given night
|
# Everything on a given night
|
||||||
curl 'http://127.0.0.1:8000/events?date=05.09.26'
|
curl 'https://fundi.api.example.com/events?date=05.09.26'
|
||||||
|
|
||||||
# Past events (archive)
|
# Past events (archive)
|
||||||
curl http://127.0.0.1:8000/events/archive
|
curl https://fundi.api.example.com/events/archive
|
||||||
|
|
||||||
# First event in the merged list
|
# First event in the merged list
|
||||||
curl http://127.0.0.1:8000/events/0
|
curl https://fundi.api.example.com/events/0
|
||||||
|
|
||||||
# All known artists
|
# All known artists
|
||||||
curl http://127.0.0.1:8000/artists
|
curl https://fundi.api.example.com/artists
|
||||||
|
|
||||||
# Calendar feed
|
# Calendar feed
|
||||||
curl http://127.0.0.1:8000/calendar.ics
|
curl https://fundi.api.example.com/calendar.ics
|
||||||
|
|
||||||
# Refresh after re-scraping
|
# Refresh after re-scraping
|
||||||
python scraper/scraper.py && python scraper/scraper.py --archive
|
python scraper/scraper.py && python scraper/scraper.py --archive
|
||||||
curl -X POST http://127.0.0.1:8000/reload
|
curl -X POST https://fundi.api.example.com/reload
|
||||||
```
|
```
|
||||||
|
|
||||||
## Typical workflow
|
## Typical workflow
|
||||||
@@ -267,7 +267,7 @@ cd api && uvicorn main:app --reload
|
|||||||
|
|
||||||
# 3. (later) re-scrape and hot-reload the API without restarting it
|
# 3. (later) re-scrape and hot-reload the API without restarting it
|
||||||
python scraper/scraper.py
|
python scraper/scraper.py
|
||||||
curl -X POST http://127.0.0.1:8000/reload
|
curl -X POST https://fundi.api.example.com/reload
|
||||||
```
|
```
|
||||||
|
|
||||||
## Project layout
|
## Project layout
|
||||||
|
|||||||
Reference in New Issue
Block a user