【问题标题】:Get programmingLanguage and topic for Github repo via API通过 API 获取 Github repo 的编程语言和主题
【发布时间】:2017-06-06 13:48:10
【问题描述】:

如何通过 REST API 获取 Github Repo 的 repo-languagetopic。我查看了 - https://developer.github.com/v3/ 下的文档,但没有得到答案。

【问题讨论】:

    标签: github-api


    【解决方案1】:

    刚刚找到了一种搜索主题的方法,如下所示。当然它现在需要一个自定义的媒体类型。

    来自documentation

    curl -H "Authentication: token TOKEN" \
    -H "Accept: application/vnd.github.mercy-preview+json" \
    https://api.github.com/search/repositories?q=topic:ruby+topic:rails
    

    对于语言,它只是如下 URL: https://api.github.com/repos/postgres/pgadmin4/languages

    【讨论】:

      猜你喜欢
      • 2015-11-17
      • 2022-01-17
      • 2017-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-22
      • 2021-10-06
      • 1970-01-01
      相关资源
      最近更新 更多