@@ -2808,9 +2808,9 @@ paths:
2808
2808
subcategory:
2809
2809
patch:
2810
2810
summary: Update a gist
2811
- description: Allows you to update or delete a gist file and rename gist files.
2812
- Files from the previous version of the gist that aren't explicitly changed
2813
- during an edit are unchanged.
2811
+ description: Allows you to update a gist's description and to update, delete,
2812
+ or rename gist files. Files from the previous version of the gist that aren't
2813
+ explicitly changed during an edit are unchanged.
2814
2814
tags:
2815
2815
- gists
2816
2816
operationId: gists/update
@@ -2826,11 +2826,15 @@ paths:
2826
2826
schema:
2827
2827
properties:
2828
2828
description:
2829
- description: Description of the gist
2829
+ description: The description of the gist.
2830
2830
example: Example Ruby script
2831
2831
type: string
2832
2832
files:
2833
- description: Names of files to be updated
2833
+ description: |-
2834
+ The gist files to be updated, renamed, or deleted. Each `key` must match the current filename
2835
+ (including extension) of the targeted gist file. For example: `hello.py`.
2836
+
2837
+ To delete a file, set the whole file to null. For example: `hello.py : null`.
2834
2838
example:
2835
2839
hello.rb:
2836
2840
content: blah
@@ -2841,10 +2845,10 @@ paths:
2841
2845
nullable: true
2842
2846
properties:
2843
2847
content:
2844
- description: The new content of the file
2848
+ description: The new content of the file.
2845
2849
type: string
2846
2850
filename:
2847
- description: The new filename for the file
2851
+ description: The new filename for the file.
2848
2852
type: string
2849
2853
nullable: true
2850
2854
anyOf:
@@ -2862,13 +2866,24 @@ paths:
2862
2866
type: object
2863
2867
nullable: true
2864
2868
examples:
2865
- default :
2869
+ updateGist :
2866
2870
summary: Updating a gist
2867
2871
value:
2868
- description: An update to a gist
2872
+ description: An updated gist description
2869
2873
files:
2870
2874
README.md:
2871
2875
content: Hello World from GitHub
2876
+ deleteFile:
2877
+ summary: Deleting a gist file
2878
+ value:
2879
+ files:
2880
+ hello.py:
2881
+ renameFile:
2882
+ summary: Renaming a gist file
2883
+ value:
2884
+ files:
2885
+ hello.py:
2886
+ filename: goodbye.py
2872
2887
responses:
2873
2888
'200':
2874
2889
description: Response
@@ -2877,8 +2892,12 @@ paths:
2877
2892
schema:
2878
2893
"$ref": "#/components/schemas/gist-simple"
2879
2894
examples:
2880
- default :
2895
+ updateGist :
2881
2896
"$ref": "#/components/examples/gist"
2897
+ deleteFile:
2898
+ "$ref": "#/components/examples/delete-gist-file"
2899
+ renameFile:
2900
+ "$ref": "#/components/examples/rename-gist-file"
2882
2901
'422':
2883
2902
"$ref": "#/components/responses/validation_failed"
2884
2903
'404':
@@ -65041,19 +65060,218 @@ components:
65041
65060
truncated: false
65042
65061
gist:
65043
65062
value:
65044
- url: https://api.github.com/gists/aa5a315d61ae9438b18d
65045
- forks_url: https://api.github.com/gists/aa5a315d61ae9438b18d/forks
65046
- commits_url: https://api.github.com/gists/aa5a315d61ae9438b18d/commits
65047
- id: aa5a315d61ae9438b18d
65048
- node_id: MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk
65049
- git_pull_url: https://gist.github.com/aa5a315d61ae9438b18d.git
65050
- git_push_url: https://gist.github.com/aa5a315d61ae9438b18d.git
65051
- html_url: https://gist.github.com/aa5a315d61ae9438b18d
65052
- created_at: '2010-04-14T02:15:15Z'
65053
- updated_at: '2011-06-20T11:34:15Z'
65054
- description: Hello World Examples
65063
+ url: https://api.github.com/gists/2decf6c462d9b4418f2
65064
+ forks_url: https://api.github.com/gists/2decf6c462d9b4418f2/forks
65065
+ commits_url: https://api.github.com/gists/2decf6c462d9b4418f2/commits
65066
+ id: 2decf6c462d9b4418f2
65067
+ node_id: G_kwDOBhHyLdZDliNDQxOGYy
65068
+ git_pull_url: https://gist.github.com/2decf6c462d9b4418f2.git
65069
+ git_push_url: https://gist.github.com/2decf6c462d9b4418f2.git
65070
+ html_url: https://gist.github.com/2decf6c462d9b4418f2
65071
+ files:
65072
+ README.md:
65073
+ filename: README.md
65074
+ type: text/markdown
65075
+ language: Markdown
65076
+ raw_url: https://gist.githubusercontent.com/monalisa/2decf6c462d9b4418f2/raw/ac3e6daf176fafe73609fd000cd188e4472010fb/README.md
65077
+ size: 23
65078
+ truncated: false
65079
+ content: Hello world from GitHub
65080
+ public: true
65081
+ created_at: '2022-09-20T12:11:58Z'
65082
+ updated_at: '2022-09-21T10:28:06Z'
65083
+ description: An updated gist description.
65055
65084
comments: 0
65056
- comments_url: https://api.github.com/gists/aa5a315d61ae9438b18d/comments/
65085
+ user:
65086
+ comments_url: https://api.github.com/gists/2decf6c462d9b4418f2/comments
65087
+ owner:
65088
+ login: monalisa
65089
+ id: 104456405
65090
+ node_id: U_kgDOBhHyLQ
65091
+ avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4
65092
+ gravatar_id: ''
65093
+ url: https://api.github.com/users/monalisa
65094
+ html_url: https://github.com/monalisa
65095
+ followers_url: https://api.github.com/users/monalisa/followers
65096
+ following_url: https://api.github.com/users/monalisa/following{/other_user}
65097
+ gists_url: https://api.github.com/users/monalisa/gists{/gist_id}
65098
+ starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo}
65099
+ subscriptions_url: https://api.github.com/users/monalisa/subscriptions
65100
+ organizations_url: https://api.github.com/users/monalisa/orgs
65101
+ repos_url: https://api.github.com/users/monalisa/repos
65102
+ events_url: https://api.github.com/users/monalisa/events{/privacy}
65103
+ received_events_url: https://api.github.com/users/monalisa/received_events
65104
+ type: User
65105
+ site_admin: true
65106
+ forks: []
65107
+ history:
65108
+ - user:
65109
+ login: monalisa
65110
+ id: 104456405
65111
+ node_id: U_kgyLQ
65112
+ avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4
65113
+ gravatar_id: ''
65114
+ url: https://api.github.com/users/monalisa
65115
+ html_url: https://github.com/monalisa
65116
+ followers_url: https://api.github.com/users/monalisa/followers
65117
+ following_url: https://api.github.com/users/monalisa/following{/other_user}
65118
+ gists_url: https://api.github.com/users/monalisa/gists{/gist_id}
65119
+ starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo}
65120
+ subscriptions_url: https://api.github.com/users/monalisa/subscriptions
65121
+ organizations_url: https://api.github.com/users/monalisa/orgs
65122
+ repos_url: https://api.github.com/users/monalisa/repos
65123
+ events_url: https://api.github.com/users/monalisa/events{/privacy}
65124
+ received_events_url: https://api.github.com/users/monalisa/received_events
65125
+ type: User
65126
+ site_admin: true
65127
+ version: 468aac8caed5f0c3b859b8286968
65128
+ committed_at: '2022-09-21T10:28:06Z'
65129
+ change_status:
65130
+ total: 2
65131
+ additions: 1
65132
+ deletions: 1
65133
+ url: https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968
65134
+ truncated: false
65135
+ delete-gist-file:
65136
+ value:
65137
+ url: https://api.github.com/gists/2decf6c462d9b4418f2
65138
+ forks_url: https://api.github.com/gists/2decf6c462d9b4418f2/forks
65139
+ commits_url: https://api.github.com/gists/2decf6c462d9b4418f2/commits
65140
+ id: 2decf6c462d9b4418f2
65141
+ node_id: G_kwDOBhHyLdoAIDg0ODFZDliNDQxOGYy
65142
+ git_pull_url: https://gist.github.com/2decf6c462d9b4418f2.git
65143
+ git_push_url: https://gist.github.com/2decf6c462d9b4418f2.git
65144
+ html_url: https://gist.github.com/2decf6c462d9b4418f2
65145
+ files:
65146
+ public: true
65147
+ created_at: '2022-09-20T12:11:58Z'
65148
+ updated_at: '2022-09-21T10:28:06Z'
65149
+ description: A gist description.
65150
+ comments: 0
65151
+ user:
65152
+ comments_url: https://api.github.com/gists/2decf6c462d9b4418f2/comments
65153
+ owner:
65154
+ login: monalisa
65155
+ id: 104456405
65156
+ node_id: U_kgDOBhHyLQ
65157
+ avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4
65158
+ gravatar_id: ''
65159
+ url: https://api.github.com/users/monalisa
65160
+ html_url: https://github.com/monalisa
65161
+ followers_url: https://api.github.com/users/monalisa/followers
65162
+ following_url: https://api.github.com/users/monalisa/following{/other_user}
65163
+ gists_url: https://api.github.com/users/monalisa/gists{/gist_id}
65164
+ starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo}
65165
+ subscriptions_url: https://api.github.com/users/monalisa/subscriptions
65166
+ organizations_url: https://api.github.com/users/monalisa/orgs
65167
+ repos_url: https://api.github.com/users/monalisa/repos
65168
+ events_url: https://api.github.com/users/monalisa/events{/privacy}
65169
+ received_events_url: https://api.github.com/users/monalisa/received_events
65170
+ type: User
65171
+ site_admin: true
65172
+ forks: []
65173
+ history:
65174
+ - user:
65175
+ login: monalisa
65176
+ id: 104456405
65177
+ node_id: U_kgyLQ
65178
+ avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4
65179
+ gravatar_id: ''
65180
+ url: https://api.github.com/users/monalisa
65181
+ html_url: https://github.com/monalisa
65182
+ followers_url: https://api.github.com/users/monalisa/followers
65183
+ following_url: https://api.github.com/users/monalisa/following{/other_user}
65184
+ gists_url: https://api.github.com/users/monalisa/gists{/gist_id}
65185
+ starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo}
65186
+ subscriptions_url: https://api.github.com/users/monalisa/subscriptions
65187
+ organizations_url: https://api.github.com/users/monalisa/orgs
65188
+ repos_url: https://api.github.com/users/monalisa/repos
65189
+ events_url: https://api.github.com/users/monalisa/events{/privacy}
65190
+ received_events_url: https://api.github.com/users/monalisa/received_events
65191
+ type: User
65192
+ site_admin: true
65193
+ version: 9cc352a89178a6d4
65194
+ committed_at: '2022-09-21T10:28:06Z'
65195
+ change_status:
65196
+ total: 1
65197
+ additions: 0
65198
+ deletions: 1
65199
+ url: https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968
65200
+ truncated: false
65201
+ rename-gist-file:
65202
+ value:
65203
+ url: https://api.github.com/gists/2decf6c462d9b4418f2
65204
+ forks_url: https://api.github.com/gists/2decf6c462d9b4418f2/forks
65205
+ commits_url: https://api.github.com/gists/2decf6c462d9b4418f2/commits
65206
+ id: 2decf6c462d9b4418f2
65207
+ node_id: G_kwDOBhHyLdoAIDg0ODFZDliNDQxOGYy
65208
+ git_pull_url: https://gist.github.com/2decf6c462d9b4418f2.git
65209
+ git_push_url: https://gist.github.com/2decf6c462d9b4418f2.git
65210
+ html_url: https://gist.github.com/2decf6c462d9b4418f2
65211
+ files:
65212
+ goodbye.py:
65213
+ filename: goodbye.py
65214
+ type: application/x-python
65215
+ language: Python
65216
+ raw_url: https://gist.githubusercontent.com/monalisa/8481a81af6b7a2decf6c462d9b4418f2/raw/ac3e6daf176fafe73609fd000cd188e4472010fb/goodbye.py
65217
+ size: 4
65218
+ truncated: false
65219
+ content: "# Hello world"
65220
+ public: true
65221
+ created_at: '2022-09-20T12:11:58Z'
65222
+ updated_at: '2022-09-21T10:28:06Z'
65223
+ description: A gist description.
65224
+ comments: 0
65225
+ user:
65226
+ comments_url: https://api.github.com/gists/2decf6c462d9b4418f2/comments
65227
+ owner:
65228
+ login: monalisa
65229
+ id: 104456405
65230
+ node_id: U_kgDOBhHyLQ
65231
+ avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4
65232
+ gravatar_id: ''
65233
+ url: https://api.github.com/users/monalisa
65234
+ html_url: https://github.com/monalisa
65235
+ followers_url: https://api.github.com/users/monalisa/followers
65236
+ following_url: https://api.github.com/users/monalisa/following{/other_user}
65237
+ gists_url: https://api.github.com/users/monalisa/gists{/gist_id}
65238
+ starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo}
65239
+ subscriptions_url: https://api.github.com/users/monalisa/subscriptions
65240
+ organizations_url: https://api.github.com/users/monalisa/orgs
65241
+ repos_url: https://api.github.com/users/monalisa/repos
65242
+ events_url: https://api.github.com/users/monalisa/events{/privacy}
65243
+ received_events_url: https://api.github.com/users/monalisa/received_events
65244
+ type: User
65245
+ site_admin: true
65246
+ forks: []
65247
+ history:
65248
+ - user:
65249
+ login: monalisa
65250
+ id: 104456405
65251
+ node_id: U_kgyLQ
65252
+ avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4
65253
+ gravatar_id: ''
65254
+ url: https://api.github.com/users/monalisa
65255
+ html_url: https://github.com/monalisa
65256
+ followers_url: https://api.github.com/users/monalisa/followers
65257
+ following_url: https://api.github.com/users/monalisa/following{/other_user}
65258
+ gists_url: https://api.github.com/users/monalisa/gists{/gist_id}
65259
+ starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo}
65260
+ subscriptions_url: https://api.github.com/users/monalisa/subscriptions
65261
+ organizations_url: https://api.github.com/users/monalisa/orgs
65262
+ repos_url: https://api.github.com/users/monalisa/repos
65263
+ events_url: https://api.github.com/users/monalisa/events{/privacy}
65264
+ received_events_url: https://api.github.com/users/monalisa/received_events
65265
+ type: User
65266
+ site_admin: true
65267
+ version: 468aac8caed5f0c3b859b8286968
65268
+ committed_at: '2022-09-21T10:28:06Z'
65269
+ change_status:
65270
+ total: 0
65271
+ additions: 0
65272
+ deletions: 0
65273
+ url: https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968
65274
+ truncated: false
65057
65275
gist-comment-items:
65058
65276
value:
65059
65277
- id: 1
0 commit comments