Comparing version 3.1.2 to 4.0.0
@@ -0,1 +1,16 @@ | ||
# Version 3.1.2 -> 4.0.0 | ||
* Removed callback api | ||
* Created a client object so that applications can re-use options (Fixes #61) | ||
* Added short plot summary (Fixes #55, #37) | ||
* Episode now inherits from Movie, like everything else | ||
* Much more data validation on responses | ||
* Fix broken rating conversion | ||
* Drop support for unsupported node versions | ||
* Convert tests to typescript | ||
* Remove utils module | ||
* Remove `MovieOpts` from `MovieRequest` and have it be a separate arg to `get` | ||
* Changed `SearchRequest.title` to `SearchRequest.name` to unify interface | ||
* Specify types for `TVShow.totalseasons`, `TVShow.start_year` and `TVShow.end_year` | ||
# Version 3.1.1 -> 3.1.2 | ||
@@ -2,0 +17,0 @@ |
@@ -1,3 +0,3 @@ | ||
var typedoc = typedoc || {}; | ||
var typedoc = typedoc || {}; | ||
typedoc.search = typedoc.search || {}; | ||
typedoc.search.data = {"kinds":{"1":"External module","32":"Variable","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","4194304":"Type alias"},"rows":[{"id":0,"kind":1,"name":"\"util\"","url":"modules/_util_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":256,"name":"StringHashMap","url":"interfaces/_util_.stringhashmap.html","classes":"tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"util\""},{"id":2,"kind":128,"name":"Inverter","url":"classes/_util_.inverter.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"util\""},{"id":3,"kind":1024,"name":"obj","url":"classes/_util_.inverter.html#obj","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"util\".Inverter"},{"id":4,"kind":1024,"name":"rev_obj","url":"classes/_util_.inverter.html#rev_obj","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"util\".Inverter"},{"id":5,"kind":512,"name":"constructor","url":"classes/_util_.inverter.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"util\".Inverter"},{"id":6,"kind":2048,"name":"get","url":"classes/_util_.inverter.html#get","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"util\".Inverter"},{"id":7,"kind":1,"name":"\"interfaces\"","url":"modules/_interfaces_.html","classes":"tsd-kind-external-module"},{"id":8,"kind":256,"name":"OmdbMovie","url":"interfaces/_interfaces_.omdbmovie.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":9,"kind":1024,"name":"Title","url":"interfaces/_interfaces_.omdbmovie.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":10,"kind":1024,"name":"Year","url":"interfaces/_interfaces_.omdbmovie.html#year","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":11,"kind":1024,"name":"Rated","url":"interfaces/_interfaces_.omdbmovie.html#rated","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":12,"kind":1024,"name":"Released","url":"interfaces/_interfaces_.omdbmovie.html#released","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":13,"kind":1024,"name":"Runtime","url":"interfaces/_interfaces_.omdbmovie.html#runtime","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":14,"kind":1024,"name":"Genre","url":"interfaces/_interfaces_.omdbmovie.html#genre","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":15,"kind":1024,"name":"Director","url":"interfaces/_interfaces_.omdbmovie.html#director","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":16,"kind":1024,"name":"Writer","url":"interfaces/_interfaces_.omdbmovie.html#writer","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":17,"kind":1024,"name":"Actors","url":"interfaces/_interfaces_.omdbmovie.html#actors","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":18,"kind":1024,"name":"Plot","url":"interfaces/_interfaces_.omdbmovie.html#plot","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":19,"kind":1024,"name":"Language","url":"interfaces/_interfaces_.omdbmovie.html#language","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":20,"kind":1024,"name":"Country","url":"interfaces/_interfaces_.omdbmovie.html#country","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":21,"kind":1024,"name":"Awards","url":"interfaces/_interfaces_.omdbmovie.html#awards","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":22,"kind":1024,"name":"Poster","url":"interfaces/_interfaces_.omdbmovie.html#poster","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":23,"kind":1024,"name":"Metascore","url":"interfaces/_interfaces_.omdbmovie.html#metascore","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":24,"kind":1024,"name":"imdbRating","url":"interfaces/_interfaces_.omdbmovie.html#imdbrating","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":25,"kind":1024,"name":"imdbVotes","url":"interfaces/_interfaces_.omdbmovie.html#imdbvotes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":26,"kind":1024,"name":"imdbID","url":"interfaces/_interfaces_.omdbmovie.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":27,"kind":1024,"name":"Type","url":"interfaces/_interfaces_.omdbmovie.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":28,"kind":1024,"name":"Response","url":"interfaces/_interfaces_.omdbmovie.html#response","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbMovie"},{"id":29,"kind":256,"name":"OmdbTvshow","url":"interfaces/_interfaces_.omdbtvshow.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":30,"kind":1024,"name":"Title","url":"interfaces/_interfaces_.omdbtvshow.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":31,"kind":1024,"name":"Year","url":"interfaces/_interfaces_.omdbtvshow.html#year","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":32,"kind":1024,"name":"Rated","url":"interfaces/_interfaces_.omdbtvshow.html#rated","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":33,"kind":1024,"name":"Released","url":"interfaces/_interfaces_.omdbtvshow.html#released","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":34,"kind":1024,"name":"Runtime","url":"interfaces/_interfaces_.omdbtvshow.html#runtime","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":35,"kind":1024,"name":"Genre","url":"interfaces/_interfaces_.omdbtvshow.html#genre","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":36,"kind":1024,"name":"Director","url":"interfaces/_interfaces_.omdbtvshow.html#director","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":37,"kind":1024,"name":"Writer","url":"interfaces/_interfaces_.omdbtvshow.html#writer","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":38,"kind":1024,"name":"Actors","url":"interfaces/_interfaces_.omdbtvshow.html#actors","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":39,"kind":1024,"name":"Plot","url":"interfaces/_interfaces_.omdbtvshow.html#plot","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":40,"kind":1024,"name":"Language","url":"interfaces/_interfaces_.omdbtvshow.html#language","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":41,"kind":1024,"name":"Country","url":"interfaces/_interfaces_.omdbtvshow.html#country","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":42,"kind":1024,"name":"Awards","url":"interfaces/_interfaces_.omdbtvshow.html#awards","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":43,"kind":1024,"name":"Poster","url":"interfaces/_interfaces_.omdbtvshow.html#poster","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":44,"kind":1024,"name":"Metascore","url":"interfaces/_interfaces_.omdbtvshow.html#metascore","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":45,"kind":1024,"name":"imdbRating","url":"interfaces/_interfaces_.omdbtvshow.html#imdbrating","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":46,"kind":1024,"name":"imdbVotes","url":"interfaces/_interfaces_.omdbtvshow.html#imdbvotes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":47,"kind":1024,"name":"imdbID","url":"interfaces/_interfaces_.omdbtvshow.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":48,"kind":1024,"name":"Type","url":"interfaces/_interfaces_.omdbtvshow.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":49,"kind":1024,"name":"Response","url":"interfaces/_interfaces_.omdbtvshow.html#response","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":50,"kind":1024,"name":"totalSeasons","url":"interfaces/_interfaces_.omdbtvshow.html#totalseasons","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbTvshow"},{"id":51,"kind":256,"name":"OmdbEpisode","url":"interfaces/_interfaces_.omdbepisode.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":52,"kind":1024,"name":"Title","url":"interfaces/_interfaces_.omdbepisode.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbEpisode"},{"id":53,"kind":1024,"name":"Released","url":"interfaces/_interfaces_.omdbepisode.html#released","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbEpisode"},{"id":54,"kind":1024,"name":"Episode","url":"interfaces/_interfaces_.omdbepisode.html#episode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbEpisode"},{"id":55,"kind":1024,"name":"Type","url":"interfaces/_interfaces_.omdbepisode.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbEpisode"},{"id":56,"kind":1024,"name":"imdbRating","url":"interfaces/_interfaces_.omdbepisode.html#imdbrating","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbEpisode"},{"id":57,"kind":1024,"name":"imdbID","url":"interfaces/_interfaces_.omdbepisode.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbEpisode"},{"id":58,"kind":256,"name":"OmdbSeason","url":"interfaces/_interfaces_.omdbseason.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":59,"kind":1024,"name":"Title","url":"interfaces/_interfaces_.omdbseason.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSeason"},{"id":60,"kind":1024,"name":"Season","url":"interfaces/_interfaces_.omdbseason.html#season","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSeason"},{"id":61,"kind":1024,"name":"totalEpisodes","url":"interfaces/_interfaces_.omdbseason.html#totalepisodes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSeason"},{"id":62,"kind":1024,"name":"Episodes","url":"interfaces/_interfaces_.omdbseason.html#episodes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSeason"},{"id":63,"kind":1024,"name":"Response","url":"interfaces/_interfaces_.omdbseason.html#response","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSeason"},{"id":64,"kind":256,"name":"OmdbSearchResult","url":"interfaces/_interfaces_.omdbsearchresult.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":65,"kind":1024,"name":"Title","url":"interfaces/_interfaces_.omdbsearchresult.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSearchResult"},{"id":66,"kind":1024,"name":"Year","url":"interfaces/_interfaces_.omdbsearchresult.html#year","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSearchResult"},{"id":67,"kind":1024,"name":"imdbID","url":"interfaces/_interfaces_.omdbsearchresult.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSearchResult"},{"id":68,"kind":1024,"name":"Type","url":"interfaces/_interfaces_.omdbsearchresult.html#type","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSearchResult"},{"id":69,"kind":1024,"name":"Poster","url":"interfaces/_interfaces_.omdbsearchresult.html#poster","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSearchResult"},{"id":70,"kind":256,"name":"OmdbSearch","url":"interfaces/_interfaces_.omdbsearch.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":71,"kind":1024,"name":"Search","url":"interfaces/_interfaces_.omdbsearch.html#search","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSearch"},{"id":72,"kind":1024,"name":"totalResults","url":"interfaces/_interfaces_.omdbsearch.html#totalresults","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSearch"},{"id":73,"kind":1024,"name":"Response","url":"interfaces/_interfaces_.omdbsearch.html#response","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbSearch"},{"id":74,"kind":256,"name":"OmdbError","url":"interfaces/_interfaces_.omdberror.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":75,"kind":1024,"name":"Response","url":"interfaces/_interfaces_.omdberror.html#response","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbError"},{"id":76,"kind":1024,"name":"Error","url":"interfaces/_interfaces_.omdberror.html#error","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"interfaces\".OmdbError"},{"id":77,"kind":64,"name":"isError","url":"modules/_interfaces_.html#iserror","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":78,"kind":64,"name":"isTvshow","url":"modules/_interfaces_.html#istvshow","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":79,"kind":64,"name":"isMovie","url":"modules/_interfaces_.html#ismovie","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":80,"kind":64,"name":"isEpisode","url":"modules/_interfaces_.html#isepisode","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"interfaces\""},{"id":81,"kind":1,"name":"\"imdb\"","url":"modules/_imdb_.html","classes":"tsd-kind-external-module"},{"id":82,"kind":256,"name":"MovieOpts","url":"interfaces/_imdb_.movieopts.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":83,"kind":1024,"name":"apiKey","url":"interfaces/_imdb_.movieopts.html#apikey","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieOpts"},{"id":84,"kind":1024,"name":"timeout","url":"interfaces/_imdb_.movieopts.html#timeout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieOpts"},{"id":85,"kind":256,"name":"MovieRequest","url":"interfaces/_imdb_.movierequest.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":86,"kind":1024,"name":"name","url":"interfaces/_imdb_.movierequest.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieRequest"},{"id":87,"kind":1024,"name":"id","url":"interfaces/_imdb_.movierequest.html#id","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieRequest"},{"id":88,"kind":1024,"name":"year","url":"interfaces/_imdb_.movierequest.html#year","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieRequest"},{"id":89,"kind":1024,"name":"opts","url":"interfaces/_imdb_.movierequest.html#opts","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieRequest"},{"id":90,"kind":256,"name":"SearchRequest","url":"interfaces/_imdb_.searchrequest.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":91,"kind":1024,"name":"title","url":"interfaces/_imdb_.searchrequest.html#title","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".SearchRequest"},{"id":92,"kind":1024,"name":"reqtype","url":"interfaces/_imdb_.searchrequest.html#reqtype","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".SearchRequest"},{"id":93,"kind":1024,"name":"year","url":"interfaces/_imdb_.searchrequest.html#year","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".SearchRequest"},{"id":94,"kind":128,"name":"Episode","url":"classes/_imdb_.episode.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":95,"kind":1024,"name":"season","url":"classes/_imdb_.episode.html#season","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":96,"kind":1024,"name":"name","url":"classes/_imdb_.episode.html#name","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":97,"kind":1024,"name":"episode","url":"classes/_imdb_.episode.html#episode","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":98,"kind":1024,"name":"released","url":"classes/_imdb_.episode.html#released","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":99,"kind":1024,"name":"imdbid","url":"classes/_imdb_.episode.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":100,"kind":1024,"name":"rating","url":"classes/_imdb_.episode.html#rating","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":101,"kind":512,"name":"constructor","url":"classes/_imdb_.episode.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":102,"kind":128,"name":"Movie","url":"classes/_imdb_.movie.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":103,"kind":1024,"name":"imdbid","url":"classes/_imdb_.movie.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":104,"kind":1024,"name":"imdburl","url":"classes/_imdb_.movie.html#imdburl","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":105,"kind":1024,"name":"genres","url":"classes/_imdb_.movie.html#genres","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":106,"kind":1024,"name":"languages","url":"classes/_imdb_.movie.html#languages","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":107,"kind":1024,"name":"country","url":"classes/_imdb_.movie.html#country","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":108,"kind":1024,"name":"votes","url":"classes/_imdb_.movie.html#votes","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":109,"kind":1024,"name":"series","url":"classes/_imdb_.movie.html#series","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":110,"kind":1024,"name":"rating","url":"classes/_imdb_.movie.html#rating","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":111,"kind":1024,"name":"runtime","url":"classes/_imdb_.movie.html#runtime","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":112,"kind":1024,"name":"title","url":"classes/_imdb_.movie.html#title","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":113,"kind":1024,"name":"year","url":"classes/_imdb_.movie.html#year","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":114,"kind":1024,"name":"type","url":"classes/_imdb_.movie.html#type","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":115,"kind":1024,"name":"poster","url":"classes/_imdb_.movie.html#poster","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":116,"kind":1024,"name":"metascore","url":"classes/_imdb_.movie.html#metascore","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":117,"kind":1024,"name":"plot","url":"classes/_imdb_.movie.html#plot","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":118,"kind":1024,"name":"rated","url":"classes/_imdb_.movie.html#rated","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":119,"kind":1024,"name":"director","url":"classes/_imdb_.movie.html#director","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":120,"kind":1024,"name":"writer","url":"classes/_imdb_.movie.html#writer","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":121,"kind":1024,"name":"actors","url":"classes/_imdb_.movie.html#actors","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":122,"kind":1024,"name":"released","url":"classes/_imdb_.movie.html#released","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":123,"kind":1024,"name":"_year_data","url":"classes/_imdb_.movie.html#_year_data","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"\"imdb\".Movie"},{"id":124,"kind":512,"name":"constructor","url":"classes/_imdb_.movie.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":125,"kind":128,"name":"TVShow","url":"classes/_imdb_.tvshow.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":126,"kind":1024,"name":"start_year","url":"classes/_imdb_.tvshow.html#start_year","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".TVShow"},{"id":127,"kind":1024,"name":"end_year","url":"classes/_imdb_.tvshow.html#end_year","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".TVShow"},{"id":128,"kind":1024,"name":"totalseasons","url":"classes/_imdb_.tvshow.html#totalseasons","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".TVShow"},{"id":129,"kind":1024,"name":"_episodes","url":"classes/_imdb_.tvshow.html#_episodes","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"imdb\".TVShow"},{"id":130,"kind":1024,"name":"opts","url":"classes/_imdb_.tvshow.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"imdb\".TVShow"},{"id":131,"kind":512,"name":"constructor","url":"classes/_imdb_.tvshow.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite","parent":"\"imdb\".TVShow"},{"id":132,"kind":2048,"name":"episodes","url":"classes/_imdb_.tvshow.html#episodes","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"imdb\".TVShow"},{"id":133,"kind":1024,"name":"imdbid","url":"classes/_imdb_.tvshow.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":134,"kind":1024,"name":"imdburl","url":"classes/_imdb_.tvshow.html#imdburl","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":135,"kind":1024,"name":"genres","url":"classes/_imdb_.tvshow.html#genres","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":136,"kind":1024,"name":"languages","url":"classes/_imdb_.tvshow.html#languages","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":137,"kind":1024,"name":"country","url":"classes/_imdb_.tvshow.html#country","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":138,"kind":1024,"name":"votes","url":"classes/_imdb_.tvshow.html#votes","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":139,"kind":1024,"name":"series","url":"classes/_imdb_.tvshow.html#series","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":140,"kind":1024,"name":"rating","url":"classes/_imdb_.tvshow.html#rating","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":141,"kind":1024,"name":"runtime","url":"classes/_imdb_.tvshow.html#runtime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":142,"kind":1024,"name":"title","url":"classes/_imdb_.tvshow.html#title","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":143,"kind":1024,"name":"year","url":"classes/_imdb_.tvshow.html#year","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":144,"kind":1024,"name":"type","url":"classes/_imdb_.tvshow.html#type","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":145,"kind":1024,"name":"poster","url":"classes/_imdb_.tvshow.html#poster","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":146,"kind":1024,"name":"metascore","url":"classes/_imdb_.tvshow.html#metascore","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":147,"kind":1024,"name":"plot","url":"classes/_imdb_.tvshow.html#plot","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":148,"kind":1024,"name":"rated","url":"classes/_imdb_.tvshow.html#rated","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":149,"kind":1024,"name":"director","url":"classes/_imdb_.tvshow.html#director","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":150,"kind":1024,"name":"writer","url":"classes/_imdb_.tvshow.html#writer","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":151,"kind":1024,"name":"actors","url":"classes/_imdb_.tvshow.html#actors","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":152,"kind":1024,"name":"released","url":"classes/_imdb_.tvshow.html#released","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":153,"kind":1024,"name":"_year_data","url":"classes/_imdb_.tvshow.html#_year_data","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"\"imdb\".TVShow"},{"id":154,"kind":128,"name":"SearchResult","url":"classes/_imdb_.searchresult.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":155,"kind":1024,"name":"title","url":"classes/_imdb_.searchresult.html#title","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":156,"kind":1024,"name":"year","url":"classes/_imdb_.searchresult.html#year","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":157,"kind":1024,"name":"imdbid","url":"classes/_imdb_.searchresult.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":158,"kind":1024,"name":"type","url":"classes/_imdb_.searchresult.html#type","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":159,"kind":1024,"name":"poster","url":"classes/_imdb_.searchresult.html#poster","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":160,"kind":512,"name":"constructor","url":"classes/_imdb_.searchresult.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":161,"kind":128,"name":"SearchResults","url":"classes/_imdb_.searchresults.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":162,"kind":1024,"name":"results","url":"classes/_imdb_.searchresults.html#results","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResults"},{"id":163,"kind":1024,"name":"totalresults","url":"classes/_imdb_.searchresults.html#totalresults","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResults"},{"id":164,"kind":1024,"name":"page","url":"classes/_imdb_.searchresults.html#page","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"imdb\".SearchResults"},{"id":165,"kind":1024,"name":"opts","url":"classes/_imdb_.searchresults.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"imdb\".SearchResults"},{"id":166,"kind":1024,"name":"req","url":"classes/_imdb_.searchresults.html#req","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-private","parent":"\"imdb\".SearchResults"},{"id":167,"kind":512,"name":"constructor","url":"classes/_imdb_.searchresults.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".SearchResults"},{"id":168,"kind":2048,"name":"next","url":"classes/_imdb_.searchresults.html#next","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"imdb\".SearchResults"},{"id":169,"kind":128,"name":"ImdbError","url":"classes/_imdb_.imdberror.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":170,"kind":1024,"name":"name","url":"classes/_imdb_.imdberror.html#name","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".ImdbError"},{"id":171,"kind":512,"name":"constructor","url":"classes/_imdb_.imdberror.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".ImdbError"},{"id":172,"kind":1024,"name":"message","url":"classes/_imdb_.imdberror.html#message","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".ImdbError"},{"id":173,"kind":32,"name":"Promise","url":"modules/_imdb_.html#promise","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"imdb\""},{"id":174,"kind":32,"name":"omdbapi","url":"modules/_imdb_.html#omdbapi","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"imdb\""},{"id":175,"kind":4194304,"name":"RequestType","url":"modules/_imdb_.html#requesttype","classes":"tsd-kind-type-alias tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":176,"kind":64,"name":"reqtoqueryobj","url":"modules/_imdb_.html#reqtoqueryobj","classes":"tsd-kind-function tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"imdb\""},{"id":177,"kind":32,"name":"trans_table","url":"modules/_imdb_.html#trans_table","classes":"tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported","parent":"\"imdb\""},{"id":178,"kind":64,"name":"getReq","url":"modules/_imdb_.html#getreq","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":179,"kind":64,"name":"get","url":"modules/_imdb_.html#get","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":180,"kind":64,"name":"getById","url":"modules/_imdb_.html#getbyid","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":181,"kind":64,"name":"search","url":"modules/_imdb_.html#search","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"imdb\""}]}; | ||
typedoc.search.data = {"kinds":{"1":"External module","64":"Function","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","4194304":"Type alias"},"rows":[{"id":0,"kind":1,"name":"\"imdb\"","url":"modules/_imdb_.html","classes":"tsd-kind-external-module"},{"id":1,"kind":256,"name":"MovieOpts","url":"interfaces/_imdb_.movieopts.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":2,"kind":1024,"name":"apiKey","url":"interfaces/_imdb_.movieopts.html#apikey","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieOpts"},{"id":3,"kind":1024,"name":"timeout","url":"interfaces/_imdb_.movieopts.html#timeout","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieOpts"},{"id":4,"kind":256,"name":"MovieRequest","url":"interfaces/_imdb_.movierequest.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":5,"kind":1024,"name":"name","url":"interfaces/_imdb_.movierequest.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieRequest"},{"id":6,"kind":1024,"name":"id","url":"interfaces/_imdb_.movierequest.html#id","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieRequest"},{"id":7,"kind":1024,"name":"year","url":"interfaces/_imdb_.movierequest.html#year","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieRequest"},{"id":8,"kind":1024,"name":"short_plot","url":"interfaces/_imdb_.movierequest.html#short_plot","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".MovieRequest"},{"id":9,"kind":256,"name":"SearchRequest","url":"interfaces/_imdb_.searchrequest.html","classes":"tsd-kind-interface tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":10,"kind":1024,"name":"name","url":"interfaces/_imdb_.searchrequest.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".SearchRequest"},{"id":11,"kind":1024,"name":"reqtype","url":"interfaces/_imdb_.searchrequest.html#reqtype","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".SearchRequest"},{"id":12,"kind":1024,"name":"year","url":"interfaces/_imdb_.searchrequest.html#year","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"\"imdb\".SearchRequest"},{"id":13,"kind":128,"name":"Movie","url":"classes/_imdb_.movie.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":14,"kind":1024,"name":"imdbid","url":"classes/_imdb_.movie.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":15,"kind":1024,"name":"imdburl","url":"classes/_imdb_.movie.html#imdburl","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":16,"kind":1024,"name":"genres","url":"classes/_imdb_.movie.html#genres","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":17,"kind":1024,"name":"languages","url":"classes/_imdb_.movie.html#languages","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":18,"kind":1024,"name":"country","url":"classes/_imdb_.movie.html#country","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":19,"kind":1024,"name":"votes","url":"classes/_imdb_.movie.html#votes","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":20,"kind":1024,"name":"series","url":"classes/_imdb_.movie.html#series","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":21,"kind":1024,"name":"rating","url":"classes/_imdb_.movie.html#rating","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":22,"kind":1024,"name":"runtime","url":"classes/_imdb_.movie.html#runtime","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":23,"kind":1024,"name":"title","url":"classes/_imdb_.movie.html#title","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":24,"kind":1024,"name":"year","url":"classes/_imdb_.movie.html#year","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":25,"kind":1024,"name":"type","url":"classes/_imdb_.movie.html#type","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":26,"kind":1024,"name":"poster","url":"classes/_imdb_.movie.html#poster","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":27,"kind":1024,"name":"metascore","url":"classes/_imdb_.movie.html#metascore","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":28,"kind":1024,"name":"plot","url":"classes/_imdb_.movie.html#plot","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":29,"kind":1024,"name":"rated","url":"classes/_imdb_.movie.html#rated","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":30,"kind":1024,"name":"director","url":"classes/_imdb_.movie.html#director","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":31,"kind":1024,"name":"writer","url":"classes/_imdb_.movie.html#writer","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":32,"kind":1024,"name":"actors","url":"classes/_imdb_.movie.html#actors","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":33,"kind":1024,"name":"released","url":"classes/_imdb_.movie.html#released","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":34,"kind":1024,"name":"name","url":"classes/_imdb_.movie.html#name","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":35,"kind":512,"name":"constructor","url":"classes/_imdb_.movie.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".Movie"},{"id":36,"kind":128,"name":"Episode","url":"classes/_imdb_.episode.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":37,"kind":1024,"name":"season","url":"classes/_imdb_.episode.html#season","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":38,"kind":1024,"name":"episode","url":"classes/_imdb_.episode.html#episode","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".Episode"},{"id":39,"kind":512,"name":"constructor","url":"classes/_imdb_.episode.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite","parent":"\"imdb\".Episode"},{"id":40,"kind":1024,"name":"imdbid","url":"classes/_imdb_.episode.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":41,"kind":1024,"name":"imdburl","url":"classes/_imdb_.episode.html#imdburl","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":42,"kind":1024,"name":"genres","url":"classes/_imdb_.episode.html#genres","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":43,"kind":1024,"name":"languages","url":"classes/_imdb_.episode.html#languages","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":44,"kind":1024,"name":"country","url":"classes/_imdb_.episode.html#country","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":45,"kind":1024,"name":"votes","url":"classes/_imdb_.episode.html#votes","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":46,"kind":1024,"name":"series","url":"classes/_imdb_.episode.html#series","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":47,"kind":1024,"name":"rating","url":"classes/_imdb_.episode.html#rating","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":48,"kind":1024,"name":"runtime","url":"classes/_imdb_.episode.html#runtime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":49,"kind":1024,"name":"title","url":"classes/_imdb_.episode.html#title","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":50,"kind":1024,"name":"year","url":"classes/_imdb_.episode.html#year","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":51,"kind":1024,"name":"type","url":"classes/_imdb_.episode.html#type","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":52,"kind":1024,"name":"poster","url":"classes/_imdb_.episode.html#poster","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":53,"kind":1024,"name":"metascore","url":"classes/_imdb_.episode.html#metascore","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":54,"kind":1024,"name":"plot","url":"classes/_imdb_.episode.html#plot","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":55,"kind":1024,"name":"rated","url":"classes/_imdb_.episode.html#rated","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":56,"kind":1024,"name":"director","url":"classes/_imdb_.episode.html#director","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":57,"kind":1024,"name":"writer","url":"classes/_imdb_.episode.html#writer","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":58,"kind":1024,"name":"actors","url":"classes/_imdb_.episode.html#actors","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":59,"kind":1024,"name":"released","url":"classes/_imdb_.episode.html#released","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":60,"kind":1024,"name":"name","url":"classes/_imdb_.episode.html#name","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".Episode"},{"id":61,"kind":128,"name":"TVShow","url":"classes/_imdb_.tvshow.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":62,"kind":1024,"name":"start_year","url":"classes/_imdb_.tvshow.html#start_year","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".TVShow"},{"id":63,"kind":1024,"name":"end_year","url":"classes/_imdb_.tvshow.html#end_year","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".TVShow"},{"id":64,"kind":1024,"name":"totalseasons","url":"classes/_imdb_.tvshow.html#totalseasons","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".TVShow"},{"id":65,"kind":512,"name":"constructor","url":"classes/_imdb_.tvshow.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite","parent":"\"imdb\".TVShow"},{"id":66,"kind":2048,"name":"episodes","url":"classes/_imdb_.tvshow.html#episodes","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"imdb\".TVShow"},{"id":67,"kind":1024,"name":"imdbid","url":"classes/_imdb_.tvshow.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":68,"kind":1024,"name":"imdburl","url":"classes/_imdb_.tvshow.html#imdburl","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":69,"kind":1024,"name":"genres","url":"classes/_imdb_.tvshow.html#genres","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":70,"kind":1024,"name":"languages","url":"classes/_imdb_.tvshow.html#languages","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":71,"kind":1024,"name":"country","url":"classes/_imdb_.tvshow.html#country","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":72,"kind":1024,"name":"votes","url":"classes/_imdb_.tvshow.html#votes","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":73,"kind":1024,"name":"series","url":"classes/_imdb_.tvshow.html#series","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":74,"kind":1024,"name":"rating","url":"classes/_imdb_.tvshow.html#rating","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":75,"kind":1024,"name":"runtime","url":"classes/_imdb_.tvshow.html#runtime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":76,"kind":1024,"name":"title","url":"classes/_imdb_.tvshow.html#title","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":77,"kind":1024,"name":"year","url":"classes/_imdb_.tvshow.html#year","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":78,"kind":1024,"name":"type","url":"classes/_imdb_.tvshow.html#type","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":79,"kind":1024,"name":"poster","url":"classes/_imdb_.tvshow.html#poster","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":80,"kind":1024,"name":"metascore","url":"classes/_imdb_.tvshow.html#metascore","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":81,"kind":1024,"name":"plot","url":"classes/_imdb_.tvshow.html#plot","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":82,"kind":1024,"name":"rated","url":"classes/_imdb_.tvshow.html#rated","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":83,"kind":1024,"name":"director","url":"classes/_imdb_.tvshow.html#director","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":84,"kind":1024,"name":"writer","url":"classes/_imdb_.tvshow.html#writer","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":85,"kind":1024,"name":"actors","url":"classes/_imdb_.tvshow.html#actors","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":86,"kind":1024,"name":"released","url":"classes/_imdb_.tvshow.html#released","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":87,"kind":1024,"name":"name","url":"classes/_imdb_.tvshow.html#name","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"\"imdb\".TVShow"},{"id":88,"kind":128,"name":"SearchResult","url":"classes/_imdb_.searchresult.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":89,"kind":1024,"name":"title","url":"classes/_imdb_.searchresult.html#title","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":90,"kind":1024,"name":"name","url":"classes/_imdb_.searchresult.html#name","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":91,"kind":1024,"name":"year","url":"classes/_imdb_.searchresult.html#year","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":92,"kind":1024,"name":"imdbid","url":"classes/_imdb_.searchresult.html#imdbid","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":93,"kind":1024,"name":"type","url":"classes/_imdb_.searchresult.html#type","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":94,"kind":1024,"name":"poster","url":"classes/_imdb_.searchresult.html#poster","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":95,"kind":512,"name":"constructor","url":"classes/_imdb_.searchresult.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".SearchResult"},{"id":96,"kind":128,"name":"SearchResults","url":"classes/_imdb_.searchresults.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":97,"kind":1024,"name":"results","url":"classes/_imdb_.searchresults.html#results","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResults"},{"id":98,"kind":1024,"name":"totalresults","url":"classes/_imdb_.searchresults.html#totalresults","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".SearchResults"},{"id":99,"kind":512,"name":"constructor","url":"classes/_imdb_.searchresults.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".SearchResults"},{"id":100,"kind":2048,"name":"next","url":"classes/_imdb_.searchresults.html#next","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"imdb\".SearchResults"},{"id":101,"kind":128,"name":"ImdbError","url":"classes/_imdb_.imdberror.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":102,"kind":1024,"name":"name","url":"classes/_imdb_.imdberror.html#name","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".ImdbError"},{"id":103,"kind":512,"name":"constructor","url":"classes/_imdb_.imdberror.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".ImdbError"},{"id":104,"kind":1024,"name":"message","url":"classes/_imdb_.imdberror.html#message","classes":"tsd-kind-property tsd-parent-kind-class","parent":"\"imdb\".ImdbError"},{"id":105,"kind":128,"name":"Client","url":"classes/_imdb_.client.html","classes":"tsd-kind-class tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":106,"kind":512,"name":"constructor","url":"classes/_imdb_.client.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class","parent":"\"imdb\".Client"},{"id":107,"kind":2048,"name":"get","url":"classes/_imdb_.client.html#get","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"imdb\".Client"},{"id":108,"kind":2048,"name":"search","url":"classes/_imdb_.client.html#search","classes":"tsd-kind-method tsd-parent-kind-class","parent":"\"imdb\".Client"},{"id":109,"kind":4194304,"name":"RequestType","url":"modules/_imdb_.html#requesttype","classes":"tsd-kind-type-alias tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":110,"kind":64,"name":"get","url":"modules/_imdb_.html#get","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"imdb\""},{"id":111,"kind":64,"name":"search","url":"modules/_imdb_.html#search","classes":"tsd-kind-function tsd-parent-kind-external-module","parent":"\"imdb\""}]}; |
import { OmdbEpisode, OmdbMovie, OmdbSearch, OmdbSearchResult, OmdbTvshow } from "./interfaces"; | ||
export interface MovieOpts { | ||
apiKey: string; | ||
apiKey?: string; | ||
timeout?: number; | ||
@@ -10,19 +10,10 @@ } | ||
year?: number; | ||
opts: MovieOpts; | ||
short_plot?: boolean; | ||
} | ||
export declare type RequestType = "movie" | "series" | "episode" | "game"; | ||
export interface SearchRequest { | ||
title: string; | ||
name: string; | ||
reqtype?: RequestType; | ||
year?: number; | ||
} | ||
export declare class Episode { | ||
season: number; | ||
name: string; | ||
episode: number; | ||
released: Date; | ||
imdbid: string; | ||
rating: number; | ||
constructor(obj: OmdbEpisode, season: number); | ||
} | ||
export declare class Movie { | ||
@@ -49,16 +40,23 @@ imdbid: string; | ||
released: Date; | ||
name: string; | ||
protected _year_data: string; | ||
constructor(obj: OmdbMovie); | ||
} | ||
export declare class Episode extends Movie { | ||
season: number; | ||
episode: number; | ||
constructor(obj: OmdbEpisode, season: number); | ||
} | ||
export declare class TVShow extends Movie { | ||
start_year: any; | ||
end_year: any; | ||
totalseasons: any; | ||
start_year: number; | ||
end_year?: number; | ||
totalseasons: number; | ||
private _episodes; | ||
private opts; | ||
constructor(object: OmdbTvshow, opts: MovieOpts); | ||
episodes(cb?: (err: Error, data: Episode[]) => any): Promise<Episode[]>; | ||
constructor(obj: OmdbTvshow, opts: MovieOpts); | ||
episodes(): Promise<Episode[]>; | ||
} | ||
export declare class SearchResult { | ||
title: string; | ||
name: string; | ||
year: number; | ||
@@ -84,5 +82,10 @@ imdbid: string; | ||
} | ||
export declare function getReq(req: MovieRequest, cb?: (err: Error, data: Movie | Episode) => any): Promise<Movie>; | ||
export declare function get(name: string, opts: MovieOpts, cb?: (err: Error, data: Movie) => any): Promise<Movie>; | ||
export declare function getById(imdbid: string, opts: MovieOpts, cb?: (err: Error, data: Movie) => any): Promise<Movie>; | ||
export declare function get(req: MovieRequest, opts: MovieOpts): Promise<Movie>; | ||
export declare function search(req: SearchRequest, opts: MovieOpts, page?: number): Promise<SearchResults>; | ||
export declare class Client { | ||
private opts; | ||
constructor(opts: MovieOpts); | ||
get(req: MovieRequest, opts?: MovieOpts): Promise<Movie>; | ||
search(req: SearchRequest, page?: number, opts?: MovieOpts): Promise<SearchResults>; | ||
private merge_opts; | ||
} |
352
lib/imdb.js
@@ -12,8 +12,13 @@ "use strict"; | ||
})(); | ||
exports.__esModule = true; | ||
var util_1 = require("./util"); | ||
var __assign = (this && this.__assign) || Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var interfaces_1 = require("./interfaces"); | ||
var es6promise = require("es6-promise"); | ||
var rp = require("request-promise"); | ||
var Promise = es6promise.Promise; | ||
var rp = require("request-promise-native"); | ||
var omdbapi = "https://www.omdbapi.com/"; | ||
@@ -25,58 +30,43 @@ function reqtoqueryobj(req, apikey, page) { | ||
r: "json", | ||
s: req.title, | ||
s: req.name, | ||
type: req.reqtype, | ||
y: req.year | ||
y: req.year, | ||
}; | ||
} | ||
var trans_table = new util_1.Inverter({ | ||
genres: "Genre", | ||
languages: "Language", | ||
rating: "imdbRating", | ||
votes: "imdbVotes" | ||
}); | ||
var Episode = (function () { | ||
function Episode(obj, season) { | ||
this.season = season; | ||
for (var attr in obj) { | ||
if (attr === "Released") { | ||
var _a = obj[attr].split("-"), year = _a[0], month = _a[1], day = _a[2]; | ||
this.released = new Date(parseInt(year, 10), parseInt(month, 10) - 1, parseInt(day, 10)); | ||
} | ||
else if (attr === "Rating") { | ||
this[attr.toLowerCase()] = parseFloat(obj[attr]); | ||
} | ||
else if (attr === "Episode" || attr === "Season") { | ||
this[attr.toLowerCase()] = parseInt(obj[attr], 10); | ||
} | ||
else if (attr === "Title") { | ||
this.name = obj[attr]; | ||
} | ||
else if (trans_table.get(attr) !== undefined) { | ||
this[trans_table.get(attr)] = obj[attr]; | ||
} | ||
else { | ||
this[attr.toLowerCase()] = obj[attr]; | ||
} | ||
} | ||
} | ||
return Episode; | ||
}()); | ||
exports.Episode = Episode; | ||
var trans_table = { | ||
Genre: "genres", | ||
Language: "languages", | ||
imdbRating: "rating", | ||
imdbVotes: "votes", | ||
}; | ||
var Movie = (function () { | ||
function Movie(obj) { | ||
for (var attr in obj) { | ||
if (attr === "year" || attr.toLowerCase() === "year") { | ||
for (var _i = 0, _a = Object.getOwnPropertyNames(obj); _i < _a.length; _i++) { | ||
var attr = _a[_i]; | ||
if (attr === "Year") { | ||
this._year_data = obj[attr]; | ||
if (!obj[attr].match(/\d{4}[\-–]\d{4}/)) { | ||
this[attr.toLowerCase()] = parseInt(obj[attr], 10); | ||
if (!obj[attr].match(/\d{4}[\-–](?:\d{4})?/)) { | ||
var val = parseInt(obj[attr], 10); | ||
if (isNaN(val)) { | ||
throw new TypeError("invalid year"); | ||
} | ||
this[attr.toLowerCase()] = val; | ||
} | ||
} | ||
else if (attr === "Released") { | ||
this.released = new Date(obj[attr]); | ||
var val = new Date(obj[attr]); | ||
if (isNaN(val.getTime())) { | ||
throw new TypeError("invalid release date"); | ||
} | ||
this.released = val; | ||
} | ||
else if (attr === "Rating") { | ||
this[attr.toLowerCase()] = parseFloat(obj[attr]); | ||
else if (attr === "imdbRating") { | ||
var val = parseFloat(obj[attr]); | ||
if (isNaN(val)) { | ||
throw new TypeError("invalid rating"); | ||
} | ||
this[trans_table[attr]] = parseFloat(obj[attr]); | ||
} | ||
else if (trans_table.get(attr) !== undefined) { | ||
this[trans_table.get(attr)] = obj[attr]; | ||
else if (trans_table[attr] !== undefined) { | ||
this[trans_table[attr]] = obj[attr]; | ||
} | ||
@@ -87,2 +77,3 @@ else { | ||
} | ||
this.name = this.title; | ||
this.series = this.type === "movie" ? false : true; | ||
@@ -94,17 +85,33 @@ this.imdburl = "https://www.imdb.com/title/" + this.imdbid; | ||
exports.Movie = Movie; | ||
var Episode = (function (_super) { | ||
__extends(Episode, _super); | ||
function Episode(obj, season) { | ||
var _this = _super.call(this, obj) || this; | ||
_this.season = season; | ||
if (obj.hasOwnProperty("Episode")) { | ||
_this.episode = parseInt(obj.Episode, 10); | ||
if (isNaN(_this.episode)) { | ||
throw new TypeError("invalid episode"); | ||
} | ||
} | ||
return _this; | ||
} | ||
return Episode; | ||
}(Movie)); | ||
exports.Episode = Episode; | ||
var TVShow = (function (_super) { | ||
__extends(TVShow, _super); | ||
function TVShow(object, opts) { | ||
var _this = _super.call(this, object) || this; | ||
function TVShow(obj, opts) { | ||
var _this = _super.call(this, obj) || this; | ||
_this._episodes = []; | ||
var years = _this._year_data.split("-"); | ||
_this.start_year = parseInt(years[0], 10) ? parseInt(years[0], 10) : null; | ||
_this.start_year = parseInt(years[0], 10); | ||
_this.end_year = parseInt(years[1], 10) ? parseInt(years[1], 10) : null; | ||
_this.totalseasons = parseInt(_this.totalseasons, 10); | ||
_this.totalseasons = parseInt(obj.totalSeasons, 10); | ||
_this.opts = opts; | ||
return _this; | ||
} | ||
TVShow.prototype.episodes = function (cb) { | ||
TVShow.prototype.episodes = function () { | ||
if (this._episodes.length !== 0) { | ||
return cb(undefined, this._episodes); | ||
return Promise.resolve(this._episodes); | ||
} | ||
@@ -120,6 +127,7 @@ var tvShow = this; | ||
i: tvShow.imdbid, | ||
r: "json" | ||
r: "json", | ||
}, | ||
timeout: undefined, | ||
url: omdbapi | ||
url: omdbapi, | ||
withCredentials: false, | ||
}; | ||
@@ -134,36 +142,17 @@ if ("timeout" in this.opts) { | ||
var eps = []; | ||
for (var key in ep_data) { | ||
if (ep_data.hasOwnProperty(key)) { | ||
var datum = ep_data[key]; | ||
if (interfaces_1.isError(datum)) { | ||
var err = new ImdbError(datum.Error); | ||
if (cb) { | ||
return cb(err, undefined); | ||
} | ||
return Promise.reject(err); | ||
} | ||
else { | ||
var season = parseInt(datum.Season, 10); | ||
for (var ep in datum.Episodes) { | ||
if (datum.Episodes.hasOwnProperty(ep)) { | ||
eps.push(new Episode(datum.Episodes[ep], season)); | ||
} | ||
} | ||
} | ||
for (var _i = 0, ep_data_1 = ep_data; _i < ep_data_1.length; _i++) { | ||
var datum = ep_data_1[_i]; | ||
if (interfaces_1.isError(datum)) { | ||
throw new ImdbError(datum.Error); | ||
} | ||
var season = parseInt(datum.Season, 10); | ||
for (var _a = 0, _b = Object.getOwnPropertyNames(datum.Episodes); _a < _b.length; _a++) { | ||
var ep = _b[_a]; | ||
eps.push(new Episode(datum.Episodes[ep], season)); | ||
} | ||
} | ||
tvShow._episodes = eps; | ||
if (cb) { | ||
return cb(undefined, eps); | ||
} | ||
return Promise.resolve(eps); | ||
}); | ||
if (cb) { | ||
prom["catch"](function (err) { | ||
return cb(err, undefined); | ||
}); | ||
} | ||
else { | ||
return prom; | ||
} | ||
return prom; | ||
}; | ||
@@ -175,12 +164,12 @@ return TVShow; | ||
function SearchResult(obj) { | ||
for (var attr in obj) { | ||
if (obj.hasOwnProperty(attr)) { | ||
if (attr === "Year") { | ||
this.year = parseInt(obj[attr], 10); | ||
} | ||
else { | ||
this[attr.toLowerCase()] = obj[attr]; | ||
} | ||
for (var _i = 0, _a = Object.getOwnPropertyNames(obj); _i < _a.length; _i++) { | ||
var attr = _a[_i]; | ||
if (attr === "Year") { | ||
this[attr.toLowerCase()] = parseInt(obj[attr], 10); | ||
} | ||
else { | ||
this[attr.toLowerCase()] = obj[attr]; | ||
} | ||
} | ||
this.name = this.title; | ||
} | ||
@@ -196,9 +185,13 @@ return SearchResult; | ||
this.opts = opts; | ||
for (var attr in obj) { | ||
for (var _i = 0, _a = Object.getOwnPropertyNames(obj); _i < _a.length; _i++) { | ||
var attr = _a[_i]; | ||
if (attr === "Search") { | ||
for (var _i = 0, _a = obj.Search; _i < _a.length; _i++) { | ||
var result = _a[_i]; | ||
for (var _b = 0, _c = obj.Search; _b < _c.length; _b++) { | ||
var result = _c[_b]; | ||
this.results.push(new SearchResult(result)); | ||
} | ||
} | ||
else if (attr === "totalResults") { | ||
this[attr.toLowerCase()] = parseInt(obj[attr], 10); | ||
} | ||
else { | ||
@@ -223,47 +216,56 @@ this[attr.toLowerCase()] = obj[attr]; | ||
exports.ImdbError = ImdbError; | ||
function getReq(req, cb) { | ||
if (req.opts === undefined || !req.opts.hasOwnProperty("apiKey")) { | ||
var err = new ImdbError("Missing api key in opts"); | ||
if (cb) { | ||
return cb(err, undefined); | ||
} | ||
else { | ||
return Promise.reject(err); | ||
} | ||
function get(req, opts) { | ||
try { | ||
return new Client(opts).get(req); | ||
} | ||
var qs = { | ||
apikey: req.opts.apiKey, | ||
i: undefined, | ||
plot: "full", | ||
r: "json", | ||
t: undefined, | ||
y: req.year | ||
}; | ||
if (req.name) { | ||
qs.t = req.name; | ||
catch (e) { | ||
return Promise.reject(e); | ||
} | ||
else if (req.id) { | ||
qs.i = req.id; | ||
} | ||
exports.get = get; | ||
function search(req, opts, page) { | ||
return new Client(opts).search(req, page); | ||
} | ||
exports.search = search; | ||
var Client = (function () { | ||
function Client(opts) { | ||
if (!opts.hasOwnProperty("apiKey")) { | ||
throw new ImdbError("Missing api key in opts"); | ||
} | ||
this.opts = opts; | ||
} | ||
var reqopts = { | ||
json: true, | ||
qs: qs, | ||
timeout: undefined, | ||
url: omdbapi | ||
}; | ||
if ("timeout" in req.opts) { | ||
reqopts.timeout = req.opts.timeout; | ||
} | ||
var prom = rp(reqopts).then(function (data) { | ||
var ret; | ||
if (interfaces_1.isError(data)) { | ||
var err = new ImdbError(data.Error + ": " + (req.name ? req.name : req.id)); | ||
if (cb) { | ||
return cb(err, undefined); | ||
} | ||
else { | ||
return Promise.reject(err); | ||
} | ||
Client.prototype.get = function (req, opts) { | ||
opts = this.merge_opts(opts); | ||
var qs = { | ||
apikey: opts.apiKey, | ||
i: undefined, | ||
plot: req.short_plot ? "short" : "full", | ||
r: "json", | ||
t: undefined, | ||
y: req.year, | ||
}; | ||
if (req.name) { | ||
qs.t = req.name; | ||
} | ||
else if (req.id) { | ||
qs.i = req.id; | ||
} | ||
else { | ||
return Promise.reject(new ImdbError("Missing one of req.id or req.name")); | ||
} | ||
var reqopts = { | ||
json: true, | ||
qs: qs, | ||
timeout: undefined, | ||
url: omdbapi, | ||
withCredentials: false, | ||
}; | ||
if ("timeout" in opts) { | ||
reqopts.timeout = opts.timeout; | ||
} | ||
var prom = rp(reqopts).then(function (data) { | ||
var ret; | ||
if (interfaces_1.isError(data)) { | ||
throw new ImdbError(data.Error + ": " + (req.name ? req.name : req.id)); | ||
} | ||
if (interfaces_1.isMovie(data)) { | ||
@@ -273,3 +275,3 @@ ret = new Movie(data); | ||
else if (interfaces_1.isTvshow(data)) { | ||
ret = new TVShow(data, req.opts); | ||
ret = new TVShow(data, opts); | ||
} | ||
@@ -280,55 +282,35 @@ else if (interfaces_1.isEpisode(data)) { | ||
else { | ||
var err = new ImdbError("type: " + data.Type + " not valid"); | ||
if (cb) { | ||
return cb(err, undefined); | ||
} | ||
else { | ||
return Promise.reject(err); | ||
} | ||
throw new ImdbError("type: '" + data.Type + "' is not valid"); | ||
} | ||
if (cb) { | ||
return cb(undefined, ret); | ||
} | ||
return Promise.resolve(ret); | ||
} | ||
}); | ||
if (cb) { | ||
prom["catch"](function (err) { | ||
cb(err, undefined); | ||
}); | ||
} | ||
else { | ||
return prom; | ||
} | ||
} | ||
exports.getReq = getReq; | ||
function get(name, opts, cb) { | ||
return getReq({ id: undefined, opts: opts, name: name }, cb); | ||
} | ||
exports.get = get; | ||
function getById(imdbid, opts, cb) { | ||
return getReq({ id: imdbid, opts: opts, name: undefined }, cb); | ||
} | ||
exports.getById = getById; | ||
function search(req, opts, page) { | ||
if (page === undefined) { | ||
page = 1; | ||
} | ||
var qs = reqtoqueryobj(req, opts.apiKey, page); | ||
var reqopts = { qs: qs, url: omdbapi, json: true, timeout: undefined }; | ||
if ("timeout" in opts) { | ||
reqopts.timeout = opts.timeout; | ||
} | ||
var prom = rp(reqopts).then(function (data) { | ||
if (interfaces_1.isError(data)) { | ||
var err = new ImdbError(data.Error + ": " + req.title); | ||
return Promise.reject(err); | ||
}; | ||
Client.prototype.search = function (req, page, opts) { | ||
opts = this.merge_opts(opts); | ||
if (page === undefined) { | ||
page = 1; | ||
} | ||
else { | ||
var qs = reqtoqueryobj(req, opts.apiKey, page); | ||
var reqopts = { qs: qs, url: omdbapi, json: true, timeout: undefined, withCredentials: false }; | ||
if ("timeout" in opts) { | ||
reqopts.timeout = opts.timeout; | ||
} | ||
var prom = rp(reqopts).then(function (data) { | ||
if (interfaces_1.isError(data)) { | ||
throw new ImdbError(data.Error + ": " + req.name); | ||
} | ||
return Promise.resolve(new SearchResults(data, page, opts, req)); | ||
}); | ||
return prom; | ||
}; | ||
Client.prototype.merge_opts = function (opts) { | ||
if (opts !== undefined) { | ||
return Object.assign(__assign({}, this.opts), opts); | ||
} | ||
}); | ||
return prom; | ||
} | ||
exports.search = search; | ||
return __assign({}, this.opts); | ||
}; | ||
return Client; | ||
}()); | ||
exports.Client = Client; | ||
//# sourceMappingURL=imdb.js.map |
@@ -53,2 +53,17 @@ export interface OmdbMovie { | ||
imdbID: string; | ||
imdbVotes: string; | ||
Year: string; | ||
Rated: string; | ||
Runtime: string; | ||
Genre: string; | ||
Director: string; | ||
Writer: string; | ||
Actors: string; | ||
Plot: string; | ||
Language: string; | ||
Country: string; | ||
Awards: string; | ||
Poster: string; | ||
Metascore: string; | ||
Response: string; | ||
} | ||
@@ -55,0 +70,0 @@ export interface OmdbSeason { |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
function isError(response) { | ||
@@ -4,0 +4,0 @@ return response.Response === "False"; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var Inverter = (function () { | ||
@@ -4,0 +4,0 @@ function Inverter(obj) { |
@@ -5,3 +5,3 @@ { | ||
"description": "Queries unofficial imdb APIs to get movie and television information from imdb", | ||
"version": "3.1.2", | ||
"version": "4.0.0", | ||
"main": "./lib/imdb.js", | ||
@@ -17,6 +17,7 @@ "types": "./lib/imdb.d.ts", | ||
"build": "tsc -p .", | ||
"prepublish": "npm run build", | ||
"prepublishOnly": "npm run build", | ||
"lint": "tslint --project tsconfig.json", | ||
"test": "nodeunit test", | ||
"test": "nyc --require ts-node/register --reporter=lcov node_modules/mocha/bin/mocha test/*.ts", | ||
"check": "npm run lint && npm run test", | ||
"ci": "npm run check && cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js", | ||
"docs": "typedoc --out ./doc --ignoreCompilerErrors src/imdb.ts", | ||
@@ -26,11 +27,18 @@ "clean": "rm -rf node_modules lib" | ||
"devDependencies": { | ||
"nock": "^9.0.13", | ||
"nodeunit": "^0.11.1", | ||
"tslint": "^5.4.3", | ||
"typedoc": "^0.7.1", | ||
"typescript": "^2.3.4" | ||
"@types/chai": "^4.1.3", | ||
"@types/mocha": "^5.2.0", | ||
"chai": "^4.1.2", | ||
"coveralls": "^3.0.1", | ||
"js-beautify": "^1.7.5", | ||
"mocha": "^5.1.1", | ||
"nock": "^9.2.6", | ||
"nyc": "^11.8.0", | ||
"ts-node": "^6.0.3", | ||
"tslint": "^5.10.0", | ||
"typedoc": "^0.11.1", | ||
"typescript": "^2.9.1" | ||
}, | ||
"optionalDependencies": {}, | ||
"engines": { | ||
"node": ">=4.0" | ||
"node": ">=6.0" | ||
}, | ||
@@ -45,6 +53,7 @@ "keywords": [ | ||
"dependencies": { | ||
"es6-promise": "^4.1.0", | ||
"request": "^2.74.0", | ||
"request-promise": "^4.1.1" | ||
"@types/request": "^2.47.0", | ||
"@types/request-promise-native": "^1.0.14", | ||
"request": "^2.86.0", | ||
"request-promise-native": "^1.0.5" | ||
} | ||
} |
142
README.md
@@ -7,4 +7,6 @@ # node-imdb-api | ||
[![NPM version](https://badge.fury.io/js/imdb-api.svg)](http://badge.fury.io/js/imdb-api) [![Build Status](https://travis-ci.org/worr/node-imdb-api.svg?branch=master)](https://travis-ci.org/worr/node-imdb-api) [![Flattr Button](http://api.flattr.com/button/button-compact-static-100x17.png "Flattr This!")](https://flattr.com/submit/auto?user_id=worr&url=https%3A%2F%2Fgithub.com%2Fworr%2Fnode-imdb-api%2F "node-imdb-api") | ||
[![NPM version](https://badge.fury.io/js/imdb-api.svg)](http://badge.fury.io/js/imdb-api) [![Build Status](https://travis-ci.org/worr/node-imdb-api.svg?branch=master)](https://travis-ci.org/worr/node-imdb-api) [![Dependency Freshness](https://david-dm.org/worr/node-imdb-api.svg)](https://david-dm.org/worr/node-imdb-api) [![Coverage Status](https://coveralls.io/repos/github/worr/node-imdb-api/badge.svg?branch=master)](https://coveralls.io/github/worr/node-imdb-api?branch=master) [![Join the chat at https://gitter.im/worr/node-imdb-api](https://badges.gitter.im/worr/node-imdb-api.svg)](https://gitter.im/worr/node-imdb-api?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
**NOTE ON GITTER**: I *am* online! I use the [matrix](matrix.org) bridge to talk on Gitter, so you'll see me talking through `MatrixBot`. Feel free to ask questions! | ||
# API Docs | ||
@@ -19,85 +21,33 @@ | ||
# Upgrading from 1.x or 2.x? | ||
Many things have changed. Read the [changelog](CHANGELOG.md) | ||
# Use | ||
Get an imdb object: | ||
Import the library | ||
```js | ||
const imdb = require('imdb-api'); | ||
import imdb = require('imdb'); | ||
``` | ||
Call get/getReq/getById | ||
Call `get` to get a single movie | ||
```js | ||
imdb.get('The Toxic Avenger', {apiKey: 'foo', timeout: 30000}).then(console.log).catch(console.log); | ||
imdb.getById('tt0090190', {apiKey: 'foo', timeout: 30000}).then(console.log).catch(console.log); | ||
imdb.getReq({ name: 'The Toxic Avenger', opts: {apiKey: 'foo', timeout: 30000} }).then(console.log).catch(console.log); | ||
``` | ||
DATA | ||
```js | ||
console.log(movie); | ||
imdb.get({name: 'The Toxic Avenger'}, {apiKey: 'foo', timeout: 30000}).then(console.log).catch(console.log); | ||
Movie { | ||
title: 'The Toxic Avenger', | ||
_year_data: '1984', | ||
rated: 'R', | ||
released: '1986-04-11T08:00:00.000Z', | ||
runtime: '82 min', | ||
genres: 'Action, Comedy, Horror', | ||
director: 'Michael Herz, Lloyd Kaufman', | ||
writer: 'Lloyd Kaufman (story), Joe Ritter (screenplay), Lloyd Kaufman (additional material), Gay Partington Terry (additional material), Stuart Strutin (additional material)', | ||
actors: 'Andree Maranda, Mitch Cohen, Jennifer Babtist, Cindy Manion', | ||
plot: 'This is the story of Melvin, the Tromaville Health Club mop boy, who inadvertently and naively trusts the hedonistic, contemptuous and vain health club members, to the point of accidentally ending up in a vat of toxic waste. The devastating results then have a transmogrification effect, his alter ego is released, and the Toxic Avenger is born, to deadly and comical results. The local mop boy is now the local Superhero, the saviour of corruption, thuggish bullies and indifference. Troma classic with good make-up effects and stunts, a pleasant surprise indeed.', | ||
languages: 'English', | ||
country: 'USA', | ||
awards: '1 nomination.', | ||
poster: 'http://ia.media-imdb.com/images/M/MV5BNzViNmQ5MTYtMmI4Yy00N2Y2LTg4NWUtYWU3MThkMTVjNjk3XkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg', | ||
metascore: 'N/A', | ||
rating: '6.2', | ||
votes: '19,306', | ||
imdbid: 'tt0090190', | ||
type: 'movie', | ||
response: 'True', | ||
series: false, | ||
imdburl: 'https://www.imdb.com/title/tt0090190' | ||
... | ||
} | ||
``` | ||
Furthermore if you already know the id you can call getReq with different args: | ||
Furthermore if you already know the id you can call `get` with different args: | ||
```js | ||
imdb.getReq({ id: 'tt0090190', opts: {apiKey: 'foo'} }).then(console.log) | ||
``` | ||
DATA | ||
```js | ||
console.log(movie); | ||
imdb.get({id: 'tt0090190'}, {apiKey: 'foo'}).then(console.log); | ||
Movie { | ||
title: 'The Toxic Avenger', | ||
_year_data: '1984', | ||
rated: 'R', | ||
released: '1986-04-11T08:00:00.000Z', | ||
runtime: '82 min', | ||
genres: 'Action, Comedy, Horror', | ||
director: 'Michael Herz, Lloyd Kaufman', | ||
writer: 'Lloyd Kaufman (story), Joe Ritter (screenplay), Lloyd Kaufman (additional material), Gay Partington Terry (additional material), Stuart Strutin (additional material)', | ||
actors: 'Andree Maranda, Mitch Cohen, Jennifer Babtist, Cindy Manion', | ||
plot: 'This is the story of Melvin, the Tromaville Health Club mop boy, who inadvertently and naively trusts the hedonistic, contemptuous and vain health club members, to the point of accidentally ending up in a vat of toxic waste. The devastating results then have a transmogrification effect, his alter ego is released, and the Toxic Avenger is born, to deadly and comical results. The local mop boy is now the local Superhero, the saviour of corruption, thuggish bullies and indifference. Troma classic with good make-up effects and stunts, a pleasant surprise indeed.', | ||
languages: 'English', | ||
country: 'USA', | ||
awards: '1 nomination.', | ||
poster: 'http://ia.media-imdb.com/images/M/MV5BNzViNmQ5MTYtMmI4Yy00N2Y2LTg4NWUtYWU3MThkMTVjNjk3XkEyXkFqcGdeQXVyMTQxNzMzNDI@._V1_SX300.jpg', | ||
metascore: 'N/A', | ||
rating: '6.2', | ||
votes: '19,306', | ||
imdbid: 'tt0090190', | ||
type: 'movie', | ||
response: 'True', | ||
series: false, | ||
imdburl: 'https://www.imdb.com/title/tt0090190' } | ||
... | ||
} | ||
``` | ||
How do I search for things? | ||
You can search for movies, and get multiple results by using the `search` function. | ||
```js | ||
imdb.search({ | ||
title: 'Toxic Avenger' | ||
name: 'Toxic Avenger' | ||
}, { | ||
@@ -108,11 +58,12 @@ apiKey: 'foo' | ||
How do I get series episodes? | ||
TV shows have an `episodes` method that you can use to fetch all of the episodes | ||
from that TV series. | ||
Well, it's a promise: | ||
```js | ||
imdb.get('How I Met Your Mother', {apiKey: 'foo'}).then(things => { | ||
things.episodes().then(console.log); | ||
imdb.get('How I Met Your Mother', {apiKey: 'foo'}).then((things) => { | ||
return things.episodes() | ||
}).then((eps) => { | ||
console.log(eps); | ||
}); | ||
... | ||
Episode { | ||
@@ -125,32 +76,27 @@ season: 2, | ||
imdbid: 'tt0869673' }, | ||
Episode { | ||
season: 2, | ||
name: 'Brunch', | ||
released: '2006-11-01T08:00:00.000Z', | ||
episode: 3, | ||
rating: '8.6', | ||
imdbid: 'tt0873024' }, | ||
Episode { | ||
season: 2, | ||
name: 'Ted Mosby, Architect', | ||
released: '2006-11-09T08:00:00.000Z', | ||
episode: 4, | ||
rating: '8.9', | ||
imdbid: 'tt0858000' }, | ||
Episode { | ||
season: 2, | ||
name: 'World\'s Greatest Couple', | ||
released: '2006-11-16T08:00:00.000Z', | ||
episode: 5, | ||
rating: '8.8', | ||
imdbid: 'tt0866188' }, | ||
Episode { | ||
season: 2, | ||
name: 'Aldrin Justice', | ||
released: '2006-11-23T08:00:00.000Z', | ||
episode: 6, | ||
rating: '8.2', | ||
imdbid: 'tt0865115' }, | ||
... | ||
``` | ||
# Using a `Client` object | ||
`imdb-api` also exported a `Client` object that you can use to store options for subsequent requests. | ||
```js | ||
import imdb = require('imdb'); | ||
const cli = new imdb.Client({apiKey: 'xxxxxx'}); | ||
cli.get({'name': 'The Toxic Avenger'}).then(console.log); | ||
``` | ||
`Client` also has a `search` method for searching. | ||
```js | ||
import imdb = require('imdb'); | ||
const cli = new imdb.Client({apiKey: 'xxxxxx'}); | ||
cli.search({'name': 'The Toxic Avenger'}).then((search) => { | ||
for (const result of search.results) { | ||
console.log(result.title); | ||
} | ||
}); | ||
``` | ||
# FAQ | ||
@@ -157,0 +103,0 @@ |
609
src/imdb.ts
"use strict"; | ||
import { | ||
Inverter, | ||
} from "./util"; | ||
import { | ||
isEpisode, | ||
@@ -21,11 +17,12 @@ isError, | ||
import es6promise = require("es6-promise"); | ||
import rp = require("request-promise"); | ||
import rp = require("request-promise-native"); | ||
const Promise = es6promise.Promise; | ||
/** | ||
* @hidden | ||
*/ | ||
const omdbapi = "https://www.omdbapi.com/"; | ||
/** | ||
* Options to manipulate movie fetching | ||
* Options to manipulate movie fetching. These can be passed to {@link get}, {@link search} | ||
* or the constructor for {@link Client}. | ||
*/ | ||
@@ -38,6 +35,6 @@ export interface MovieOpts { | ||
*/ | ||
apiKey: string; | ||
apiKey?: string; | ||
/** | ||
* timeout in milliseconds to wait before giving up on a request | ||
* Timeout in milliseconds to wait before giving up on a request | ||
*/ | ||
@@ -48,9 +45,35 @@ timeout?: number; | ||
/** | ||
* Movie we're requesting | ||
* An explicit request for a movie. Does not do searching, this is meant | ||
* to specify *one* movie. | ||
* | ||
* One of {@link name} or {@link id} *MUST* be requested. {@link year} can be used to ensure | ||
* that the movie you're looking for is selected in the case that there exists | ||
* more than one movie with the same name. | ||
* | ||
* {@link short_plot} can be used to specify whether or not a short or a long plot | ||
* description is returned with your movie. Default is to return a full plot. | ||
*/ | ||
export interface MovieRequest { | ||
/** | ||
* Name of the movie | ||
* | ||
* Unfortunately, only English names are supported | ||
* by omdb at the moment. | ||
*/ | ||
name?: string; | ||
/** | ||
* imdb id of the movie | ||
*/ | ||
id?: string; | ||
/** | ||
* Year that the movie was released | ||
*/ | ||
year?: number; | ||
opts: MovieOpts; | ||
/** | ||
* Whether or not to request a short plot. Default is full plot. | ||
*/ | ||
short_plot?: boolean; | ||
} | ||
@@ -67,10 +90,26 @@ | ||
/** | ||
* Search we're making | ||
* A search for a movie. This will fetch multiple results based on fuzzy matches | ||
* for a particular piece of media. | ||
*/ | ||
export interface SearchRequest { | ||
title: string; | ||
/** | ||
* Title of the media that we're looking for. Unfortunately, only English | ||
* names are supported by omdb at the moment. | ||
*/ | ||
name: string; | ||
/** | ||
* Type of media we're looking for | ||
*/ | ||
reqtype?: RequestType; | ||
/** | ||
* Year that the media was released | ||
*/ | ||
year?: number; | ||
} | ||
/** | ||
* @hidden | ||
*/ | ||
function reqtoqueryobj(req: SearchRequest, apikey: string, page: number): object { | ||
@@ -81,3 +120,3 @@ return { | ||
r: "json", | ||
s: req.title, | ||
s: req.name, | ||
type: req.reqtype, | ||
@@ -88,76 +127,103 @@ y: req.year, | ||
const trans_table = new Inverter({ | ||
genres: "Genre", | ||
languages: "Language", | ||
rating: "imdbRating", | ||
votes: "imdbVotes", | ||
}); | ||
/** | ||
* @hidden | ||
*/ | ||
const trans_table = { | ||
Genre: "genres", | ||
Language: "languages", | ||
imdbRating: "rating", | ||
imdbVotes: "votes", | ||
}; | ||
export class Episode { | ||
public season: number; | ||
public name: string; | ||
public episode: number; | ||
public released: Date; | ||
public imdbid: string; | ||
public rating: number; | ||
constructor(obj: OmdbEpisode, season: number) { | ||
this.season = season; | ||
for (const attr in obj) { | ||
if (attr === "Released") { | ||
const [year, month, day] = obj[attr].split("-"); | ||
this.released = new Date(parseInt(year, 10), parseInt(month, 10) - 1, parseInt(day, 10)); | ||
} else if (attr === "Rating") { | ||
this[attr.toLowerCase()] = parseFloat(obj[attr]); | ||
} else if (attr === "Episode" || attr === "Season") { | ||
this[attr.toLowerCase()] = parseInt(obj[attr], 10); | ||
} else if (attr === "Title") { | ||
this.name = obj[attr]; | ||
} else if (trans_table.get(attr) !== undefined) { | ||
this[trans_table.get(attr)] = obj[attr]; | ||
} else { | ||
this[attr.toLowerCase()] = obj[attr]; | ||
} | ||
} | ||
} | ||
} | ||
/** | ||
* A movie as returned by {@link get}, {@link search}, or any of the methods | ||
* from {@link Client}. This is not meant to be created directly by consumers of | ||
* this lib, but instead through querying omdb. | ||
*/ | ||
export class Movie { | ||
/** id of the movie on imdb */ | ||
public imdbid: string; | ||
/** direct URL to the movie on imdb */ | ||
public imdburl: string; | ||
/** the genres that this movie belongs to */ | ||
public genres: string; | ||
/** languages this movie was released in */ | ||
public languages: string; | ||
/** countries this movie was released in */ | ||
public country: string; | ||
/** votes received on imdb */ | ||
public votes: string; | ||
/** whether or not this is a TV series */ | ||
public series: boolean; | ||
/** the rating as it appears on imdb */ | ||
public rating: number; | ||
/** the runtime of the movie */ | ||
public runtime: string; | ||
/** the title of the movie in English */ | ||
public title: string; | ||
/** year the movie was released */ | ||
public year: number; | ||
/** type of media (see {@link RequestType}) */ | ||
public type: string; | ||
/** link to the poster for this movie */ | ||
public poster: string; | ||
/** score from a bunch of different review sites */ | ||
public metascore: string; | ||
/** the plot (can either be long or short as specified in {@link MovieRequest}) */ | ||
public plot: string; | ||
/** what the movie was rated in its country of release */ | ||
public rated: string; | ||
/** the directors of the movie */ | ||
public director: string; | ||
/** writers of the movie */ | ||
public writer: string; | ||
/** leading actors that starred in the movie */ | ||
public actors: string; | ||
/** date that the movie was originally released */ | ||
public released: Date; | ||
/** title of the movie */ | ||
public name: string; | ||
/** | ||
* @hidden | ||
*/ | ||
protected _year_data: string; | ||
/** | ||
* This takes a result from omdb, and transforms it into an | ||
* object consumable by customers of imdb-api. | ||
* | ||
* This isn't meant for direct consumption by API consumers, | ||
* and consumers should look at {@link get}, {@link search} or | ||
* any of the methods on {@link Client} to get a movie instead. | ||
* | ||
* @param obj Results from omdb | ||
*/ | ||
constructor(obj: OmdbMovie) { | ||
for (const attr in obj) { | ||
if (attr === "year" || attr.toLowerCase() === "year") { | ||
for (const attr of Object.getOwnPropertyNames(obj)) { | ||
if (attr === "Year") { | ||
this._year_data = obj[attr]; | ||
if (!obj[attr].match(/\d{4}[\-–]\d{4}/)) { | ||
this[attr.toLowerCase()] = parseInt(obj[attr], 10); | ||
// check for emdash as well | ||
if (!obj[attr].match(/\d{4}[\-–](?:\d{4})?/)) { | ||
const val = parseInt(obj[attr], 10); | ||
if (isNaN(val)) { | ||
throw new TypeError("invalid year"); | ||
} | ||
this[attr.toLowerCase()] = val; | ||
} | ||
} else if (attr === "Released") { | ||
this.released = new Date(obj[attr]); | ||
} else if (attr === "Rating") { | ||
this[attr.toLowerCase()] = parseFloat(obj[attr]); | ||
} else if (trans_table.get(attr) !== undefined) { | ||
this[trans_table.get(attr)] = obj[attr]; | ||
const val = new Date(obj[attr]); | ||
if (isNaN(val.getTime())) { | ||
throw new TypeError("invalid release date"); | ||
} | ||
this.released = val; | ||
} else if (attr === "imdbRating") { | ||
const val = parseFloat(obj[attr]); | ||
if (isNaN(val)) { | ||
throw new TypeError("invalid rating"); | ||
} | ||
this[trans_table[attr]] = parseFloat(obj[attr]); | ||
} else if (trans_table[attr] !== undefined) { | ||
this[trans_table[attr]] = obj[attr]; | ||
} else { | ||
@@ -168,2 +234,3 @@ this[attr.toLowerCase()] = obj[attr]; | ||
this.name = this.title; | ||
this.series = this.type === "movie" ? false : true; | ||
@@ -174,16 +241,71 @@ this.imdburl = "https://www.imdb.com/title/" + this.imdbid; | ||
/** | ||
* An episode as returned by {@link TVShow.episodes}. This is not intended to be | ||
* instantiated by an API consumer, but instead from results from omdb. | ||
*/ | ||
export class Episode extends Movie { | ||
/** what season this episode is a part of */ | ||
public season: number; | ||
/** what number episode in the season this episode is */ | ||
public episode: number; | ||
/** | ||
* Creates an epsiode from results from omdb. This is not intended for consumer use. | ||
* Please prefer {@link TVShow.epsiodes}. | ||
* | ||
* @param obj Episodes fetched from omdb | ||
* @param season Which season this episode belongs to | ||
* | ||
* @throws TypeError when the episode number is invalid | ||
*/ | ||
constructor(obj: OmdbEpisode, season: number) { | ||
super(obj); | ||
this.season = season; | ||
if (obj.hasOwnProperty("Episode")) { | ||
this.episode = parseInt(obj.Episode, 10); | ||
if (isNaN(this.episode)) { | ||
throw new TypeError("invalid episode"); | ||
} | ||
} | ||
} | ||
} | ||
/** | ||
* A TVShow as returned from {@link get}, {@link search} or any of the methods from | ||
* {@link Client}. This is not intended to be directly created by consumers of this | ||
* library | ||
*/ | ||
export class TVShow extends Movie { | ||
public start_year; | ||
public end_year; | ||
public totalseasons; | ||
/** year this show started */ | ||
public start_year: number; | ||
/** year this show ended if it's ended */ | ||
public end_year?: number; | ||
/** how many seasons this show ran */ | ||
public totalseasons: number; | ||
/** | ||
* @hidden | ||
*/ | ||
private _episodes: Episode[] = []; | ||
/** | ||
* @hidden | ||
*/ | ||
private opts: MovieOpts; | ||
constructor(object: OmdbTvshow, opts: MovieOpts) { | ||
super(object); | ||
/** | ||
* Creates a new {@link TVShow} from omdb results. This isn't intended to be | ||
* used by consumers of this library, instead see {@link get}, {@link search} | ||
* or any methods from {@link Client}. | ||
* | ||
* @param obj The tv show info we got from omdb | ||
* @param opts Options that we used to fetch this TVShow, so we can use | ||
* them to fetch episodes | ||
*/ | ||
constructor(obj: OmdbTvshow, opts: MovieOpts) { | ||
super(obj); | ||
const years = this._year_data.split("-"); | ||
this.start_year = parseInt(years[0], 10) ? parseInt(years[0], 10) : null; | ||
this.start_year = parseInt(years[0], 10); | ||
this.end_year = parseInt(years[1], 10) ? parseInt(years[1], 10) : null; | ||
this.totalseasons = parseInt(this.totalseasons, 10); | ||
this.totalseasons = parseInt(obj.totalSeasons, 10); | ||
this.opts = opts; | ||
@@ -195,9 +317,7 @@ } | ||
* | ||
* @param cb optional callback that gets any errors or episodes | ||
* | ||
* @return Promise yielding list of episodes | ||
*/ | ||
public episodes(cb?: (err: Error, data: Episode[]) => any): Promise<Episode[]> { | ||
public episodes(): Promise<Episode[]> { | ||
if (this._episodes.length !== 0) { | ||
return cb(undefined, this._episodes); | ||
return Promise.resolve(this._episodes); | ||
} | ||
@@ -219,2 +339,3 @@ | ||
url: omdbapi, | ||
withCredentials: false, | ||
}; | ||
@@ -232,27 +353,15 @@ | ||
const eps: Episode[] = []; | ||
for (const key in ep_data) { | ||
if (ep_data.hasOwnProperty(key)) { | ||
const datum = ep_data[key]; | ||
if (isError(datum)) { | ||
const err = new ImdbError(datum.Error); | ||
if (cb) { | ||
return cb(err, undefined); | ||
} | ||
return Promise.reject(err); | ||
} else { | ||
const season = parseInt(datum.Season, 10); | ||
for (const ep in datum.Episodes) { | ||
if (datum.Episodes.hasOwnProperty(ep)) { | ||
eps.push(new Episode(datum.Episodes[ep], season)); | ||
} | ||
} | ||
} | ||
for (const datum of ep_data) { | ||
if (isError(datum)) { | ||
throw new ImdbError(datum.Error); | ||
} | ||
const season = parseInt(datum.Season, 10); | ||
for (const ep of Object.getOwnPropertyNames(datum.Episodes)) { | ||
eps.push(new Episode(datum.Episodes[ep], season)); | ||
} | ||
} | ||
tvShow._episodes = eps; | ||
if (cb) { | ||
return cb(undefined, eps); | ||
} | ||
@@ -262,39 +371,70 @@ return Promise.resolve(eps); | ||
if (cb) { | ||
prom.catch((err) => { | ||
return cb(err, undefined); | ||
}); | ||
} else { | ||
return prom; | ||
} | ||
return prom; | ||
} | ||
} | ||
/** | ||
* A single search result from either {@link search} or {@link Client.search}. | ||
* This is not intended to be directly created by api consumers. | ||
*/ | ||
export class SearchResult { | ||
/** name of the movie */ | ||
public title: string; | ||
/** name of the movie */ | ||
public name: string; | ||
/** year the movie was released */ | ||
public year: number; | ||
/** imdb id of the movie */ | ||
public imdbid: string; | ||
/** type of media we found */ | ||
public type: RequestType; | ||
/** link to the poster for this movie */ | ||
public poster: string; | ||
constructor(obj: OmdbSearchResult) { | ||
for (const attr in obj) { | ||
if (obj.hasOwnProperty(attr)) { | ||
if (attr === "Year") { | ||
this.year = parseInt(obj[attr], 10); | ||
} else { | ||
this[attr.toLowerCase()] = obj[attr]; | ||
} | ||
for (const attr of Object.getOwnPropertyNames(obj)) { | ||
if (attr === "Year") { | ||
this[attr.toLowerCase()] = parseInt(obj[attr], 10); | ||
} else { | ||
this[attr.toLowerCase()] = obj[attr]; | ||
} | ||
} | ||
this.name = this.title; | ||
} | ||
} | ||
/** | ||
* A single page of {@link SearchResult}s. You can call {@link SearchResults.next} to fetch | ||
* the next page of results. This is not intended to be created by an API consumer, but instead | ||
* to be returned by {@link search} or {@link Client.search}. | ||
*/ | ||
export class SearchResults { | ||
public results: SearchResult[] = []; | ||
public totalresults: number; | ||
/** | ||
* @hidden | ||
*/ | ||
private page: number; | ||
/** | ||
* @hidden | ||
*/ | ||
private opts: MovieOpts; | ||
/** | ||
* @hidden | ||
*/ | ||
private req: SearchRequest; | ||
/** | ||
* Builds a new {@link SearchResults}. Not intended to be called directly by | ||
* API consumers, as it only creates the object from omdb results. | ||
* | ||
* @param obj Search results from omdb | ||
* @param page Page number we're fetching | ||
* @param opts Stored options from our initial request | ||
* @param req A reference to the original request | ||
*/ | ||
constructor(obj: OmdbSearch, page: number, opts: MovieOpts, req: SearchRequest) { | ||
@@ -305,3 +445,3 @@ this.page = page; | ||
for (const attr in obj) { | ||
for (const attr of Object.getOwnPropertyNames(obj)) { | ||
if (attr === "Search") { | ||
@@ -311,2 +451,4 @@ for (const result of obj.Search) { | ||
} | ||
} else if (attr === "totalResults") { | ||
this[attr.toLowerCase()] = parseInt(obj[attr], 10); | ||
} else { | ||
@@ -335,149 +477,180 @@ this[attr.toLowerCase()] = obj[attr]; | ||
/** | ||
* Fetches a movie by arbitrary criteria | ||
* Fetches a single movie by arbitrary criteria | ||
* | ||
* @param req set of requirements to search for | ||
* @param opts options that modify a search | ||
* @param cb optional callback to execute after fetching data | ||
* | ||
* @return a promise yielding a movie | ||
*/ | ||
export function getReq(req: MovieRequest, cb?: (err: Error, data: Movie | Episode) => any): Promise<Movie> { | ||
export function get(req: MovieRequest, opts: MovieOpts): Promise<Movie> { | ||
try { | ||
return new Client(opts).get(req); | ||
} catch (e) { | ||
return Promise.reject(e); | ||
} | ||
} | ||
if (req.opts === undefined || !req.opts.hasOwnProperty("apiKey")) { | ||
const err = new ImdbError("Missing api key in opts"); | ||
if (cb) { | ||
return cb(err, undefined); | ||
} else { | ||
return Promise.reject(err); | ||
/** | ||
* Searches for a movie by arbitrary criteria | ||
* | ||
* @param req set of requirements to search for | ||
* @param opts options that modify a search | ||
* @param page page number to return | ||
* | ||
* @return a promise yielding search results | ||
*/ | ||
export function search(req: SearchRequest, opts: MovieOpts, page?: number): Promise<SearchResults> { | ||
return new Client(opts).search(req, page); | ||
} | ||
/** | ||
* A client for fetching imdb information. | ||
* | ||
* This is primarly useful for making many requests without having | ||
* to pass a {@link MovieOpts} object to the same function over and | ||
* over again. | ||
* | ||
* All methods still accept an optional {@link MovieOpts} object in | ||
* the case that you want to override one or more of the options. | ||
* These per-method options are merged with the options that are | ||
* attached to the object, and override the object-local options. | ||
* | ||
* ```javascript | ||
* const cli = new imdb.Client({apiKey: 'xxxxxx', timeout: 30000}); | ||
* cli.get({name: "The Toxic Avenger"}).then((movie) => { | ||
* console.log(movie.title); | ||
* }); | ||
* | ||
* cli.search({name: "The Toxic Avenger"}).then((search) => { | ||
* for (let result of search.results) { | ||
* console.log(result.title); | ||
* } | ||
* }); | ||
* ``` | ||
*/ | ||
export class Client { | ||
/** | ||
* @hidden | ||
*/ | ||
private opts: MovieOpts; | ||
/** | ||
* Creates a new {@link Client} object. | ||
* | ||
* @param opts A set of {@link MovieOpts} that will be applied to all | ||
* requests made by this object unless overridden. | ||
* | ||
* @throws {@link ImdbError} if an invalid {@link MovieOpts} is passed | ||
*/ | ||
constructor(opts: MovieOpts) { | ||
if (!opts.hasOwnProperty("apiKey")) { | ||
throw new ImdbError("Missing api key in opts"); | ||
} | ||
this.opts = opts; | ||
} | ||
const qs = { | ||
apikey: req.opts.apiKey, | ||
i: undefined, | ||
plot: "full", | ||
r: "json", | ||
t: undefined, | ||
y: req.year, | ||
}; | ||
/** | ||
* Fetches a single movie by arbitrary criteria | ||
* | ||
* @param req set of requirements to search for | ||
* @param opts options that override the {@link Client}'s options | ||
* | ||
* @return a promise yielding a movie | ||
*/ | ||
public get(req: MovieRequest, opts?: MovieOpts): Promise<Movie> { | ||
opts = this.merge_opts(opts); | ||
if (req.name) { | ||
qs.t = req.name; | ||
} else if (req.id) { | ||
qs.i = req.id; | ||
} | ||
const qs = { | ||
apikey: opts.apiKey, | ||
i: undefined, | ||
plot: req.short_plot ? "short" : "full", | ||
r: "json", | ||
t: undefined, | ||
y: req.year, | ||
}; | ||
const reqopts = { | ||
json: true, | ||
qs, | ||
timeout: undefined, | ||
url: omdbapi, | ||
}; | ||
if (req.name) { | ||
qs.t = req.name; | ||
} else if (req.id) { | ||
qs.i = req.id; | ||
} else { | ||
return Promise.reject(new ImdbError("Missing one of req.id or req.name")); | ||
} | ||
if ("timeout" in req.opts) { | ||
reqopts.timeout = req.opts.timeout; | ||
} | ||
const reqopts = { | ||
json: true, | ||
qs, | ||
timeout: undefined, | ||
url: omdbapi, | ||
withCredentials: false, | ||
}; | ||
const prom = rp(reqopts).then((data: OmdbMovie | OmdbError) => { | ||
let ret: Movie | Episode; | ||
if (isError(data)) { | ||
const err = new ImdbError(data.Error + ": " + (req.name ? req.name : req.id)); | ||
if (cb) { | ||
return cb(err, undefined); | ||
} else { | ||
return Promise.reject(err); | ||
if ("timeout" in opts) { | ||
reqopts.timeout = opts.timeout; | ||
} | ||
const prom = rp(reqopts).then((data: OmdbMovie | OmdbError) => { | ||
let ret: Movie | Episode; | ||
if (isError(data)) { | ||
throw new ImdbError(`${data.Error}: ${(req.name ? req.name : req.id)}`); | ||
} | ||
} else { | ||
if (isMovie(data)) { | ||
ret = new Movie(data); | ||
} else if (isTvshow(data)) { | ||
ret = new TVShow(data, req.opts); | ||
ret = new TVShow(data, opts); | ||
} else if (isEpisode(data)) { | ||
ret = new Episode(data, 30); | ||
} else { | ||
const err = new ImdbError("type: " + data.Type + " not valid"); | ||
if (cb) { | ||
return cb(err, undefined); | ||
} else { | ||
return Promise.reject(err); | ||
} | ||
throw new ImdbError(`type: '${data.Type}' is not valid`); | ||
} | ||
if (cb) { | ||
return cb(undefined, ret); | ||
} | ||
return Promise.resolve(ret); | ||
} | ||
}); | ||
}); | ||
if (cb) { | ||
prom.catch((err) => { | ||
cb(err, undefined); | ||
}); | ||
} else { | ||
return prom; | ||
} | ||
} | ||
/** | ||
* @deprecated use getReq instead | ||
* | ||
* Gets a movie by name | ||
* | ||
* @param name name of movie to search for | ||
* @param opts options that modify a search | ||
* @param cb optional callback to execute after finding results | ||
* | ||
* @return a promise yielding a movie | ||
*/ | ||
export function get(name: string, opts: MovieOpts, cb?: (err: Error, data: Movie) => any): Promise<Movie> { | ||
return getReq({ id: undefined, opts, name }, cb); | ||
} | ||
/** | ||
* Searches for a movie by arbitrary criteria | ||
* | ||
* @param req set of requirements to search for | ||
* @param opts options that override the {@link Client}'s options | ||
* @param page page number to return | ||
* | ||
* @return a promise yielding search results | ||
*/ | ||
public search(req: SearchRequest, page?: number, opts?: MovieOpts): Promise<SearchResults> { | ||
opts = this.merge_opts(opts); | ||
if (page === undefined) { | ||
page = 1; | ||
} | ||
/** | ||
* @deprecated use getReq instead | ||
* | ||
* Gets a movie by id | ||
* | ||
* @param imdbid id to search for | ||
* @param opts options that modify a search | ||
* @param cb optional callback to execute after finding results | ||
* | ||
* @return a promise yielding a movie | ||
*/ | ||
export function getById(imdbid: string, opts: MovieOpts, cb?: (err: Error, data: Movie) => any): Promise<Movie> { | ||
return getReq({ id: imdbid, opts, name: undefined }, cb); | ||
} | ||
const qs = reqtoqueryobj(req, opts.apiKey, page); | ||
const reqopts = { qs, url: omdbapi, json: true, timeout: undefined, withCredentials: false }; | ||
if ("timeout" in opts) { | ||
reqopts.timeout = opts.timeout; | ||
} | ||
/** | ||
* Searches for a movie by arbitrary criteria | ||
* | ||
* @param req set of requirements to search for | ||
* @param opts options that modify a search | ||
* @param page page number to return | ||
* | ||
* @return a promise yielding search results | ||
*/ | ||
export function search(req: SearchRequest, opts: MovieOpts, page?: number): Promise<SearchResults> { | ||
if (page === undefined) { | ||
page = 1; | ||
} | ||
const prom = rp(reqopts).then((data: OmdbSearch | OmdbError) => { | ||
if (isError(data)) { | ||
throw new ImdbError(`${data.Error}: ${req.name}`); | ||
} | ||
const qs = reqtoqueryobj(req, opts.apiKey, page); | ||
const reqopts = { qs, url: omdbapi, json: true, timeout: undefined }; | ||
if ("timeout" in opts) { | ||
reqopts.timeout = opts.timeout; | ||
return Promise.resolve(new SearchResults(data, page, opts, req)); | ||
}); | ||
return prom; | ||
} | ||
const prom = rp(reqopts).then((data: OmdbSearch | OmdbError) => { | ||
if (isError(data)) { | ||
const err = new ImdbError(`${data.Error}: ${req.title}`); | ||
return Promise.reject(err); | ||
} else { | ||
return Promise.resolve(new SearchResults(data, page, opts, req)); | ||
/** | ||
* @hidden | ||
*/ | ||
private merge_opts(opts?: MovieOpts): MovieOpts { | ||
if (opts !== undefined) { | ||
return Object.assign({ ...this.opts }, opts); | ||
} | ||
}); | ||
return prom; | ||
return { ...this.opts }; | ||
} | ||
} |
@@ -56,2 +56,17 @@ export interface OmdbMovie { | ||
imdbID: string; | ||
imdbVotes: string; | ||
Year: string; | ||
Rated: string; | ||
Runtime: string; | ||
Genre: string; | ||
Director: string; | ||
Writer: string; | ||
Actors: string; | ||
Plot: string; | ||
Language: string; | ||
Country: string; | ||
Awards: string; | ||
Poster: string; | ||
Metascore: string; | ||
Response: string; | ||
} | ||
@@ -58,0 +73,0 @@ |
@@ -8,3 +8,3 @@ { | ||
"Title": "Pilot", | ||
"Released": "2005-09-19", | ||
"Released": "19 Sep 2005", | ||
"Episode": "1", | ||
@@ -11,0 +11,0 @@ "imdbRating": "8.5", |
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es6"], | ||
"module": "commonjs", | ||
@@ -9,7 +11,5 @@ "removeComments": true, | ||
}, | ||
"files": [ | ||
"src/imdb.ts", | ||
"src/util.ts", | ||
"src/interfaces.ts" | ||
"include": [ | ||
"src/*" | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
1312510
101
0
4
12
5518
129
+ Added@types/request@^2.47.0
+ Added@types/caseless@0.12.5(transitive)
+ Added@types/node@22.13.4(transitive)
+ Added@types/request@2.48.12(transitive)
+ Added@types/request-promise-native@1.0.21(transitive)
+ Added@types/tough-cookie@4.0.5(transitive)
+ Addedcall-bind-apply-helpers@1.0.2(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.1.1(transitive)
+ Addedes-set-tostringtag@2.1.0(transitive)
+ Addedform-data@2.5.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.7(transitive)
+ Addedget-proto@1.0.1(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedrequest-promise-native@1.0.9(transitive)
+ Addedundici-types@6.20.0(transitive)
- Removedes6-promise@^4.1.0
- Removedrequest-promise@^4.1.1
- Removedbluebird@3.7.2(transitive)
- Removedes6-promise@4.2.8(transitive)
- Removedrequest-promise@4.2.6(transitive)
Updatedrequest@^2.86.0