From 9a5be1790c41407bcfd1949ca446a605b0a4badc Mon Sep 17 00:00:00 2001 From: MehdiZahwa <45953758+MehdiZahwa@users.noreply.github.com> Date: Tue, 21 Jul 2020 22:05:09 +0100 Subject: [PATCH] Update README.md Requests that return multiple items will be paginated to 30 items by default. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e04ba0a..fa1ba07 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,11 @@ Fetching trending repositories simply translates to fetching the most starred re https://api.github.com/search/repositories?q=created:>{date}&sort=stars&order=desc ``` -The JSON data from Github will be paginated (you'll receive around 100 repos per JSON page). You can ignore the subsequent pages since you only need the first 100 repositories. +The JSON data from Github will be paginated (By default, you'll receive around 30 repos per JSON page). You can change that and set a custom page size up to 100 by adding the ?per_page parameter. + +``` +https://api.github.com/search/repositories?q=created:>{date}&sort=stars&order=desc&per_page=100 +``` If you want to learn more about the Github API, you can click on the following [link](https://developer.github.com/v3/).