Skip to content

Adding a pagination#49

Merged
Somsubhra merged 1 commit intoSomsubhra:masterfrom
ademkoc:pagination
Nov 14, 2020
Merged

Adding a pagination#49
Somsubhra merged 1 commit intoSomsubhra:masterfrom
ademkoc:pagination

Conversation

@ademkoc
Copy link
Copy Markdown
Contributor

@ademkoc ademkoc commented Nov 13, 2020

Hey there,

I'm adding a pagination to repositories releases results.

@Somsubhra Somsubhra merged commit f33f4dc into Somsubhra:master Nov 14, 2020
@Somsubhra
Copy link
Copy Markdown
Owner

Thanks for the patch!

@ErikMinekus
Copy link
Copy Markdown

isLatestRelease is now false unless the URL explicitly contains page=1.

@ErikMinekus
Copy link
Copy Markdown

Also, Total Downloads should count all releases, not just the releases on the current page.

@ademkoc
Copy link
Copy Markdown
Contributor Author

ademkoc commented Nov 15, 2020

Thank you @ErikMinekus, i made a new PR #50 for the latest release issue.

About total downloads, api gives us the count for each release not the total count. Before the pagination implementation each query result contained a maximum of 30 release and they were collecting.

Shortly the calculation is made as much as the release displayed on the page.

@ErikMinekus
Copy link
Copy Markdown

Then I think the Per page options should be 10, 25, 50 and 100. Starting at 10 gives a more accurate Total Downloads count, and 100 is the maximum the GitHub API accepts.

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.

3 participants