mirror of
https://github.com/calibrain/shelfmark.git
synced 2026-10-05 10:01:15 +01:00
- Adds the functionality to search Hardcover lists, either public lists or user's private lists - Paste a list URL into the search box to view results - Select a specific list from user's collection from advanced fields dropdown - Fixes content_type parameter in URL search query to use book/audiobook
83 lines
2.1 KiB
Markdown
83 lines
2.1 KiB
Markdown
# URL Search Parameters
|
|
|
|
You can trigger searches directly via URL by adding query parameters. This enables bookmarking searches and sharing links.
|
|
|
|
## Basic Usage
|
|
|
|
```
|
|
http://your-server:8084/?q=harry+potter
|
|
```
|
|
|
|
## Supported Parameters
|
|
|
|
| Parameter | Description | Example |
|
|
|-----------|-------------|---------|
|
|
| `q` or `query` | Main search query | `/?q=dune` |
|
|
| `author` | Filter by author name | `/?author=frank+herbert` |
|
|
| `title` | Filter by book title | `/?title=foundation` |
|
|
| `isbn` | Filter by ISBN | `/?isbn=978-0747532699` |
|
|
| `lang` | Filter by language (ISO 639-1 code) | `/?lang=en` |
|
|
| `format` | Filter by file format | `/?format=epub` |
|
|
| `content` | Filter by content type | `/?content=fiction` |
|
|
| `content_type` | Select media type (`ebook` or `audiobook`) in Universal mode only | `/?q=dune&content_type=audiobook` |
|
|
| `sort` | Sort order for results | `/?sort=newest` |
|
|
|
|
## Multiple Values
|
|
|
|
Some parameters support multiple values by repeating the parameter:
|
|
|
|
```
|
|
/?lang=en&lang=de&lang=fr
|
|
/?format=epub&format=mobi&format=azw3
|
|
```
|
|
|
|
## Examples
|
|
|
|
**Simple search:**
|
|
```
|
|
/?q=lord+of+the+rings
|
|
```
|
|
|
|
**Search with author filter:**
|
|
```
|
|
/?q=dune&author=frank+herbert
|
|
```
|
|
|
|
**Search with format and language:**
|
|
```
|
|
/?q=harry+potter&format=epub&lang=en
|
|
```
|
|
|
|
**Author search with multiple formats:**
|
|
```
|
|
/?author=stephen+king&format=epub&format=mobi
|
|
```
|
|
|
|
**Search with sort order:**
|
|
```
|
|
/?q=science+fiction&sort=newest
|
|
```
|
|
|
|
**Universal search as audiobook:**
|
|
```
|
|
/?q=dune&content_type=audiobook
|
|
```
|
|
|
|
## Search Mode Behavior
|
|
|
|
### Direct Download Mode (default)
|
|
|
|
All parameters are used to filter results from the direct download source.
|
|
`content_type` is ignored in Direct mode.
|
|
|
|
### Universal Mode
|
|
|
|
`q`, `sort`, and `content_type` are used. Other parameters (author, title, format, etc.) are silently ignored since metadata providers have their own search capabilities.
|
|
|
|
## Notes
|
|
|
|
- URL parameters are read once on page load
|
|
- The URL is not updated when you perform searches manually
|
|
- Spaces should be encoded as `+` or `%20`
|
|
- Invalid or unknown parameters are silently ignored
|