@@ -228,87 +228,6 @@ def unstar(self):
228
228
return self ._boolean (self ._delete (url ), 204 , 404 )
229
229
230
230
231
- class ShortGist (_Gist ):
232
- """Short representation of a gist.
233
-
234
- GitHub's API returns different amounts of information about gists
235
- based upon how that information is retrieved. This object exists to
236
- represent the full amount of information returned for a specific
237
- gist. For example, you would receive this class when calling
238
- :meth:`~github3.github.GitHub.all_gists`. To provide a clear distinction
239
- between the types of gists, github3.py uses different classes with
240
- different sets of attributes.
241
-
242
- This object only has the following attributes:
243
-
244
- .. attribute:: url
245
-
246
- The GitHub API URL for this repository, e.g.,
247
- ``https://api.github.com/gists/6faaaeb956dec3f51a9bd630a3490291``.
248
-
249
- .. attribute:: comments_count
250
-
251
- Number of comments on this gist
252
-
253
- .. attribute:: description
254
-
255
- Description of the gist as written by the creator
256
-
257
- .. attribute:: html_url
258
-
259
- The URL of this gist on GitHub, e.g.,
260
- ``https://gist.github.com/sigmavirus24/6faaaeb956dec3f51a9bd630a3490291``
261
-
262
- .. attribute:: id
263
-
264
- The unique identifier for this gist.
265
-
266
- .. attribute:: public
267
-
268
- This is a boolean attribute describing if the gist is public or
269
- private
270
-
271
- .. attribute:: git_pull_url
272
-
273
- The git URL to pull this gist, e.g.,
274
- ``git://gist.github.com/sigmavirus24/6faaaeb956dec3f51a9bd630a3490291.git``
275
-
276
- .. attribute:: git_push_url
277
-
278
- The git URL to push to gist, e.g.,
279
- ``git@gist.github.com/sigmavirus24/6faaaeb956dec3f51a9bd630a3490291.git``
280
-
281
- .. attribute:: created_at
282
-
283
- This is a datetime object representing when the gist was created.
284
-
285
- .. attribute:: updated_at
286
- This is a datetime object representing the last time this gist was
287
- most recently updated.
288
-
289
- .. attribute:: owner
290
-
291
- This attribute is a :class:`~github3.users.ShortUser` object
292
- representing the creator of the gist.
293
-
294
- .. attribute:: files
295
-
296
- A dictionary mapping the filename to a
297
- :class:`~github3.gists.gist.GistFile` object.
298
-
299
- .. versionchanged:: 1.0.0
300
-
301
- Previously this was a list but it has been converted to a
302
- dictionary to preserve the structure of the API.
303
-
304
- .. attribute:: comments_url
305
-
306
- The URL to retrieve the list of comments on the Gist via the API.
307
- """
308
-
309
- class_name = 'ShortGist'
310
-
311
-
312
231
class GistFork (models .GitHubCore ):
313
232
"""This object represents a forked Gist.
314
233
@@ -409,3 +328,85 @@ def _update_attributes(self, gist):
409
328
self .forks_url = gist ['forks_url' ]
410
329
self .history = [history .GistHistory (h , self ) for h in gist ['history' ]]
411
330
self .truncated = gist ['truncated' ]
331
+
332
+
333
+ class ShortGist (_Gist ):
334
+ """Short representation of a gist.
335
+
336
+ GitHub's API returns different amounts of information about gists
337
+ based upon how that information is retrieved. This object exists to
338
+ represent the full amount of information returned for a specific
339
+ gist. For example, you would receive this class when calling
340
+ :meth:`~github3.github.GitHub.all_gists`. To provide a clear distinction
341
+ between the types of gists, github3.py uses different classes with
342
+ different sets of attributes.
343
+
344
+ This object only has the following attributes:
345
+
346
+ .. attribute:: url
347
+
348
+ The GitHub API URL for this repository, e.g.,
349
+ ``https://api.github.com/gists/6faaaeb956dec3f51a9bd630a3490291``.
350
+
351
+ .. attribute:: comments_count
352
+
353
+ Number of comments on this gist
354
+
355
+ .. attribute:: description
356
+
357
+ Description of the gist as written by the creator
358
+
359
+ .. attribute:: html_url
360
+
361
+ The URL of this gist on GitHub, e.g.,
362
+ ``https://gist.github.com/sigmavirus24/6faaaeb956dec3f51a9bd630a3490291``
363
+
364
+ .. attribute:: id
365
+
366
+ The unique identifier for this gist.
367
+
368
+ .. attribute:: public
369
+
370
+ This is a boolean attribute describing if the gist is public or
371
+ private
372
+
373
+ .. attribute:: git_pull_url
374
+
375
+ The git URL to pull this gist, e.g.,
376
+ ``git://gist.github.com/sigmavirus24/6faaaeb956dec3f51a9bd630a3490291.git``
377
+
378
+ .. attribute:: git_push_url
379
+
380
+ The git URL to push to gist, e.g.,
381
+ ``git@gist.github.com/sigmavirus24/6faaaeb956dec3f51a9bd630a3490291.git``
382
+
383
+ .. attribute:: created_at
384
+
385
+ This is a datetime object representing when the gist was created.
386
+
387
+ .. attribute:: updated_at
388
+ This is a datetime object representing the last time this gist was
389
+ most recently updated.
390
+
391
+ .. attribute:: owner
392
+
393
+ This attribute is a :class:`~github3.users.ShortUser` object
394
+ representing the creator of the gist.
395
+
396
+ .. attribute:: files
397
+
398
+ A dictionary mapping the filename to a
399
+ :class:`~github3.gists.gist.GistFile` object.
400
+
401
+ .. versionchanged:: 1.0.0
402
+
403
+ Previously this was a list but it has been converted to a
404
+ dictionary to preserve the structure of the API.
405
+
406
+ .. attribute:: comments_url
407
+
408
+ The URL to retrieve the list of comments on the Gist via the API.
409
+ """
410
+
411
+ class_name = 'ShortGist'
412
+ _refresh_to = Gist
0 commit comments