Giter Site home page Giter Site logo

edwellbrook / node-tvdb Goto Github PK

View Code? Open in Web Editor NEW
65.0 6.0 28.0 551 KB

Node.js library for accessing TheTVDB API

Home Page: https://edwellbrook.github.io/node-tvdb/

License: MIT License

JavaScript 100.00%
thetvdb-api node-tvdb tvdb thetvdb api wrapper client

node-tvdb's Introduction

node-tvdb

Build Status npm Downloads

Node.js library for accessing TheTVDB JSON API. Originally based on joaocampinhos/thetvdb-api to give nicer output and additional features.

Pull requests are always very welcome.

Features

  • Handle errors from API as JavaScript errors
  • Only returns relevant data (no need to call response.Data.Series etc.)
  • Set language at initialisation or on each function call
  • Return values through promises (dropped callback support)
  • Uses the new JSON API from TheTVDB
  • Tests with Mocha and Travis CI

Installation

Install with npm:

npm install --save node-tvdb

And run tests with Mocha:

TVDB_KEY=[YOUR API KEY HERE] npm test

Mocha is installed as a development dependency; you do not need to install it globally to run the tests.

Example Usage

To start using this library you first need an API key. You can request one here. Then just follow this simple example that fetches all the shows containing "The Simpsons" in the name.

const TVDB = require('node-tvdb');
const tvdb = new TVDB('ABC123');

tvdb.getSeriesByName('The Simpsons')
    .then(response => { /* process data */ })
    .catch(error => { /* handle error */ });

Full API Docs

Generated API docs with code examples can be found at: edwellbrook.github.io/node-tvdb.

For details on response data, please see TheTVDB API docs.

License

The MIT License (MIT)

node-tvdb's People

Contributors

clementkerneur avatar dependabot[bot] avatar edwellbrook avatar greenkeeper[bot] avatar greenkeeperio-bot avatar jbarrus avatar jhutchins avatar joaocampinhos avatar jwmickey avatar lordsuricato avatar omgimalexis avatar palortoff avatar paquitosoft avatar robbertkl avatar t3rminus avatar tgvarik avatar watdafox avatar ziacik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-tvdb's Issues

List of mirrors for banners?

I need to get a URL to retrieve the banners. I assume I need to get the mirrors list and pick one. How do I do this?

An in-range update of mocha is breaking the build 🚨

The devDependency mocha was updated from 6.0.2 to 6.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v6.1.0

6.1.0 / 2019-04-07

πŸ”’ Security Fixes

  • #3845: Update dependency "js-yaml" to v3.13.0 per npm security advisory (@plroebuck)

πŸŽ‰ Enhancements

  • #3766: Make reporter constructor support optional options parameter (@plroebuck)
  • #3760: Add support for config files with .jsonc extension (@sstephant)

πŸ“  Deprecations

These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:

πŸ› Fixes

  • #3829: Use cwd-relative pathname to load config file (@plroebuck)
  • #3745: Fix async calls of this.skip() in "before each" hooks (@juergba)
  • #3669: Enable --allow-uncaught for uncaught exceptions thrown inside hooks (@givanse)

and some regressions:

πŸ“– Documentation

πŸ”© Other

  • #3830: Replace dependency "findup-sync" with "find-up" for faster startup (@cspotcode)
  • #3799: Update devDependencies to fix many npm vulnerabilities (@XhmikosR)
Commits

The new version differs by 28 commits.

  • f4fc95a Release v6.1.0
  • bd29dbd update CHANGELOG for v6.1.0 [ci skip]
  • aaf2b72 Use cwd-relative pathname to load config file (#3829)
  • b079d24 upgrade deps as per npm audit fix; closes #3854
  • e87c689 Deprecate this.skip() for "after all" hooks (#3719)
  • 81cfa90 Copy Suite property "root" when cloning; closes #3847 (#3848)
  • 8aa2fc4 Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
  • 586bf78 Update JS-YAML to address security issue (#3845)
  • d1024a3 Update doc examples "tests.html" (#3811)
  • 1d570e0 Delete "/docs/example/chai.js"
  • ade8b90 runner.js: "self.test" undefined in Browser (#3835)
  • 0098147 Replace findup-sync with find-up for faster startup (#3830)
  • d5ba121 Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
  • a3089ad update package-lock
  • 75430ec Upgrade yargs-parser dependency to avoid loading 2 copies of yargs

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Error: Text data outside root node

Not sure why I'm getting this error. Could be a data issue with TVDB?

Line: 1
Column: 1
Char: C
    at error (/node_modules/sax/lib/sax.js:667:10)
    at strictFail (/node_modules/sax/lib/sax.js:693:7)
    at Object.write (/node_modules/sax/lib/sax.js:1051:15)
    at Parser.exports.Parser.Parser.parseString (/node_modules/xml2js/lib/xml2js.js:508:31)
    at Parser.bind [as parseString] (/node_modules/xml2js/lib/xml2js.js:7:59)
    at exports.parseString (/node_modules/xml2js/lib/xml2js.js:540:19)
    at parseXML (/node_modules/node-tvdb/index.js:415:5)
    at Request._callback (/node_modules/node-tvdb/index.js:399:17)
    at Request.init.self.callback (/node_modules/request/request.js:186:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/node_modules/request/request.js:1081:10)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)
    at IncomingMessage.<anonymous> (/node_modules/request/request.js:1001:12)
    at IncomingMessage.g (events.js:260:16)```

getSeriesAllById broken in compat mode

Thanks for adding the zip mode!

Unfortunately, the zip mode does not seem to work in compat mode.
When calling getSeriesAllById I get
TypeError: undefined is not a function at responseOk (C:\hg\EpiNode\node_modules\node-tvdb\compat\index.js:299:14)

as the Buffer class does not have an indexOf function.
When I remove line 299, it all works...

An in-range update of sinon is breaking the build 🚨

The devDependency sinon was updated from 7.3.2 to 7.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Access-Control-Allow-Origin

Hey,

I am trying to use your library in a vue.js project, but I keep getting this error:

XMLHttpRequest cannot load https://api.thetvdb.com/login. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 405.

Is there any way to fix this?

An in-range update of eslint is breaking the build 🚨

The devDependency eslint was updated from 6.6.0 to 6.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v6.7.0
  • 312a88f New: Add grouped-accessor-pairs rule (fixes #12277) (#12331) (Milos Djermanovic)
  • 5c68f5f Update: Add 'lexicalBindings' to no-implicit-globals and change messages (#11996) (Milos Djermanovic)
  • 6eaad96 New: Add suggestions API (#12384) (Will Douglas)
  • b336fbe Fix: indent rule with JSX spread props (#12581) (Nathan Woltman)
  • 97c745d Update: Report assignment expression location in no-cond-assign (#12465) (Milos Djermanovic)
  • 0f01f3d Update: Check member expressions with this in operator-assignment (#12495) (Milos Djermanovic)
  • 62c7038 Fix: invalid token checking in computed-property-spacing (fixes #12198) (#12533) (YeonJuan)
  • 4f8a1ee Update: Add enforceForClassMembers option to no-useless-computed-key (#12110) (ark120202)
  • 1a2eb99 New: new rule no-constructor-return (fixes #12481) (#12529) (Pig Fang)
  • ca3b2a6 New: ignorePatterns in config files (refs eslint/rfcs#22) (#12274) (Toru Nagashima)
  • 60204a3 Docs: Added another Textmate 2 bundle. (#12580) (Ryan Fitzer)
  • 62623f9 Fix: preserve whitespace in multiline-comment-style (fixes #12312) (#12316) (Kai Cataldo)
  • 17a8849 New: Add no-dupe-else-if rule (fixes #12469) (#12504) (Milos Djermanovic)
  • 41a78fd Update: improve location for semi and comma-dangle (#12380) (Chiawen Chen)
  • 0a480f8 Docs: Change "Code Conventions" link in pull-requests.md (#12401) (Denis Sikuler)
  • fed20bb Fix: require-await crash on global await (#12571) (Brad Zacher)
  • b8030fc Update: deprecate personal config (fixes #11914, refs eslint/rfcs#32) (#12426) (Toru Nagashima)
  • 40c8c32 Fix: improve report location for object-curly-spacing (#12563) (Milos Djermanovic)
  • 1110045 Fix: ignore marker-only comments in spaced-comment (fixes #12036) (#12558) (Milos Djermanovic)
  • 6503cb8 Update: Fix uglified object align in key-spacing (fixes #11414) (#12472) (YeonJuan)
  • 40791af Docs: clarify ignoreDestructuring option in the camelcase rule (#12553) (Milos Djermanovic)
  • 07d398d Chore: Add GitHub organization to Sponsor button (#12562) (Brandon Mills)
  • a477707 Chore: Format style guide links so they can be clicked (#12189) (Ivan V)
  • 0f7edef Update: add react plugin config for eslint init (#12446) (Ibrahim Rouis)
  • 448ff1e Update: Report '\08' and '\09' in no-octal-escape (fixes #12080) (#12526) (Milos Djermanovic)
  • 45aa6a3 New: Add no-setter-return rule (fixes #12285) (#12346) (Milos Djermanovic)
  • 0afb518 Fix: invalid autofix in function-call-argument-newline (fixes #12454) (#12539) (YeonJuan)
  • 90305e0 Update: Depcrecate isSpaceBetweenTokens() (#12519) (Kai Cataldo)
  • 41b1e43 New: add option for camelcase (fixes #12527) (#12528) (Pig Fang)
  • f49f1e0 Upgrade: upgrade optionator to avoid license issue (fixes #11536) (#12537) (Pig Fang)
  • 0286b57 Docs: Clean up Getting Started Guide (#12544) (Nicholas C. Zakas)
  • 575a98d Chore: Add funding field to package.json (#12543) (Nicholas C. Zakas)
  • 9e29e18 Fix: sourceCode#isSpaceBetweenTokens() checks non-adjacent tokens (#12491) (Kai Cataldo)
  • 5868550 Docs: add notice about function keyword in keyword-spacing (#12524) (Pig Fang)
  • bb556d5 Fix: curly multi reports single lexical declarations (fixes #11908) (#12513) (Milos Djermanovic)
  • ac60621 Fix: unexpected autofix in prefer-const (fixes #12514) (#12521) (YeonJuan)
  • 990065e Update: curly multi-or-nest flagging semis on next line (fixes #12370) (#12378) (cherryblossom000)
  • 084a8a6 Fix: no-cond-assign with always option reports switch case clauses (#12470) (Milos Djermanovic)
  • 7e41355 Update: improve report location for space-infix-ops (#12324) (Chiawen Chen)
  • 94ff921 Update: Add capIsConstructor option to no-invalid-this (fixes #12271) (#12308) (Milos Djermanovic)
  • de65de6 New: Add prefer-exponentiation-operator rule (fixes #10482) (#12360) (Milos Djermanovic)
  • c78f4a7 Update: Allow JSX exception in no-inline-comments (fixes #11270) (#12388) (Milos Djermanovic)
  • e17fb90 New: allowAfterThisConstructor for no-underscore-dangle (fixes #11488) (#11489) (sripberger)
  • 287ca56 Build: update CI for Node.js 13 (#12496) (Toru Nagashima)
  • 98e1d50 Upgrade: globals to v12.1.0 (#12296) (Tony Brix)
  • 8ac71a3 Sponsors: Sync README with website (ESLint Jenkins)
  • 4e142ea Docs: Update README team and sponsors (ESLint Jenkins)
Commits

The new version differs by 49 commits.

  • 61848b4 6.7.0
  • 9162db9 Build: changelog update for 6.7.0
  • 312a88f New: Add grouped-accessor-pairs rule (fixes #12277) (#12331)
  • 5c68f5f Update: Add 'lexicalBindings' to no-implicit-globals and change messages (#11996)
  • 6eaad96 New: Add suggestions API (#12384)
  • b336fbe Fix: indent rule with JSX spread props (#12581)
  • 97c745d Update: Report assignment expression location in no-cond-assign (#12465)
  • 0f01f3d Update: Check member expressions with this in operator-assignment (#12495)
  • 62c7038 Fix: invalid token checking in computed-property-spacing (fixes #12198) (#12533)
  • 4f8a1ee Update: Add enforceForClassMembers option to no-useless-computed-key (#12110)
  • 1a2eb99 New: new rule no-constructor-return (fixes #12481) (#12529)
  • ca3b2a6 New: ignorePatterns in config files (refs eslint/rfcs#22) (#12274)
  • 60204a3 Docs: Added another Textmate 2 bundle. (#12580)
  • 62623f9 Fix: preserve whitespace in multiline-comment-style (fixes #12312) (#12316)
  • 17a8849 New: Add no-dupe-else-if rule (fixes #12469) (#12504)

There are 49 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of nock is breaking the build 🚨

The devDependency nock was updated from 11.7.2 to 11.8.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v11.8.0

11.8.0 (2020-02-10)

Bug Fixes

  • types: Scope accepts legacy Url not WHATWG (#1879) (e22233b)
  • Correct behavior when other libraries override http.get and http.request (#1868) (22e2fca), closes #1836

Features

Commits

The new version differs by 9 commits.

  • 8b8a10d Greenkeeper/semantic release 17.0.2 (#1878)
  • e22233b fix(types): Scope accepts legacy Url not WHATWG (#1879)
  • 061e922 feat(socketDelay): support options.timeout (#1848)
  • c209c6b refactor: Use Mocha DSL in test_nock_lifecycle (#1809)
  • eac299b Remove a spurious { retry: 0 } (#1876)
  • e863c84 ci: move format, lint and test jobs to GitHub Actions (#1814)
  • 22e2fca fix: Correct behavior when other libraries override http.get and http.request (#1868)
  • 921eacf docs: Revise and accept RFC-001 (#1753)
  • e1461a2 Update mocha to the latest version πŸš€ (#1858)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml
  • The new Node.js version is in-range for the engines in 1 of your package.json files, so that was left alone

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected πŸ€–


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Possible to run without "--harmony --use_strict" ?

Hi there, with this module I can only run my app using node --harmony --use_strict myApp.js is there a way to get node-tvdb working without those flags? Unfortunately other modules in my project have issues with those.

An in-range update of jsdoc is breaking the build 🚨

The devDependency jsdoc was updated from 3.5.5 to 3.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

jsdoc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 105 commits ahead by 105, behind by 58.

  • 2099e72 3.6.0
  • d45c5b8 Add 3.6.0 changelog.
  • b8012f4 Update dependencies, plus the URLs for the GitHub repos and docs.
  • 10c004f update docs with new template (#1604)
  • aa0b6c1 switch to new-ish ECMAScript syntax
  • 1546d40 update ESLint config
  • 27f9a33 migrate from babylon to @babel/parser
  • d310908 Update ajv to the latest version πŸš€ (#1599)
  • ccb70aa only run CI with Node.js versions that actually exist
  • 2d3b55b migrate from markdown-it-named-headers to markdown-it-anchor (#1481)
  • 7b304d8 update dependencies and supported Node.js versions
  • b214273 3.5.5 changelog
  • 932c357 Prefer copyFileSync from here over native (#1440)
  • 8e2f868 upgrade Babylon
  • 96f8875 fix test breakage

There are 105 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon-chai is breaking the build 🚨

The devDependency sinon-chai was updated from 3.3.0 to 3.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

sinon-chai is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for 3.4.0

https://github.com/domenic/sinon-chai/blob/master/CHANGELOG.md#340

Commits

The new version differs by 4 commits.

  • 942504a Fix trailing comma in package.json
  • d990858 3.4.0
  • 60df918 chore(infra): upgrade all deps (#144)
  • fb4f82a Docs: install sinon-chai as a dev dependency (#135)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

ZIP for getSeriesAllById

I would really love to have the hability to use the zip instead of the xml for getSeriesAllById.

Example for "The Big Bang Theory" Series with the 'fr' lang request: 238KB of xml, 47KB of zip.

Website issues

Hi, I was scrolling your website from my smartphone and I noticed you've got some issues with the position of some elements that make it unusable. What do you think to release the website publicly on a repo so I could make PR and fix stuff? Would be also a normal evolution considering the open source nature of the project itselft.
Hoping for a feedback. Thank you, Giacomo.

When will node-tvdb start using the new TVDB API?

Hi

I've noticed that this module uses the XML api of TheTVDB and that you started working on a version that uses the JSON api of TheTVDB (branch: new-tvdb-api).
Any idea if you're going to change the implementation and when this version would be released?

API documentation of the new version: https://api.thetvdb.com/swagger

Thanks in advance.

Kind regards,
Yannick

Avoid new login for every API call

With the current implementation in new-tv-api for every api call a login request is performed.

@edwellbrook: Is there a reason, you removed the solution to this with 1118adc?

Prior to 1118adc when constructing the client a login would be performed asynchronously. The login call was stored in the loginPromise.

Every subsequent call to the api would then use the authentication token returned by the loginPromise to authenticate.

Release with index.d.ts

Hey there!

in #112 you merged the index.d.ts with the function signatures but you didn't trigger the release since then. This means the index.d.ts file is not available when installing the package.

(Also seems the latest version on npm is 4.1.0 while this repo is at 5)

Cheers!

Node engine compatibility

Is it possible to bring down the node engine version required from >= v6.0.0 to something like v4.x?

I understand the urge to write cutting edge JS code, but a lot of people don't run cutting edge node.js versions.
Probably you can use babel for this?

I want to use this lib in an AWS Lambda function, and Lambda supports Node.js v4.3.2.

If you want I can help you out with babel

An in-range update of mocha is breaking the build 🚨

Version 3.4.0 of mocha just got published.

Branch Build failing 🚨
Dependency mocha
Current Version 3.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As mocha is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Release Notes v3.4.0

Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week.

This week's highlights:

  • allowUncaught added to commandline as --allow-uncaught (and bugfixed)
  • warning-related Node flags

πŸŽ‰ Enhancements

πŸ› Fixes

πŸ”© Other

Commits

The new version differs by 9 commits0.

  • 7554b31 Add Changelog for v3.4.0
  • 9f7f7ed Add --trace-warnings flag
  • 92561c8 Add --no-warnings flag
  • ceee976 lint test/integration/fixtures/simple-reporter.js
  • dcfc094 Revert "use semistandard directly"
  • 93392dd no special case for macOS running Karma locally
  • 4d1d91d --allow-uncaught cli option
  • fb1e083 fix allowUncaught in browser
  • 4ed3fc5 Add license report and scan status

false

See the full diff

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

HTTP errors are not handled

The promises returned by node-fetch are not rejected for http status codes in the 4xx or 5xx block. (According to node-fetch's readme, such errors should be handled within the .then() call.) node-tvdb does not check for these kind of errors before trying to parse the response body as json. This means that when the api returns a non-json body under a 4xx or 5xx error code, node-tvdb's promises are rejected with unhelpful errors, like this:

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at /var/lib/deluge/deluge-execute/node_modules/node-fetch/lib/body.js:48:15
    at process._tickCallback (internal/process/next_tick.js:103:7)

NB: This is happening a lot right now, because the api is going through one of its annoyingly frequent "Cloudflare is timing out while trying to reach the origin server" phases. The api returns html under a 522 status.

Unhelpful errors make it hard for consuming code to recover gracefully. Instead, node-tvdb could check for 4xx or 5xx statuses and reject with more helpful errors that include the response object from node-fetch. The consuming code could then examine the response object to see why the call failed and respond accordingly.

An in-range update of eslint-plugin-mocha is breaking the build 🚨

The devDependency eslint-plugin-mocha was updated from 6.2.1 to 6.2.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for 6.2.2

Bug Fixes

  • Support TDD interface in no-setup-in-describe (#220)

Build-Related

  • πŸš€ Use GitHub Actions instead of Travis (#221)
Commits

The new version differs by 6 commits.

  • 96b14bb 6.2.2
  • 76617ef Merge pull request #221 from lo1tuma/github-actions
  • 4fa5861 Merge pull request #220 from lo1tuma/gh-219
  • 0aff1cc πŸ—‘ Remove Travis configuration file
  • c40d574 πŸš€ Create GitHub Actions workflow
  • e8e2b62 πŸ› Support TDD interface in no-setup-in-describe

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of nock is breaking the build 🚨

The devDependency nock was updated from 10.0.5 to 10.0.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v10.0.6

10.0.6 (2019-01-02)

Bug Fixes

Commits

The new version differs by 1 commits.

  • cb56669 fix: Mock responses should fire when timers are mocked (#1335)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Typo in documentation

Hi,
I found a small typo in documentation, the function "getSeriesPosters" , in the example code is singular "getSeriesPoster"

An in-range update of mocha is breaking the build 🚨

The devDependency mocha was updated from 6.2.1 to 6.2.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v6.2.2

6.2.2 / 2019-10-18

πŸ› Fixes

πŸ“– Documentation

Commits

The new version differs by 12 commits.

  • 843a322 6.2.2
  • aec8b02 update CHANGELOG for v6.2.2 [ci skip]
  • 7a8b95a npm audit fixes
  • cebddf2 Improve reporter documentation for mocha in browser. (#4026)
  • 3f7b987 uncaughtException: report more than one exception per test (#4033)
  • ee82d38 modify alt text of image from Backers to Sponsors inside Sponsors section in Readme (#4046)
  • e9c036c special-case parsing of "require" in unparseNodeArgs(); closes #4035 (#4063)
  • 954cf0b Fix HTMLCollection iteration to make unhide function work as expected (#4051)
  • 816dc27 uncaughtException: fix double EVENT_RUN_END events (#4025)
  • 9650d3f add OpenJS Foundation logo to website (#4008)
  • f04b81d Adopt the OpenJSF Code of Conduct (#3971)
  • aca8895 Add link checking to docs build step (#3972)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

`getSeriesByName` fails if the name needs to be URL-encoded

Some series' names, at least ones with an ampersand, need to be url encoded. It probably makes more sense to change this on the library side:

Not working: tvdb.getSeriesByName('Eastbound & Down')
Working: tvdb.getSeriesByName(encodeURIComponent('Eastbound & Down'))

Error message

{ Error: Requires only one of name, imdbId, zap2itId params
    at res.json.then (C:\Commands\node_modules\node-tvdb\index.js:451:23)
    at process._tickCallback (internal/process/next_tick.js:109:7)
  response:
   Body {
     url: 'https://api.thetvdb.com/search/series?name=Eastbound & Down',
     status: 405,
     statusText: 'Method Not Allowed',
     headers: Headers { _headers: [Object] },
     ok: false,
     body:
      PassThrough {
        _readableState: [Object],
        readable: false,
        domain: null,
        _events: [Object],
        _eventsCount: 3,
        _maxListeners: undefined,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: true,
        _transformState: [Object] },
     bodyUsed: true,
     size: 0,
     timeout: 0,
     _raw: [ <Buffer 7b 0a 20 20 22 45 72 72 6f 72 22 3a 20 22 52 65 71 75 69 72 65 73 20 6f 6e 6c 79 20 6f 6e 65 20 6f 66 20 6e 61 6d 65 2c 20 69 6d 64 62 49 64 2c 20 7a ... > ],
     _abort: false,
     _bytes: 67 } }

An in-range update of nock is breaking the build 🚨

The devDependency nock was updated from 10.0.1 to 10.0.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nock is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v10.0.2

10.0.2 (2018-11-03)

Bug Fixes

Commits

The new version differs by 18 commits.

  • 598245c Merge pull request #1250 from vwxyutarooo/master
  • 8453191 test: add case of nockBack with filteringRequestBody opiton
  • 1b4b9c6 test: add case of nockBack with filteringPath option
  • 6d5bca2 fix(#1041): apply filteringPath from nockBack before option
  • 048c07d Merge pull request #1247 from j0k3r/patch-1
  • 5b69d06 docs: Fix anchor in README
  • 35936eb Merge pull request #1246 from chrisulanowicz/master
  • e63de1a docs: fixed typos
  • 7f41138 Merge pull request #1220 from nock/feat/github-apps-note
  • 33da255 Merge pull request #1163 from nock/feat/add-contributors
  • 1a845a5 docs: Update list and instructions
  • c1f608a docs: Add note about GitHub Apps
  • 2c9f427 docs: Add description to Contributors file
  • f907c3f docs: rename CONTRIBUTORS.md, add section to CONTRIBUTING
  • 0885b5f docs: remove contribs file

There are 18 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.