Py学习  »  Git

github api v4-按问题数排序存储库

Thayanne Luiza • 6 年前 • 1423 次点击  

如何根据打开的问题数从查询中订购存储库?

https://developer.github.com/v4/input_object/repositoryorder/

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/39828
 
1423 次点击  
文章 [ 1 ]  |  最新文章 6 年前
VonC
Reply   •   1 楼
VonC    6 年前

最好使用 GitHub GraphQL V4

Github为我们的API V4选择了GraphQL,因为它为我们的集成商提供了更大的灵活性。
与rest api v3端点相比,精确定义所需数据和仅定义所需数据的能力是一个强大的优势。 .
GraphQL让您 用一个调用替换多个rest请求以获取指定的数据 .

例如,你可以 get the total number of issues 回购协议:

{
  repository(owner: "facebook", name:"react") {
    issues {
      totalCount 
    }
  }
}

返回:

{
  "data": {
    "repository": {
      "issues": {
        "totalCount": 5308
      }
    }
  }
}

看看这篇文章” Using Github’s GraphQL to retrieve a list of repositories, their commits and some other stuff — part 2 “摘自F_bio Molinar,列出回购协议并应用该过滤器。 .