
    _Ogt                        S r SSKrSSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  SS	KJr   " S
 S\R                  5      r " S S\R                  5      r " S S\R                  5      r " S S\R                  5      r " S S\5      r " S S\5      r " S S\R                  5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S  S!\5      r " S" S#\5      r\R:                  \\\\\\4   rg)$z2This module contains everything relating to Users.    N)dumps)URITemplate   )models)requires_auth)Event)Authorizationc                   :    \ rS rSrSrS rS rS r\S 5       r	Sr
g)	GPGKey   a  The object representing a user's GPG key.

.. versionadded:: 1.2.0

Please see GitHub's `GPG Key Documentation` for more information.

.. _GPG Key Documentation:
    https://developer.github.com/v3/users/gpg_keys/

.. attribute:: can_certify

    Whether this GPG key can be used to sign a key.

.. attribute:: can_encrypt_comms

    Whether this GPG key can be used to encrypt communications.

.. attribute:: can_encrypt_storage

    Whether this GPG key can be used to encrypt storage.

.. attribute:: can_sign

    Whether this GPG key can be used to sign some data.

.. attribute:: created_at

    A :class:`~datetime.datetime` representing the date and time when
    this GPG key was created.

.. attribute:: emails

    A list of :class:`~github3.users.ShortEmail` attached to this GPG
    key.

.. attribute:: expires_at

    A :class:`~datetime.datetime` representing the date and time when
    this GPG key will expire.

.. attribute:: id

    The unique identifier of this GPG key.

.. attribute:: key_id

    A hexadecimal string that identifies this GPG key.

.. attribute:: primary_key_id

    The unique identifier of the primary key of this GPG key.

.. attribute:: public_key

    The public key contained in this GPG key. This is not a GPG formatted
    key, and is not suitable to be used directly in programs like GPG.

.. attribute:: subkeys

    A list of :class:`~github3.users.GPGKey` of the subkeys of this GPG
    key.
c                    US   U l         US   U l        US   U l        US   U l        U R	                  US   5      U l        US    Vs/ s H  n[        X 5      PM     snU l        U R	                  US   5      U l        US   U l	        US	   U l
        US
   U l        US   U l        US    Vs/ s H  n[        X05      PM     snU l        g s  snf s  snf )Ncan_certifycan_encrypt_commscan_encrypt_storagecan_sign
created_atemails
expires_atidkey_idprimary_key_id
public_keysubkeys)r   r   r   r   	_strptimer   
ShortEmailr   r   r   r   r   r   r   r   )selfkeyemailsubkeys       R/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/users.py_update_attributesGPGKey._update_attributesM   s    }-!$%8!9#&'<#= J..\):;<?MJM5z%.MJ..\):;d)(m!"23l+;>y>J>v,>J K Ks   	C.Cc                 "    SU R                    S3$ )Nz
<GPG Key []>r   r   s    r    _reprGPGKey._repr[   s    DKK=++    c                     U R                   $ Nr%   r&   s    r    __str__GPGKey.__str__^   s    {{r)   c                     U R                  SSU R                  5      nU R                  U R                  U5      SS5      $ )zYDelete this GPG key.

:returns:
    True if successful, False otherwise
:rtype:
    bool
usergpg_keys     )
_build_urlr   _boolean_deleter   urls     r    deleteGPGKey.deletea   s6     oofj$'':}}T\\#.S99r)   )r   r   r   r   r   r   r   r   r   r   r   r   N)__name__
__module____qualname____firstlineno____doc__r!   r'   r,   r   r8   __static_attributes__ r)   r    r   r      s,    =~K, 	: 	:r)   r   c                   N    \ rS rSrSrS
S jrS rS r\S 5       r	\S 5       r
S	rg)Keyn   aq  The object representing a user's SSH key.

Please see GitHub's `Key Documentation`_ for more information.

.. _Key Documentation:
    http://developer.github.com/v3/users/keys/

.. versionchanged:: 1.0.0

    Removed ``title`` attribute

.. attribute:: key

    A string containing the actual text of the SSH Key

.. attribute:: id

    GitHub's unique ID for this key
Nc                 X    UR                  S5      U l        US   U l        US   U l        g )Nr7   r   r   )get_apir   r   )r   r   sessions      r    r!   Key._update_attributes   s'    GGEN	u:d)r)   c                 "    SU R                    S3$ )Nz<User Key [r$   )titler&   s    r    r'   	Key._repr   s    TZZL++r)   c                     U R                   $ r+   )r   r&   s    r    r,   Key.__str__   s    xxr)   c                 Z    U R                  U R                  U R                  5      SS5      $ )zDelete this key.r1   r2   )r4   r5   rF   r&   s    r    r8   
Key.delete   s$     }}T\\$))4c3??r)   c                     SnU(       a>  U(       a7  XS.nU R                  U R                  U R                  [        U5      S9S5      nU(       a  U R	                  U5        gg)a  Update this key.

.. warning::

    As of 20 June 2014, the API considers keys to be immutable.
    This will soon begin to return MethodNotAllowed errors.

:param str title: (required), title of the key
:param str key: (required), text of the key file
:returns: bool
N)rJ   r   data   TF)_json_patchrF   r   r!   )r   rJ   r   jsonrR   s        r    update
Key.update   sR     S"/D::dkk$))%+kFLD##D)r)   )rF   r   r   r+   )r:   r;   r<   r=   r>   r!   r'   r,   r   r8   rW   r?   r@   r)   r    rB   rB   n   s@    (
, @ @  r)   rB   c                   0    \ rS rSrSrS rS rS rS rSr	g)	Plan   a4  The :class:`Plan <Plan>` object.

Please see GitHub's `Authenticated User`_ documentation for more details.

.. _Authenticated User:
    http://developer.github.com/v3/users/#get-the-authenticated-user

.. attribute:: collaborators_count

    .. versionchanged:: 1.0.0

    The number of collaborators allowed on this plan

.. attribute:: name

    The name of the plan on GitHub

.. attribute:: private_repos_count

    .. versionchanged:: 1.0.0

    The number of allowed private repositories

.. attribute:: space

    The amount of space allotted by this plan
c                 T    US   U l         US   U l        US   U l        US   U l        g )Ncollaboratorsnameprivate_reposspacer]   r^   private_repos_countr`   )r   plans     r    r!   Plan._update_attributes   s2    !/2L	#'#8 ']
r)   c                 "    SU R                    S3$ )Nz<Plan [r$   r^   r&   s    r    r'   
Plan._repr   s    2&&r)   c                     U R                   $ r+   rf   r&   s    r    r,   Plan.__str__   s    yyr)   c                      U R                   S:H  $ )z.Check if this is a free plan.

:returns: bool
freerf   r&   s    r    is_freePlan.is_free   s    
 yyF""r)   ra   N)
r:   r;   r<   r=   r>   r!   r'   r,   rl   r?   r@   r)   r    rZ   rZ      s    8#'#r)   rZ   c                   .    \ rS rSrSrS rS rS rS rSr	g)_Email   zBase email object.c                 ,    US   U l         US   U l        g )Nr   verifiedr   rr   )r   r   s     r    r!   _Email._update_attributes   s    7^
j)r)   c                 <    SU R                    SU R                   S3$ )N<z [r$   )
class_namer   r&   s    r    r'   _Email._repr   s     4??#2djj\44r)   c                     U R                   $ r+   r   r&   s    r    r,   _Email.__str__       zzr)   rs   N)
r:   r;   r<   r=   r>   rw   r!   r'   r,   r?   r@   r)   r    ro   ro      s    J*5r)   ro   c                       \ rS rSrSrS rSrg)r      a  The object used to represent an email attached to a GPG key.

This object has the following attributes:

.. attribute:: email

    The email address as a string

.. attribute:: verified

    A boolean value representing whether the address has been verified or
    not
r@   N)r:   r;   r<   r=   r>   rw   r?   r@   r)   r    r   r      s     Jr)   r   c                   8   ^  \ rS rSrSrU 4S jrS rS rSrU =r	$ )Email   a]  The object used to represent an AuthenticatedUser's email.

Please see GitHub's `Emails documentation`_ for more information.

.. _Emails documentation:
    https://developer.github.com/v3/users/emails/

This object has all of the attributes of :class:`ShortEmail` as well as
the following attributes:

.. attribute:: primary

    A boolean value representing whether the address is the primary
    address for the user or not

.. attribute:: visibility

    A string value representing whether an authenticated user can view the
    email address. Use ``public`` to allow it, ``private`` to disallow it.
c                 L   > [         TU ]  U5        US   U l        US   U l        g )Nprimary
visibility)superr!   r   r   )r   r   	__class__s     r    r!   Email._update_attributes  s(    "5)Y'-r)   c                 "    SU R                    S3$ )Nz<Email [r$   rz   r&   s    r    r'   Email._repr  s    $**R((r)   c                     U R                   $ r+   rz   r&   s    r    r,   Email.__str__  r|   r)   )r   r   )
r:   r;   r<   r=   r>   r!   r'   r,   r?   __classcell__r   s   @r    r   r      s    *.
) r)   r   c                   .   \ rS rSrSrS rS rS rS rS r	S r
SS	 jrSS
 jrSS jrSS jrSS jr\SS j5       rSS jrSS jr SS jrSS jr\S 5       r\SS j5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rSrg) _Useri  a&  The :class:`User <User>` object.

This handles and structures information in the `User section`_.

Two user instances can be checked like so::

    u1 == u2
    u1 != u2

And is equivalent to::

    u1.id == u2.id
    u1.id != u2.id

.. _User section:
    http://developer.github.com/v3/users/
c                    US   U l         [        US   5      U l        US   U l        [        US   5      U l        [        US   5      U l        US   U l        US   U l        US   U l        US	   U l	        US
   U l
        US   U l        US   U l        UR                  S5      U l        [        US   5      U l        US   U l        US   U l        US   =U l        U l        U R                  U l        g )N
avatar_url
events_urlfollowers_urlfollowing_url	gists_urlgravatar_idhtml_urlr   loginorganizations_urlreceived_events_url	repos_url
site_adminstarred_urlsubscriptions_urltyper7   )r   r   events_urltr   following_urlt
gists_urltr   r   r   r   r   r   r   rE   r   starred_urltr   r   r7   rF   _uniq)r   r/   s     r    r!   _User._update_attributes4  s    |,&tL'9:!/2)$*?@%d;&78.Z(t*']
!%&9!:#'(=#> k*((<0'](;<!%&9!:L	#E{*49WW
r)   c                     U R                   $ r+   )r   r&   s    r    r,   _User.__str__H  r|   r)   c                 N    Sn[        U SS 5      nUb  SU 3nSR                  XS9$ )N r^   :z'<{s.class_name} [{s.login}{full_name}]>)s	full_name)getattrformat)r   r   r^   s      r    r'   _User._reprK  sB    	tVT*D6
I8?? @ 
 	
r)   c                     U R                  SXSU R                  5      nU R                  U R                  U5      SS5      $ )zCheck if this user can be assigned to issues on username/repository.

:param str username: owner's username of the repository
:param str repository: name of the repository
:returns: True if the use can be assigned, False otherwise
:rtype: :class:`bool`
repos	assigneesr1   r2   )r3   r   r4   _get)r   username
repositoryr7   s       r    is_assignee_on_User.is_assignee_onT  s<     ooX;


 }}TYYs^S#66r)   c                 x    U R                   R                  US9nU R                  U R                  U5      SS5      $ )z_Check if this user is following ``username``.

:param str username: (required)
:returns: bool

)
other_userr1   r2   )r   expandr4   r   )r   r   r7   s      r    is_following_User.is_followinga  s8     !!((H(=}}TYYs^S#66r)   Nc                     S/nU(       a  UR                  S5        U R                  " USU R                  06nU R                  [	        U5      U[
        US9$ )a  Iterate over events performed by this user.

:param bool public: (optional), only list public events for the
    authenticated user
:param int number: (optional), number of events to return. Default: -1
    returns all available events.
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`Event <github3.events.Event>`\ s
eventspublicbase_urletagappendr3   rF   _iterintr   r   r   numberr   pathr7   s         r    r   _User.eventsk  sL     zKK!oot8dii8zz#f+sEz==r)   c                 t    U R                  SU R                  S9nU R                  [        U5      U[        US9$ )a  Iterate over the followers of this user.

:param int number: (optional), number of followers to return. Default:
    -1 returns all available
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`User <User>`\ s
	followersr   r   r3   rF   r   r   	ShortUserr   r   r   r7   s       r    r   _User.followers|  5     ookDIIo>zz#f+sIDzAAr)   c                 t    U R                  SU R                  S9nU R                  [        U5      U[        US9$ )a  Iterate over the users being followed by this user.

:param int number: (optional), number of users to return. Default: -1
    returns all available users
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`User <User>`\ s
	followingr   r   r   r   s       r    r   _User.following  r   r)   c                 t    U R                  SU R                  S9nU R                  [        U5      U[        US9$ )a4  Iterate over the GPG keys of this user.

.. versionadded:: 1.2.0

:param int number: (optional), number of GPG keys to return. Default:
    -1 returns all available GPG keys
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`GPGKey <GPGKey>`\ s
r0   r   r   )r3   rF   r   r   r   r   s       r    r0   _User.gpg_keys  s5     ooj499o=zz#f+sFz>>r)   c                 t    U R                  SU R                  S9nU R                  [        U5      U[        US9$ )a'  Iterate over the public keys of this user.

.. versionadded:: 0.5

:param int number: (optional), number of keys to return. Default: -1
    returns all available keys
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`Key <Key>`\ s
keysr   r   )r3   rF   r   r   rB   r   s       r    r   
_User.keys  s5     ooftyyo9zz#f+sCdz;;r)   c                     SnU(       a  U R                  SSXR                  S9nU R                  [        U5      U[        US9$ )a  Iterate over events from the user's organization dashboard.

.. note:: You must be authenticated to view this.

:param str org: (required), name of the organization
:param int number: (optional), number of events to return. Default: -1
    returns all available events
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`Event <github3.events.Event>`\ s
r   r   orgsr   r   )r3   rF   r   r   r   )r   orgr   r   r7   s        r    organization_events_User.organization_events  s?     //(FC))/LCzz#f+sEz==r)   c                     S/nU(       a  UR                  S5        U R                  " USU R                  06nU R                  [	        U5      U[
        US9$ )a  Iterate over events that the user has received.

If the user is the authenticated user, you will see private and public
events, otherwise you will only see public events.

:param bool public: (optional), determines if the authenticated user
    sees both private and public or just public
:param int number: (optional), number of events to return. Default: -1
    returns all events available
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`Event <github3.events.Event>`\ s
received_eventsr   r   r   r   r   s         r    r   _User.received_events  sM     ""KK!oot8dii8zz#f+sEz==r)   c                 v    SSK Jn  U R                  SU R                  S9nU R	                  [        U5      XCUS9$ )aU  Iterate over organizations the user is member of.

:param int number: (optional), number of organizations to return.
    Default: -1 returns all available organization
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of
    :class:`ShortOrganization <github3.orgs.ShortOrganization>`\ s
r   )ShortOrganizationr   r   r   )r   r   r3   rF   r   r   )r   r   r   r   r7   s        r    organizations_User.organizations  s6     	,ooftyyo9zz#f+sDzIIr)   c           	          SSK JnJn  XS.nU R                  U5        U R                  R                  SSS9nU R                  [        U5      UUUUUR                  S9$ )a|  Iterate over repositories starred by this user.

.. versionchanged:: 0.5
   Added sort and direction parameters (optional) as per the change in
   GitHub's API.

:param int number: (optional), number of starred repos to return.
    Default: -1, returns all available repos
:param str sort: (optional), either 'created' (when the star was
    created) or 'updated' (when the repository was last pushed to)
:param str direction: (optional), either 'asc' or 'desc'. Default:
    'desc'
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`~github3.repos.repo.StarredRepository`
r   )
RepositoryStarredRepository)sort	directionN)ownerrepo)headers)	r   r   r   _remove_noner   r   r   r   STAR_HEADERS)	r   r   r   r   r   r   r   paramsr7   s	            r    starred_repositories_User.starred_repositories  sj    & 	97&!&&T&=zzK++  
 	
r)   c                 v    SSK Jn  U R                  SU R                  S9nU R	                  [        U5      XCUS9$ )a9  Iterate over repositories subscribed to by this user.

:param int number: (optional), number of subscriptions to return.
    Default: -1, returns all available
:param str etag: (optional), ETag from a previous request to the same
    endpoint
:returns: generator of :class:`Repository <github3.repos.Repository>`
r   )ShortRepositorysubscriptionsr   r   )r   r   r3   rF   r   r   )r   r   r   r   r7   s        r    r   _User.subscriptions  s6     	+ooo		oBzz#f+s$zGGr)   c                     U R                  SSU R                  5      nSU0nU R                  U R                  X#S9SS5      nU$ )zRename the user.

.. note::

    This is only available for administrators of a GitHub Enterprise
    instance.

:param str login: (required), new name of the user
:returns: bool
adminusersr   rQ        )r3   r   r4   rU   )r   r   r7   payloadresps        r    rename_User.rename  sF     oogw

;E"}}T[[[;S#Fr)   c                     U R                  SSU R                  S5      n0 nU(       a  XS'   U R                  U R                  X#S9S5      nU R	                  [
        U5      $ )a<  Obtain an impersonation token for the user.

The retrieved token will allow impersonation of the user.
This is only available for admins of a GitHub Enterprise instance.

:param list scopes: (optional), areas you want this token to apply to,
    i.e., 'gist', 'user'
:returns: :class:`Authorization <Authorization>`
r   r   authorizationsscopesrQ      )r3   r   rT   _post_instance_or_nullr	   )r   r  r7   rR   rV   s        r    impersonate_User.impersonate&  sZ     oogw

<LM#Nzz$**S*4c:%%mT::r)   c                     U R                  SSU R                  S5      nU R                  U R                  U5      SS5      $ )zRevoke all impersonation tokens for the current user.

This is only available for admins of a GitHub Enterprise instance.

:returns: bool -- True if successful, False otherwise
r   r   r  r1   r   r3   r   r4   r5   r6   s     r    revoke_impersonation_User.revoke_impersonation;  s9     oogw

<LM}}T\\#.S99r)   c                 z    U R                  SU R                  S9nU R                  U R                  U5      SS5      $ )zPromote a user to site administrator.

This is only available for admins of a GitHub Enterprise instance.

:returns: bool -- True if successful, False otherwise
r   r   r1   r   r3   rF   r4   _putr6   s     r    promote_User.promoteG  s5     oolTYYo?}}TYYs^S#66r)   c                 z    U R                  SU R                  S9nU R                  U R                  U5      SS5      $ )zDemote a site administrator to simple user.

You can demote any user account except your own.

This is only available for admins of a GitHub Enterprise instance.

:returns: bool -- True if successful, False otherwise
r   r   r1   r   r3   rF   r4   r5   r6   s     r    demote_User.demoteS  s6     oolTYYo?}}T\\#.S99r)   c                 z    U R                  SU R                  S9nU R                  U R                  U5      SS5      $ )zSuspend the user.

This is only available for admins of a GitHub Enterprise instance.

This API is disabled if you use LDAP, check the GitHub API dos for more
information.

:returns: bool -- True if successful, False otherwise
	suspendedr   r1   r   r  r6   s     r    suspend_User.suspenda  s5     ookDIIo>}}TYYs^S#66r)   c                 z    U R                  SU R                  S9nU R                  U R                  U5      SS5      $ )zUnsuspend the user.

This is only available for admins of a GitHub Enterprise instance.

This API is disabled if you use LDAP, check the GitHub API dos for more
information.

:returns: bool -- True if successful, False otherwise
r  r   r1   r   r  r6   s     r    	unsuspend_User.unsuspendp  s6     ookDIIo>}}T\\#.S99r)   c                     U R                  SSU R                  5      nU R                  U R                  U5      SS5      $ )zDelete the user.

Per GitHub API documentation, it is often preferable to suspend the
user.

.. note::

    This is only available for admins of a GitHub Enterprise instance.

:returns: bool -- True if successful, False otherwise
r   r   r1   r   r
  r6   s     r    r8   _User.delete  s6     oogw

;}}T\\#.S99r)   )rF   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r7   )FN)r  N)NNr  Nr+   )r:   r;   r<   r=   r>   rw   r!   r,   r'   r   r   r   r   r   r0   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r8   r?   r@   r)   r    r   r     s   $ J(
77>"
B
B?< > >">(J" :>
BH    ; ;( 	: 	: 	7 	7 : : 7 7 : : : :r)   r   c                   0   ^  \ rS rSrSrS rU 4S jrSrU =r$ )Useri  aK  Object for the full representation of a User.

GitHub's API returns different amounts of information about users based
upon how that information is retrieved. This object exists to represent
the full amount of information returned for a specific user. For example,
you would receive this class when calling
:meth:`~github3.github.GitHub.user`. To provide a clear distinction
between the types of users, github3.py uses different classes with
different sets of attributes.

This object no longer contains information about the currently
authenticated user (e.g., :meth:`~github3.github.GitHub.me`).

.. versionchanged:: 1.0.0

This object contains all of the attributes available on
:class:`~github3.users.ShortUser` as well as the following:

.. attribute:: bio

    The markdown formatted User's biography

.. attribute:: blog

    The URL of the user's blog

.. attribute:: company

    The name or GitHub handle of the user's company

.. attribute:: created_at

    A parsed :class:`~datetime.datetime` object representing the date the
    user was created

.. attribute:: email

    The email address the user has on their public profile page

.. attribute:: followers_count

    The number of followers of this user

.. attribute:: following_count

    The number of users this user follows

.. attribute:: hireable

    Whether or not the user has opted into GitHub jobs advertising

.. attribute:: location

    The location specified by the user on their public profile

.. attribute:: name

    The name specified by their user on their public profile

.. attribute:: public_gists_count

    The number of public gists owned by this user

.. attribute: public_repos_count

    The number of public repositories owned by this user

.. attribute:: updated_at

    A parsed :class:`~datetime.datetime` object representing the date
    the user was last updated
c                 d  > [         TU ]  U5        US   U l        US   U l        US   U l        U R                  US   5      U l        US   U l        US   U l        US   U l	        US   U l
        US	   U l        US
   U l        US   U l        US   U l        U R                  US   5      U l        g )Nbioblogcompanyr   r   r   r   hireablelocationr^   public_gistspublic_repos
updated_at)r   r!   r#  r$  r%  r   r   r   followers_countfollowing_countr&  r'  r^   public_gists_countpublic_repos_countr*  r   r/   r   s     r    r!   User._update_attributes  s    "4(;L	I..l);<']
#K0#K0Z(Z(L	"&~"6"&~"6..l);<r)   )r#  r$  r%  r   r   r+  r,  r&  r'  r^   r-  r.  r*  	r:   r;   r<   r=   r>   rw   r!   r?   r   r   s   @r    r!  r!    s    GR J= =r)   r!  c                        \ rS rSrSrS r\rSrg)r   i  a  Object for the shortened representation of a User.

GitHub's API returns different amounts of information about users based
upon how that information is retrieved. Often times, when iterating over
several users, GitHub will return less information. To provide a clear
distinction between the types of users, github3.py uses different classes
with different sets of attributes.

.. versionadded:: 1.0.0


.. attribute:: avatar_url

    The URL of the avatar (possibly from Gravatar)

.. attribute:: events_urlt

    A URITemplate object from ``uritemplate`` that can be used to generate
    an events URL

.. attribute:: followers_url

    A string representing the resource to retrieve a User's followers

.. attribute:: following_urlt

    A URITemplate object from ``uritemplate`` that can be used to generate
    the URL to check if this user is following ``other_user``

.. attribute:: gists_urlt

    A URITemplate object from ``uritemplate`` that can be used to generate
    the URL to retrieve a Gist by its id

.. attribute:: gravatar_id

    The identifier for the user's gravatar

.. attribute:: html_url

    The URL of the user's publicly visible profile. For example,
    ``https://github.com/sigmavirus24``

.. attribute:: id

    The unique ID of the account

.. attribute:: login

    The username of the user, e.g., ``sigmavirus24``

.. attribute:: organizations_url

    A string representing the resource to retrieve the organizations to
    which a user belongs

.. attribute:: received_events_url

    A string representing the resource to retrieve the events a user
    received

.. attribute:: repos_url

    A string representing the resource to list a user's repositories

.. attribute:: site_admin

    A boolean attribute indicating whether the user is a member of
    GitHub's staff

.. attribute:: starred_urlt

    A URITemplate object from ``uritemplate`` that can be used to generate
    a URL to retrieve whether the user has starred a repository.

.. attribute:: subscriptions_url

    A string representing the resource to list a user's subscriptions

.. attribute:: type

    A string representing the type of User account this. In all cases
    should be "User"

.. attribute:: url

    A string of this exact resource retrievable from GitHub's API
r@   N)	r:   r;   r<   r=   r>   rw   r!  _refresh_tor?   r@   r)   r    r   r     s    Wr JKr)   r   c                   4   ^  \ rS rSrSrS r\rU 4S jrSr	U =r
$ )	StargazeriK  a:  Object representing a user that has starred a repository.

.. versionadded:: 3.0.0

This object contains all of the attributes available on
:class:`~github3.users.ShortUser` as well as the following:

.. attribute:: starred_at

    The time and date that the user starred the repository this was
    queried from.
c                 \   > [         TU ]  US   5        U R                  US   5      U l        g )Nr/   
starred_at)r   r!   r   r7  )r   	stargazerr   s     r    r!   Stargazer._update_attributes\  s*    "9V#45..<)@Ar)   )r7  r:   r;   r<   r=   r>   rw   r!  r3  r!   r?   r   r   s   @r    r5  r5  K  s      JKB Br)   r5  c                   0   ^  \ rS rSrSrS rU 4S jrSrU =r$ )AuthenticatedUseria  av  Object to represent the currently authenticated user.

This is returned by :meth:`~github3.github.GitHub.me`. It contains the
extra informtation that is not returned for other users such as the
currently authenticated user's plan and private email information.

.. versionadded:: 1.0.0

.. versionchanged:: 1.0.0

    The ``total_private_gists`` attribute is no longer returned by
    GitHub's API and so is removed.

This object has all of the same attribute as the
:class:`~github3.users.ShortUser` and :class:`~github3.users.User` objects
as well as:

.. attribute:: disk_usage

    The amount of repository space that has been used by you, the user

.. attribute:: owned_private_repos_count

    The number of private repositories owned by you, the user

.. attribute:: plan

    .. note::

        When used with a Github Enterprise instance <= 2.12.7, this
        attribute will not be returned. To handle these situations
        sensitively, the attribute will be set to ``None``.
        Repositories may still have a license associated with them
        in these cases.

    The name of the plan that you, the user, have purchased
c                 &  > [         TU ]  U5        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        UR                  S5      U l        U R                  b  [        U R                  U 5      U l        g g )N
disk_usageowned_private_repostotal_private_reposrc   )r   r!   rE   r>  owned_private_repos_counttotal_private_repos_countrc   rZ   r/  s     r    r!   $AuthenticatedUser._update_attributes  su    "4(((<0)-2G)H&)-2G)H&HHV$	99 TYY-DI !r)   )r>  rA  rc   rB  r1  r   s   @r    r<  r<  a  s    $L %J. .r)   r<  c                   4   ^  \ rS rSrSrS r\rU 4S jrSr	U =r
$ )Collaboratori  a6  Object for the representation of a collaborator.

.. versionadded:: 1.1.0

When retrieving a repository's contributors, GitHub returns the same
information as a :class:`~github3.users.ShortUser` with an additional
attribute:

.. attribute:: permissions

    Admin, push, and pull permissions of a collaborator
c                 8   > [         TU ]  U5        US   U l        g )Npermissions)r   r!   rG  r/  s     r    r!   Collaborator._update_attributes  s    "4(.r)   )rG  r:  r   s   @r    rE  rE    s      JK/ /r)   rE  c                   4   ^  \ rS rSrSrS r\rU 4S jrSr	U =r
$ )Contributori  a  Object for the specialized representation of a contributor.

.. versionadded:: 1.0.0

.. versionchanged:: 1.1.0

    This class now refreshes to a :class:`~github3.users.User`.

    The attribute ``contributions`` was renamed to ``contributions_count``,
    the documentation already declared it as ``contributions_count``, it
    was the implementation now reflects this as well.

When retrieving a repository's contributors, GitHub returns the same
information as a :class:`~github3.users.ShortUser` with an additional
attribute:

.. attribute:: contributions_count

    The number of contributions a contributor has made to the repository

c                 8   > [         TU ]  U5        US   U l        g )Ncontributions)r   r!   contributions_count)r   contributorr   s     r    r!   Contributor._update_attributes  s    ";/#.#? r)   )rM  r:  r   s   @r    rJ  rJ    s     , JK@ @r)   rJ  ) r>   typingtrV   r   uritemplater   r   r   
decoratorsr   r   r   github3.authsr	   
GitHubCorer   rB   rZ   ro   r   r   r   r!  r   r5  r<  rE  rJ  UnionstrUserLiker@   r)   r    <module>rY     s   8   #  %  '^:V ^:B9&

 9x.#6 .#bV   $F Dn:F n:bZ=5 Z=z[ [|B B,0. 0.f/5 /.@% @> 77t&k3Fr)   