How jaames/dreams-api works
Dreams API is a small Node.js proxy for indreams.me, not a level-data downloader. A client sends a GET, POST, or audio-import request to the local Express server; the server delegates to the corresponding proxy request, which builds authentication headers, forwards the request, updates configured cookies from the response, and relays the upstream status, headers, and body. The repository also provides ID conversion and Dreams content-type definitions, but their use in the proxy workflow is not shown. The configuration file is read and updated at runtime; source excerpts do not show how the example config becomes the required file.
Main entry points: dreamsClient.ts API client · server.ts Express proxy · dreamsId.ts ID conversion · dreamsThing.ts Content types
Components 7
API proxy
- API client
src/dreamsClient.ts - Express proxy
src/server.ts - indreams.me API
Dreams identifiers
- ID conversion
src/dreamsId.ts - Content types
src/dreamsThing.ts
Configuration
- Config state
src/config.ts
Other components
- API caller
Connections 6
- API caller → Express proxy: sends requests
src/server.ts - Express proxy → API client: dispatches requests
src/server.ts - API client → indreams.me API: forwards requests
src/dreamsClient.ts - API client → Config state: reads and updates cookies
src/dreamsClient.ts - API client → Express proxy: returns responses
src/server.ts - ID conversion → Content types: maps ID types
src/dreamsId.ts