Updated API docs
This commit is contained in:
1 parent
e82b905886
commit
3df2e2ce3e
2 files changed
+141
-15
No files matched your search
@@ -14,6 +14,31 @@ Base Axios instance in `lib/api.ts` — configured with base URL and interceptor
|
||||
|
||||
---
|
||||
|
||||
## auth.ts
|
||||
|
||||
Authentication.
|
||||
|
||||
| Method | HTTP | Endpoint |
|
||||
|---|---|---|
|
||||
| `login(password, remember)` | POST | `/auth/login` |
|
||||
| `verify(token)` | GET | `/auth/verify` |
|
||||
|
||||
---
|
||||
|
||||
## watchBuddy.ts
|
||||
|
||||
Watch buddy management.
|
||||
|
||||
| Method | HTTP | Endpoint |
|
||||
|---|---|---|
|
||||
| `search(q?)` | GET | `/watch-buddies/search` |
|
||||
| `create(data)` | POST | `/watch-buddies` |
|
||||
| `update(id, data)` | PUT | `/watch-buddies/:id` |
|
||||
| `remove(id)` | DELETE | `/watch-buddies/:id` |
|
||||
| `migrateSeenWith()` | POST | `/watch-buddies/migrate-seen-with` |
|
||||
|
||||
---
|
||||
|
||||
## entries.ts
|
||||
|
||||
Entry CRUD and management.
|
||||
@@ -35,6 +60,7 @@ Entry CRUD and management.
|
||||
| `uploadMedia(id, formData)` | POST | `/entries/:id/media` |
|
||||
| `setMediaSelected(entryId, mediaId)` | PUT | `/entries/:entryId/media/:mediaId` |
|
||||
| `deleteMedia(entryId, mediaId)` | DELETE | `/entries/:entryId/media/:mediaId` |
|
||||
| `previewTmdb(tmdbId, type)` | GET | `/entries/tmdb/preview/:type/:tmdbId` |
|
||||
|
||||
## tmdb.ts
|
||||
|
||||
@@ -50,11 +76,15 @@ TMDB proxy endpoints (via backend).
|
||||
| `getTopRatedTv(page)` | GET | `/entries/tmdb/top-rated/tv` |
|
||||
| `getUpcomingMovies(page)` | GET | `/entries/tmdb/upcoming/movie` |
|
||||
| `search(query, page)` | GET | `/entries/tmdb/search` |
|
||||
| `getPopularPeople()` | GET | `/people/tmdb/popular` |
|
||||
| `searchPeople(query)` | GET | `/people/tmdb/search` |
|
||||
| `getPopularPeople(page)` | GET | `/people/tmdb/popular` |
|
||||
| `searchPeople(query, page)` | GET | `/people/tmdb/search` |
|
||||
|
||||
---
|
||||
|
||||
## collections.ts
|
||||
|
||||
Collection CRUD and entry management.
|
||||
|
||||
| Method | HTTP | Endpoint |
|
||||
|---|---|---|
|
||||
| `getAll()` | GET | `/collections` |
|
||||
@@ -64,8 +94,8 @@ TMDB proxy endpoints (via backend).
|
||||
| `updateWithMedia(id, formData)` | PUT | `/collections/:id` (multipart) |
|
||||
| `delete(id)` | DELETE | `/collections/:id` |
|
||||
| `getCollectionParts(id)` | PUT | `/collections/:id/parts` |
|
||||
| `addEntry(collectionId, entryId)` | POST | `/collections/:id/entries/:entryId` |
|
||||
| `removeEntry(collectionId, entryId)` | DELETE | `/collections/:id/entries/:entryId` |
|
||||
| `addEntry(collectionId, entryId)` | POST | `/collections/:collectionId/entries/:entryId` |
|
||||
| `removeEntry(collectionId, entryId)` | DELETE | `/collections/:collectionId/entries/:entryId` |
|
||||
|
||||
## seasons.ts
|
||||
|
||||
@@ -86,6 +116,8 @@ TMDB proxy endpoints (via backend).
|
||||
|
||||
## entry-seen.ts
|
||||
|
||||
Movie watch records.
|
||||
|
||||
| Method | HTTP | Endpoint |
|
||||
|---|---|---|
|
||||
| `getAll()` | GET | `/entry-seen` |
|
||||
@@ -97,24 +129,33 @@ TMDB proxy endpoints (via backend).
|
||||
|
||||
## episode-seen.ts
|
||||
|
||||
Episode watch records.
|
||||
|
||||
| Method | HTTP | Endpoint |
|
||||
|---|---|---|
|
||||
| `getAll()` | GET | `/episode-seen` |
|
||||
| `getById(id)` | GET | `/episode-seen/:id` |
|
||||
| `getByEpisode(episodeId)` | GET | `/episode-seen/by-episode/:episodeId` |
|
||||
| `getByEntry(entryId)` | GET | `/episode-seen/by-entry/:entryId` |
|
||||
| `create(data)` | POST | `/episode-seen` |
|
||||
| `update(id, data)` | PUT | `/episode-seen/:id` |
|
||||
| `delete(id)` | DELETE | `/episode-seen/:id` |
|
||||
|
||||
## people.ts
|
||||
|
||||
People CRUD and TMDB integration.
|
||||
|
||||
| Method | HTTP | Endpoint |
|
||||
|---|---|---|
|
||||
| `getAll()` | GET | `/people` |
|
||||
| `getAllPaginated(page, limit, search?)` | GET | `/people` |
|
||||
| `getById(id)` | GET | `/people/:id` |
|
||||
| `getCredits(id)` | GET | `/people/:id/credits` |
|
||||
| `getTmdbFilmography(id)` | GET | `/people/:id/tmdb-filmography` |
|
||||
| `fetchByTmdbId(tmdbId)` | POST | `/people/fetch` |
|
||||
| `previewTmdb(tmdbId)` | GET | `/people/tmdb/preview/:tmdbId` |
|
||||
| `fetchByTmdbId(tmdbId, pinned?)` | POST | `/people/fetch` |
|
||||
| `update(id, data)` | PUT | `/people/:id` |
|
||||
| `search(query)` | GET | `/people/search` |
|
||||
|
||||
## statistics.ts
|
||||
|
||||
@@ -134,11 +175,27 @@ TMDB proxy endpoints (via backend).
|
||||
|
||||
## maintenance.ts
|
||||
|
||||
Maintenance and cleanup utilities.
|
||||
|
||||
| Method | HTTP | Endpoint |
|
||||
|---|---|---|
|
||||
| `scanOrphanFiles()` | GET | `/maintenance/orphan-files` |
|
||||
| `deleteOrphanFiles()` | DELETE | `/maintenance/orphan-files` |
|
||||
| `scanOrphanMediaRecords()` | GET | `/maintenance/orphan-media-records` |
|
||||
| `deleteOrphanMediaRecords()` | DELETE | `/maintenance/orphan-media-records` |
|
||||
| `scanOrphanPeople()` | GET | `/maintenance/orphan-people` |
|
||||
| `deleteOrphanPeople()` | DELETE | `/maintenance/orphan-people` |
|
||||
| `scanMissingDirectors()` | GET | `/maintenance/missing-directors` |
|
||||
| `fixMissingDirectors()` | POST | `/maintenance/missing-directors` |
|
||||
| `scanDuplicateCredits()` | GET | `/maintenance/duplicate-credits` |
|
||||
| `cleanDuplicateCredits()` | DELETE | `/maintenance/duplicate-credits` |
|
||||
| `autoFixWatchStatuses()` | POST | `/maintenance/auto-fix-watch-statuses` |
|
||||
| `migrateSeenWith()` | POST | `/watch-buddies/migrate-seen-with` |
|
||||
|
||||
Response type: `{ posters: number, logos: number, backdrops: number, stills: number }`
|
||||
Response types:
|
||||
- **Orphan files/media:** `{ posters: number, logos: number, backdrops: number, stills: number }`
|
||||
- **Orphan people:** `{ count: number }`
|
||||
- **Missing directors:** `{ count: number, fixed: number }`
|
||||
- **Duplicate credits:** `{ groups: number, duplicates: number, deleted: number }`
|
||||
- **Auto-fix watch statuses:** `{ completed: number, watching: number, planToWatch: number }`
|
||||
- **Migrate seen-with:** `{ created: number, linked: number, processed: number }`
|
||||
Reference in new issue
Block a user