:path. If you omit:path, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories.:path points to a symlink, and the symlink's target is a normal file in the repository, then thesubmodule_git_url identifies the location of the submodule repository, and the sha identifies a specificgit_url and _links["git"]) and thehtml_url and _links["html"]) will have null values.Authorization: Bearer ********************curl --location --request GET 'https://api.github.com/repos///contents/' \
--header 'Authorization: Bearer <token>'[
{
"_links": {
"git": "http://example.com",
"html": "http://example.com",
"self": "http://example.com"
},
"content": "string",
"download_url": "http://example.com",
"git_url": "http://example.com",
"html_url": "http://example.com",
"name": "string",
"path": "string",
"sha": "string",
"size": 0,
"type": "string",
"url": "http://example.com"
}
]
【GitHub】API开发者 微信交流群
用微信扫右侧二维码,加入【GitHub】API开发者 交流群,互助沟通

扫码加入交流群