Closed au2001 closed 4 years ago
Thanks for catching that and the extensive writeup. I've published moviedb-promise@3.1.0
correcting the parameters for find
to only be a FindRequest
.
export interface FindRequest extends Request {
id: string|number
language?: string
external_source?: ExternalId
}
It was a misconfiguration on my part. Thanks again.
Sorry, already caught an problem and published 3.1.1
, making external_source
required...
export interface FindRequest extends Request {
id: string|number
language?: string
external_source: ExternalId
}
Thanks for the fast reply and fix.
Unfortunately, I still encounter problems with the latest version (3.1.1
).
More precisely, FindRequest
extends Request
from the Fetch API, rather than RequestParams
from ./types
.
Performing (only) this modification fixes the issue for me and the function now works as expected.
.... 🤦♂️
Thanks, I've corrected it for 3.1.2
I can confirm that the 3.1.2
version from npm works fine now. Thanks.
Hi,
The
find
function seems outdated and not to work anymore. It throws a 404 error every I call it.According to The Movie Database's API documentation, the parameters should be an
external_id
(in the path), anexternal_source
and optionally alanguage
.I believe the current implementation of the
find
function is bugged because:params
parameter is of typestring | number | FindRequest | undefined
which doesn't make sense, you can't pass a singlestring
/number
for it to work.FindRequest
(whichextends Request
) hasid: ExternalId
(on top ofexternal_source?: 'imdb_id' | 'freebase_mid' | ...
) whereExternalId
is an enum containing something similar toexternal_source
:Here is an example code using the current version:
Here would be an example code of the expected usage: