Update a gist
PATCH
/gists/{gist_id}
gists
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://api.github.com/gists/' \
--header 'Content-Type: application/json' \
--data-raw '{}'
响应示例响应示例
200 - 示例 1
{
"comments": 0,
"comments_url": "string",
"commits_url": "string",
"created_at": "string",
"description": "string",
"files": {
"property1": {
"content": "string",
"filename": "string",
"language": "string",
"raw_url": "string",
"size": 0,
"truncated": true,
"type": "string"
},
"property2": {
"content": "string",
"filename": "string",
"language": "string",
"raw_url": "string",
"size": 0,
"truncated": true,
"type": "string"
}
},
"fork_of": {
"comments": 0,
"comments_url": "http://example.com",
"commits_url": "http://example.com",
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"files": {
"property1": {
"filename": "string",
"language": "string",
"raw_url": "string",
"size": 0,
"type": "string"
},
"property2": {
"filename": "string",
"language": "string",
"raw_url": "string",
"size": 0,
"type": "string"
}
},
"forks": [
null
],
"forks_url": "http://example.com",
"git_pull_url": "http://example.com",
"git_push_url": "http://example.com",
"history": [
null
],
"html_url": "http://example.com",
"id": "string",
"node_id": "string",
"owner": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"public": true,
"truncated": true,
"updated_at": "2019-08-24T14:15:22Z",
"url": "http://example.com",
"user": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
}
},
"forks": [
{}
],
"forks_url": "string",
"git_pull_url": "string",
"git_push_url": "string",
"history": [
{}
],
"html_url": "string",
"id": "string",
"node_id": "string",
"owner": {
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"gravatar_id": "41d064eb2195891e12d0413f63227ea7",
"html_url": "https://github.com/octocat",
"id": 1,
"login": "octocat",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"repos_url": "https://api.github.com/users/octocat/repos",
"site_admin": true,
"starred_at": "\"2020-07-09T00:17:55Z\"",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"type": "User",
"url": "https://api.github.com/users/octocat"
},
"public": true,
"truncated": true,
"updated_at": "string",
"url": "string",
"user": "string"
}
请求参数
Path 参数
gist_id
string
必需
Body 参数application/json