3

我正在使用以下内容通过查询名称“android”搜索存储库

{
  search(query: "android", type: REPOSITORY, first: 50) {
    repositoryCount
    edges {

      node {
        ... on Repository {
          id
          name
          description
          forkCount
          owner{
            avatarUrl
          }
        }
      }
    }
  }
}

如何获取 REPOSITORY 订阅者数量和订阅者列表

提前致谢 :)

4

2 回答 2

1

您正在寻找观察者,v3 中使用的术语是,subscribers检查:

{
  search(query: "android", type: REPOSITORY, first: 50) {
    repositoryCount
    edges {
      node {
        ... on Repository {
          nameWithOwner
          watchers(first: 100) {
            totalCount
            nodes{
              login
            }
          }
        }
      }
    }
  }
}

在资源管理器中尝试

于 2018-10-28T18:22:44.357 回答
0

GitHub API本身没有“订阅者”的概念(最多是过去 14 天的克隆数

GraphQL 本身具有订阅的概念,如此处所述,但它们不适用于“存储库”。

于 2018-10-21T04:51:23.223 回答