Skip to content

Add trakt.tv provider #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Nov 19, 2017
Merged

Add trakt.tv provider #321

merged 12 commits into from
Nov 19, 2017

Conversation

marcuspoehls
Copy link
Contributor

The provider to support the trakt.tv OAuth API is yet missing. This PR helps to add support for trakt.

It uses the extended trakt.tv user profile by default.

Hopefully this helps users to connect with trakt.tv’s OAuth API :)

Copy link
Contributor

@ldesplat ldesplat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your own trackt.tv test fails with

Debug: internal, implementation, error 
    Error: Uncaught error: `value` required in setHeader("trakt-api-key", value).
    at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:354:11)
    at new ClientRequest (_http_client.js:79:14)
    at Object.exports.request (http.js:31:10)
    at internals.Client.request.options.beforeRedirect.onResponse [as request] 

If you solve that, we can get it merged.

@ldesplat ldesplat added the feature New functionality or improvement label Sep 24, 2017
@marcuspoehls
Copy link
Contributor Author

@ldesplat Ups, sorry. Will check and correct the tests. Thank you

@AdriVanHoudt
Copy link
Contributor

Coverage: 99.94% (1/1601)
lib/providers/trakt.js missing coverage on line(s): 5

missing that 0.06% coverage 😲 😉

@marcuspoehls
Copy link
Contributor Author

@AdriVanHoudt @ldesplat yeah, I saw the failing tests due to coverage. Can you please tell me how to add test coverage for line 5 in lib/providers/trakt.js?

It's this line:

options = options || {};

in the trakt.js provider.

@AdriVanHoudt
Copy link
Contributor

So you need a test that covers passing options and one that covers it defaulting to {}

@marcuspoehls
Copy link
Contributor Author

Thank you buddy. I didn’t notice at first what was missing. I thought the default option is fine, but —of course— needs testing as well 😄

@marcuspoehls
Copy link
Contributor Author

@ldesplat Hi Loïs, I fixed the failing tests and coverage is at 100%. Any chance to get this merged? Thank you!

Copy link
Contributor

@AdriVanHoudt AdriVanHoudt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ldesplat ldesplat added this to the 8.9.0 milestone Nov 19, 2017
@ldesplat
Copy link
Contributor

Failing tests are normal and nothing to worry about. Just new node globals and we're still on such old versions of our dependencies. Thank you!

@ldesplat ldesplat merged commit 03dd779 into hapijs:master Nov 19, 2017
@marcuspoehls
Copy link
Contributor Author

@ldesplat @AdriVanHoudt Thank you for merging!

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants