gogs / docs-api

A repository for Gogs API v1 documentation.
135 stars 29 forks source link

/repos/search api returns fewer responses than the "Explore" section #34

Open KShivendu opened 2 years ago

KShivendu commented 2 years ago

The official Gogs v1 /repos/search API seems to be returning fewer responses when compared to the "Explore" section.

For example:

So is there any implicit difference between these routes or is it a bug?

KShivendu commented 2 years ago

Hi,

I did some experiments to find out the difference between the two endpoints. I created 4 types of repos that are supported by Gogs:

https://try.gogs.io/api/v1/repos/search?q=KShivendu&page=1 only returns the public repo and the mirror repo. While the "explore" section shows these along with the "unlisted" repos that the user created.

This seems like the expected behavior. And based on this, the number of visible repos obtained by both the approaches should be the same (excluding the user's own "unlisted" repos).

But then what's causing such a big difference in the number of repos returned by these two endpoints?