benweet/github là dự án mã nguồn mở trên GitHub, viết chủ yếu bằng JavaScript, với 4 sao. A higher-level wrapper around the Github API. Intended for the browser.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Github.js provides a minimal higher-level wrapper around git's plumbing commands, exposing an API for manipulating GitHub repositories on the file level. It is being developed in the context of Prose, a content editor for GitHub.
This repo is now officially maintained by DevelopmentSeed, the people behind Prose.io.
Installation
Either grab github.js from this repo or install via NPM:
npm install github-api
Usage
Create a Github instance.
var github = new Github({
username: "YOU_USER",
password: "YOUR_PASSWORD",
auth: "basic"
});
Or if you prefer OAuth, it looks like this:
var github = new Github({
token: "OAUTH_TOKEN",
auth: "oauth"
});
You can use either:
Authorised App Tokens (via client/secret pairs), used for bigger applications, created in web-flows/on the fly
Personal Access Tokens (simpler to set up), used on command lines, scripts etc, created in GitHub web UI
See these pages for more info:
Creating an access token for command-line use
[Github API OAuth Overview] (http://developer.github.com/v3/oauth)
Repository API
var repo = github.getRepo(username, reponame);
Show repository information
repo.show(function(err, repo) {});
Get contents at a particular path in a particular branch. Set sync to true to get contents via sync method.
Updating the contents of a Git. Please consult the documentation on GitHub.
var delta = {
"description": "the description for this gist",
"files": {
"file1.txt": {
"content": "updated file contents"
},
"old_name.txt": {
"filename": "new_name.txt",
"content": "modified contents"
},
"new_file.txt": {
"content": "a new file"
},
"delete_this_file.txt": null
}
};
gist.update(delta, function(err, gist) {
});
Issues API
var issues = github.getIssues(username, reponame);
To read all the issues of a given repository
issues.list(options, function(err, issues) {});
Tests
Github.js is automatically™ tested by the users of Prose. Because of that, we decided to save some time by not maintaining a test suite. Yes, you heard right. :) However, you can still consider it stable since it is used in production.
##Setup
Github.js has the following dependencies:
Underscore
Base64 (for basic auth). You can leave this if you are not using basic auth.
Có — benweet/github phát hành theo license BSD-3-Clause, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/benweet/github.
benweet/github có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho benweet/github. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
benweet/github dùng license gì?
benweet/github phát hành theo license BSD-3-Clause. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
benweet/github là gì?
benweet/github (benweet/github) là dự án JavaScript trên GitHub. Theo mô tả gốc: A higher-level wrapper around the Github API. Intended for the browser.
Đọc thêm về benweet/github ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/benweet/github là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
github có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về github.