Closed
Description
When I use SearchService.Repositories like this, there is a error.
client := github.NewClient(nil)
rs, _, err := client.Search.Repositories(context.Background(), "language:golang+stars:>=200+pushed:>=2018-01-01",
&github.SearchOptions{Sort: "stars", Order: "desc", ListOptions: github.ListOptions{Page: 2, PerPage: 100}})
......
Error:
GET https://api.github.com/search/repositories?order=desc&page=2&per_page=100&q=language%3Agolang%2Bstars%3A%3E%3D200%2Bpushed%3A%3E%3D2018-01-01&sort=stars: 422 Validation Failed [{Resource:Search Field:q Code:invalid Message:None of the search qualifiers apply to this search type.}]
The right URL is https://api.github.com/search/repositories?q=language:golang+pushed:%3E2018-01-01+stars:%3E=200&sort=stars&order=desc&page=2&per_page=100
, not https://api.github.com/search/repositories?order=desc&page=2&per_page=100&q=language%3Agolang%2Bstars%3A%3E%3D200%2Bpushed%3A%3E%3D2018-01-01&sort=stars
.
Metadata
Metadata
Assignees
Labels
No labels