對不起,如果這是顯而易見的,但我無法弄清楚這個鍵是什麼!Github API(V3)內容sha鍵
{
"type": "file",
"encoding": "base64",
"size": 5362,
"name": "README.md",
"path": "README.md",
"content": "encoded content ...",
"sha": "3d21ec53a331a6f037a91c368710b99387d012c1", <<THIS KEY>>
"url": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md",
"git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"html_url": "https://github.com/octokit/octokit.rb/blob/master/README.md",
"download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md",
"_links": {
"git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1",
"self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md",
"html": "https://github.com/octokit/octokit.rb/blob/master/README.md"
}
}
我標記了密鑰<>以提供幫助。
https://developer.github.com/v3/repos/contents/#get-contents
這可能是提交哈希? – maggick
否則它可能是[sha算法](http://en.wikipedia.org/wiki/Secure_Hash_Algorithm)用於驗證目的。 – maggick
它不是提交哈希。這個JSON表示* blob *,而不是提交。見下文。 – Chris