
    #Ii8                     r    S SK rS SKrS SKrS SKrS SKrS SKr " S S\R                  R                  5      r	g)    Nc                      \ rS rSrSrS r\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rS rS rS r\R<                  R>                  \R<                  R>                  4S jr S r!S r"S r#S r$S r%S  r&S! r'S"r(g#)$Gist*   zn
This class represents Gists. The reference can be found here https://docs.github.com/en/rest/reference/gists
c                 P    U R                  SU R                  R                  05      $ )Nid)get__repr___idvalueselfs    1/venv/lib/python3.13/site-packages/github/Gist.py__repr__Gist.__repr__/   s     txx~~ 677    c                 d    U R                  U R                  5        U R                  R                  $ )z
:type: integer
)_completeIfNotSet	_commentsr
   r   s    r   commentsGist.comments2   &    
 	t~~.~~###r   c                 d    U R                  U R                  5        U R                  R                  $ z
:type: string
)r   _comments_urlr
   r   s    r   comments_urlGist.comments_url:   *    
 	t112!!'''r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _commits_urlr
   r   s    r   commits_urlGist.commits_urlB   *    
 	t001  &&&r   c                 d    U R                  U R                  5        U R                  R                  $ z
:type: datetime.datetime
)r   _created_atr
   r   s    r   
created_atGist.created_atJ   *    
 	t//0%%%r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _descriptionr
   r   s    r   descriptionGist.descriptionR   r!   r   c                 N    U R                  5         U R                  R                  $ )z<
:type: dict of string to :class:`github.GistFile.GistFile`
)_completeIfNeeded_filesr
   r   s    r   files
Gist.filesZ   s     
 	 {{   r   c                 d    U R                  U R                  5        U R                  R                  $ )z"
:type: :class:`github.Gist.Gist`
)r   _fork_ofr
   r   s    r   fork_ofGist.fork_ofb   &    
 	t}}-}}"""r   c                 d    U R                  U R                  5        U R                  R                  $ )z*
:type: list of :class:`github.Gist.Gist`
)r   _forksr
   r   s    r   forks
Gist.forksj   &    
 	t{{+{{   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   
_forks_urlr
   r   s    r   	forks_urlGist.forks_urlr   s&    
 	t/$$$r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _git_pull_urlr
   r   s    r   git_pull_urlGist.git_pull_urlz   r   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _git_push_urlr
   r   s    r   git_push_urlGist.git_push_url   r   r   c                 d    U R                  U R                  5        U R                  R                  $ )zB
:type: list of :class:`github.GistHistoryState.GistHistoryState`
)r   _historyr
   r   s    r   historyGist.history   r5   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   	_html_urlr
   r   s    r   html_urlGist.html_url   r   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   r	   r
   r   s    r   r   Gist.id   s$    
 	txx(xx~~r   c                 d    U R                  U R                  5        U R                  R                  $ z,
:type: :class:`github.NamedUser.NamedUser`
)r   _ownerr
   r   s    r   owner
Gist.owner   r:   r   c                 d    U R                  U R                  5        U R                  R                  $ )z
:type: bool
)r   _publicr
   r   s    r   publicGist.public   s&    
 	t||,||!!!r   c                 d    U R                  U R                  5        U R                  R                  $ r#   )r   _updated_atr
   r   s    r   
updated_atGist.updated_at   r'   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _urlr
   r   s    r   urlGist.url   s$    
 	tyy)yyr   c                 d    U R                  U R                  5        U R                  R                  $ rR   )r   _userr
   r   s    r   user	Gist.user   s&    
 	tzz*zzr   c                     [        U[        5      (       d   U5       eSU0nU R                  R                  SU R                   S3US9u  p4[
        R                  R                  U R                  X4SS9$ )z
:calls: `POST /gists/{gist_id}/comments <https://docs.github.com/en/rest/reference/gists#comments>`_
:param body: string
:rtype: :class:`github.GistComment.GistComment`
bodyPOST	/commentsinputT	completed)
isinstancestr
_requesterrequestJsonAndCheckr`   githubGistComment)r   rg   post_parametersheadersdatas        r   create_commentGist.create_comment   s     $$$*d*$D
 ;;txxj	*/ < 
 !!--OOWd . 
 	
r   c                     U R                   R                  SU R                   S35      u  p[        U R                   XSS9$ )zw
:calls: `POST /gists/{id}/forks <https://docs.github.com/en/rest/reference/gists>`_
:rtype: :class:`github.Gist.Gist`
rh   z/forksTrl   )rp   rq   r`   r   r   ru   rv   s      r   create_forkGist.create_fork   s;    
 ;;FtxxjPVDWXDOOWdCCr   c                 T    U R                   R                  SU R                  5      u  pg)z^
:calls: `DELETE /gists/{id} <https://docs.github.com/en/rest/reference/gists>`_
:rtype: None
DELETENrp   rq   r`   rz   s      r   deleteGist.delete   s"    
 ;;HdhhOr   c                    U[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d,  [        S UR                  5        5       5      (       d   U5       e[        5       nU[         R                  R                  La  XS'   U[         R                  R                  La7  UR                  5        VVs0 s H  u  pEXEc  SOUR                  _M     snnUS'   U R                  R                  SU R                  US9u  pgU R                  U5        gs  snnf )z
:calls: `PATCH /gists/{id} <https://docs.github.com/en/rest/reference/gists>`_
:param description: string
:param files: dict of string to :class:`github.InputFileContent.InputFileContent`
:rtype: None
c              3   l   #    U  H*  nUS L =(       d    [        U[        R                  5      v   M,     g 7fN)rn   rr   InputFileContent).0elements     r   	<genexpr>Gist.edit.<locals>.<genexpr>   s0      :
) tOKz'63J3JKK)s   24r*   Nr/   PATCHrj   )rr   GithubObjectNotSetrn   ro   allvaluesdictitems	_identityrp   rq   r`   _useAttributes)r   r*   r/   rt   keyr
   ru   rv   s           r   edit	Gist.edit   s3    f11888J=
 =
 		 
 ++222c :
 <<>:
 7
 7
 	 	 
 &f11888-8M*++222 #(++-("/JC ]T?"/(OG$ ;;TXX_ < 
 	D!(s   D;c                     [        U[        5      (       d   U5       eU R                  R                  SU R                   SU 35      u  p#[
        R                  R                  U R                  X#SS9$ )z
:calls: `GET /gists/{gist_id}/comments/{id} <https://docs.github.com/en/rest/reference/gists#comments>`_
:param id: integer
:rtype: :class:`github.GistComment.GistComment`
GETz
/comments/Trl   )rn   intrp   rq   r`   rr   rs   )r   r   ru   rv   s       r   get_commentGist.get_comment  sq     "c""&B&";;dhhZz".
 !!--OOWd . 
 	
r   c                     [         R                  R                  [         R                  R                  U R                  U R                   S3S5      $ )z
:calls: `GET /gists/{gist_id}/comments <https://docs.github.com/en/rest/reference/gists#comments>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GistComment.GistComment`
ri   N)rr   PaginatedListrs   rp   r`   r   s    r   get_commentsGist.get_comments  sD    
 ##11**OOxxj	"	
 	
r   c                 d    U R                   R                  SU R                   S35      u  pnUS:H  $ )z`
:calls: `GET /gists/{id}/star <https://docs.github.com/en/rest/reference/gists>`_
:rtype: bool
r   /star   )rp   requestJsonr`   )r   statusru   rv   s       r   
is_starredGist.is_starred!  s4    
 !% ; ;EdhhZuCU V}r   c                 Z    U R                   R                  SU R                   S35      u  pg)zc
:calls: `DELETE /gists/{id}/star <https://docs.github.com/en/rest/reference/gists>`_
:rtype: None
r~   r   Nr   rz   s      r   reset_starredGist.reset_starred)  s,    
 ;;
%(
r   c                 Z    U R                   R                  SU R                   S35      u  pg)z`
:calls: `PUT /gists/{id}/star <https://docs.github.com/en/rest/reference/gists>`_
:rtype: None
PUTr   Nr   rz   s      r   set_starredGist.set_starred2  s)    
 ;;EdhhZuCUVr   c                    [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l	        [         R                  R                  U l
        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        g r   )rr   r   r   r   r   r   r$   r)   r.   r2   r7   r<   r@   rD   rH   rL   r	   rS   rW   r[   r_   rc   r   s    r   _initAttributesGist._initAttributes9  sr   ,,33#0077"//66!..55"//66))00++22))00 --44#0077#0077++22,,33&&--))00**11!..55''..	((//
r   c                 |   SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a2  U R                  [        R                  R                  US   5      U l        SU;   a  U R                  [        US   5      U l        SU;   a  U R                  [        US   5      U l        S	U;   a  U R                  US	   5      U l        S
U;   a  U R                  US
   5      U l        SU;   a  U R                  US   5      U l        SU;   a2  U R                  [        R(                  R(                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a2  U R                  [        R0                  R0                  US   5      U l        SU;   a  U R5                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a3  U R                  [        R0                  R0                  US   5      U l        g g )Nr   r   r   r%   r*   r/   r3   r8   r=   rA   rE   rI   rM   r   rT   rX   r\   r`   rd   )_makeIntAttributer   _makeStringAttributer   r   _makeDatetimeAttributer$   r)   $_makeDictOfStringsToClassesAttributerr   GistFiler.   _makeClassAttributer   r2   _makeListOfClassesAttributer7   r<   r@   rD   GistHistoryStaterH   rL   r	   	NamedUserrS   _makeBoolAttributerW   r[   r_   rc   )r   
attributess     r   r   Gist._useAttributesN  s   #!33Jz4JKDNZ'!%!:!::n;U!VDJ& $ 9 9*]:S TD:%#:::l;STDJ& $ 9 9*]:S TDj CC((*W*=DK 
" 44T:i;PQDMj ::4GATUDK*$"77
;8OPDOZ'!%!:!::n;U!VDZ'!%!:!::n;U!VD
" <<''88*Y:ODM #!66z*7MNDN:00D1ABDHj 22  **Jw,?DK z!22:h3GHDL:%#:::l;STDJ11*U2CDDIZ11  **Jv,>DJ  r   )r   r   r   r$   r)   r.   r2   r7   r<   r@   rD   rH   rL   r	   rS   rW   r[   r_   rc   N))__name__
__module____qualname____firstlineno____doc__r   propertyr   r   r   r%   r*   r/   r3   r8   r=   rA   rE   rI   rM   r   rT   rX   r\   r`   rd   rw   r{   r   rr   r   r   r   r   r   r   r   r   r   r   __static_attributes__ r   r   r   r   *   s   8 $ $ ( ( ' ' & & ' ' ! ! # # ! ! % % ( ( ( ( # # $ $   ! ! " " & &      
"DP !--44F<O<O<V<V":



W0*.r   r   )
github.GistCommentrr   github.GistFilegithub.GistHistoryStategithub.GithubObjectgithub.NamedUsergithub.PaginatedListr   CompletableGithubObjectr   r   r   r   <module>r      s4   D      R666 Rr   