Skip to content
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

add PageToken to getPlayListsItemsById #21

Closed
wants to merge 8 commits into from

Conversation

piercus
Copy link

@piercus piercus commented Mar 15, 2016

No description provided.

@paulomcnally
Copy link
Owner

In Review. Please wait.

@TheConnMan
Copy link

I could use the pageToken functionality in this PR as well.

@piercus
Copy link
Author

piercus commented Jan 18, 2017

Hello @paulomcnally, can i do something to help on this pr review ?

lib/youtube.js Outdated
@@ -175,17 +189,33 @@ var YouTube = function() {
/**
* Playlists data from Playlist Id
* @param {string} id
* @param {int} [maxResults]
Copy link

@niklasHagner niklasHagner Jan 28, 2018

Choose a reason for hiding this comment

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

👍
This would fix issue #43

@piercus
Copy link
Author

piercus commented Jan 29, 2018

Any progress on the review ?

I'm really glad to benefit from this open-source project but this PR has been opened 685 days ago and i'm wondering if this project is still maintained.

Thank you for your feedbacks

@@ -4,7 +4,7 @@ var config = require('./config');
var youTube = new YouTube();

youTube.setKey(config.key);
youTube.getPlayListsItemsById('PLpOqH6AE0tNhInmRTSNf9f6OQsdaSJS8F', function(error, result) {
youTube.getPlayListsItemsById('PLpOqH6AE0tNhInmRTSNf9f6OQsdaSJS8F', 8, function(error, result) {
Copy link

@niklasHagner niklasHagner Jan 29, 2018

Choose a reason for hiding this comment

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

Hmm just wondering - why is the maxResults set to such a seemingly arbitrary number as 8?

Copy link
Author

Choose a reason for hiding this comment

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

changed it to config.max

@niklasHagner
Copy link

niklasHagner commented Jan 29, 2018

@piercus: Seems master has been updated since this PR was made.
This branch now has conflicts that need to be resolved.

Actually, the "add maxResults" has already been done in the current version of this repo.
The version of the file lib/youtube.js in master uses this function signature getPlayListsItemsById = function(id, maxResults, callback)
https://github.com/nodenica/youtube-node/blob/master/lib/youtube.js

So you should rename this PR to "add PageToken to getPlayListsItemsById" because that's the only new argument.

//Just another guy who uses this library

@piercus piercus changed the title Add maxResults to getPlayListsItemsById add PageToken to getPlayListsItemsById Jan 30, 2018
@piercus
Copy link
Author

piercus commented Jan 30, 2018

@niklasHagner thank you for your comments.

  • Merged
  • added an example with pageToken
  • changed hardcoded 8 to config.max

Tell me what you think

Travis is failing but i think this is due to misconfiguration of the travis build which should have process.env.YOUTUBE_API defined with environment variables

@niklasHagner
Copy link

Looks good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants