# REST API 的库

可以使用官方 Octokit 库和其他第三方库来扩展和简化使用 GitHub API 的方式。

## 库简介

可以使用库来扩展和简化应用程序与 GitHub API 交互的方式。 每个库都为特定编程语言提供预生成的代码。 将库集成到项目中后，可以使用预生成的代码模块通过特定编程语言与 GitHub API 交互。

GitHub 负责维护某些语言的官方 Octokit 库。 还有第三方库可与 GitHub 的 API 一起使用，GitHub 不负责维护这些库。

## 官方 GitHub 库

GitHub 负责维护 GitHub API 的这些官方客户端库。 这些存储库open source，欢迎社区贡献。

有关详细信息，请参阅 [使用 REST API 和 JavaScript 编写脚本](/zh/enterprise-server@3.22/rest/guides/scripting-with-the-rest-api-and-javascript) 和 [使用 REST API 和 Ruby 编写脚本](/zh/enterprise-server@3.22/rest/guides/scripting-with-the-rest-api-and-ruby)。

* JavaScript：[octokit.js](https://github.com/octokit/octokit.js)
* Ruby：[octokit.rb](https://github.com/octokit/octokit.rb)
* .NET：[octokit.net](https://github.com/octokit/octokit.net)
* Terraform：[terraform-provider-github](https://github.com/integrations/terraform-provider-github)

<!-- markdownlint-disable GHD034 -->

## 第三方库

以下是可用于以各种编程语言与 GitHub API 进行交互的第三方库示例。

GitHub 不负责维护这些第三方库。 第三方提供的库受单独的服务条款、隐私政策和支持文档管辖。

### Clojure

* Tentacles：[clj-commons/tentacles](https://github.com/clj-commons/tentacles)

### Dart

* github.dart：[SpinlockLabs/github.dart](https://github.com/SpinlockLabs/github.dart)

### Emacs Lisp

* gh.el：[sigma/gh.el](https://github.com/sigma/gh.el)

### Go

* go-github：[google/go-github](https://github.com/google/go-github)

### Haskell

* haskell-github：[haskell-github/github](https://github.com/fpco/github)

### Java

* GitHub API for Java，面向对象的GitHub API 表示形式：[hub4j/github-api](https://hub4j.github.io/github-api/)
* 基于 Java7 JSON API（JSR-353）的 JCabi GitHub API 简化了运行时GitHub存根的测试，并涵盖整个 API：[github.jcabi.com（个人网站）](https://github.jcabi.com)

### JavaScript

* NodeJS GitHub 库：[pksunkara/octonode](https://github.com/pksunkara/octonode)
* Github.js 封装器用于 GitHub API：[github-tools/github](https://github.com/github-tools/github)
* 适用于 Browser 或 NodeJS 的基于 Promise 的 CoffeeScript 库：[philschatz/github-client](https://github.com/philschatz/github-client)

### Julia

* GitHub.jl： [JuliaWeb/GitHub.jl](https://github.com/JuliaWeb/GitHub.jl)

### OCaml

* ocaml-github： [mirage/ocaml-github](https://github.com/mirage/ocaml-github)

### Perl

* Pithub：[plu/Pithub](https://github.com/plu/Pithub)
* Net：：GitHub： [fayland/perl-net-github](https://github.com/fayland/perl-net-github)

### PHP

* PHP GitHub API：[KnpLabs/php-github-api](https://github.com/KnpLabs/php-github-api)
* GitHub Joomla！ 包：[joomla-framework/github-api](https://github.com/joomla-framework/github-api)
* Laravel的GitHub桥：[GrahamCampbell/Laravel-GitHub](https://github.com/GrahamCampbell/Laravel-GitHub)

### PowerShell

* PowerShellForGitHub：[microsoft/PowerShellForGitHub](https://github.com/microsoft/PowerShellForGitHub)

### Python

* gidgethub：[gidgethub/gidgethub](https://github.com/gidgethub/gidgethub)
* ghapi：[fastai/ghapi](https://github.com/fastai/ghapi)
* PyGithub：[PyGithub/PyGithub](https://github.com/PyGithub/PyGithub)
* libsaas：[duckboard/libsaas](https://github.com/ducksboard/libsaas)
* github3.py：[sigmavirus24/github3.py](https://github.com/sigmavirus24/github3.py)
* agithub：[mozilla/agithub](https://github.com/mozilla/agithub)
* github-flask：[github-flask（官方网站）](http://github-flask.readthedocs.org)
* githubkit：[yanyongyu/githubkit](https://github.com/yanyongyu/githubkit)
* octokit.py：[khornberg/octokit.py](https://github.com/khornberg/octokit.py)

### Ruby

* GitHub API Gem：[piotrmurach/github](https://github.com/piotrmurach/github)

### Rust

* Octocrab：[XAMPPRocky/octocrab](https://github.com/XAMPPRocky/octocrab)

### Scala

* Github4s：[47deg/github4s](https://github.com/47deg/github4s)

### Shell

* ok.sh：[whiteinge/ok.sh](https://github.com/whiteinge/ok.sh)