Skip to content

Add Support of PageToken while requesting comments#188

Open
artin1982 wants to merge 3 commits intoalaouy:masterfrom
artin1982:patch-1
Open

Add Support of PageToken while requesting comments#188
artin1982 wants to merge 3 commits intoalaouy:masterfrom
artin1982:patch-1

Conversation

@artin1982
Copy link
Copy Markdown

@artin1982 artin1982 commented May 16, 2023

Add Support of PageToken while requesting comments.
So We can paginate comments ... :)

Comment thread src/Youtube.php Outdated
* @throws \Exception
*/
public function getCommentThreadsByVideoId($videoId = null, $maxResults = 20, $order = null, $part = ['id', 'replies', 'snippet'], $pageInfo = false) {
public function getCommentThreadsByVideoId($videoId = null, $maxResults = 20, $order = null, $part = ['id', 'replies', 'snippet'], $pageInfo = false), $pageToken = null {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Typo?

Suggested change
public function getCommentThreadsByVideoId($videoId = null, $maxResults = 20, $order = null, $part = ['id', 'replies', 'snippet'], $pageInfo = false), $pageToken = null {
public function getCommentThreadsByVideoId($videoId = null, $maxResults = 20, $order = null, $part = ['id', 'replies', 'snippet'], $pageInfo = false, $pageToken = null){

Comment thread src/Youtube.php
* @throws \Exception
*/
public function getCommentThreads($channelId = null, $id = null, $videoId = null, $maxResults = 20, $order = null, $part = ['id', 'replies', 'snippet'], $pageInfo = false)
public function getCommentThreads($channelId = null, $id = null, $videoId = null, $maxResults = 20, $order = null, $part = ['id', 'replies', 'snippet'], $pageInfo = false, $pageToken = null)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good to me, just please update the tests accordingly

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@artin1982 I see this was fixed, can you also please update the tests accordingly in order to merge it for the next release ?

my fault 🤦‍♂️
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants