Github API sorting search results by the created_at field

前端 未结 2 403
长情又很酷
长情又很酷 2021-01-13 03:43

How can I create a search query sorted by the created_at field? I\'ve tried:

https://api.github.com/search/repositories?q=blog&sort=created_         


        
2条回答
  •  Happy的楠姐
    2021-01-13 04:07

    The sort parameter only takes one of three values: stars, forks or updated:

    The sort field. One of stars, forks, or updated. Default: results are sorted by best match.

    It doesn't appear to be possible to sort by creation date, but you could read the response of the search query into an array and sort from there.

提交回复
热议问题