AuthenticatedUser¶
-
class
github.AuthenticatedUser.AuthenticatedUser¶ This class represents AuthenticatedUsers as returned by https://docs.github.com/en/rest/reference/users#get-the-authenticated-user
An AuthenticatedUser object can be created by calling
get_user()on a Github object.-
avatar_url¶ Type: string
-
bio¶ Type: string
-
blog¶ Type: string
-
collaborators¶ Type: integer
-
company¶ Type: string
-
created_at¶ Type: datetime
-
disk_usage¶ Type: integer
-
email¶ Type: string
-
events_url¶ Type: string
-
followers¶ Type: integer
-
followers_url¶ Type: string
-
following¶ Type: integer
-
following_url¶ Type: string
-
gists_url¶ Type: string
-
gravatar_id¶ Type: string
-
hireable¶ Type: bool
-
html_url¶ Type: string
-
id¶ Type: integer
-
location¶ Type: string
-
login¶ Type: string
-
name¶ Type: string
-
node_id¶ Type: string
-
organizations_url¶ Type: string
-
owned_private_repos¶ Type: integer
-
plan¶ Type: github.Plan.Plan
-
private_gists¶ Type: integer
-
public_gists¶ Type: integer
-
public_repos¶ Type: integer
-
received_events_url¶ Type: string
-
repos_url¶ Type: string
-
site_admin¶ Type: bool
-
starred_url¶ Type: string
-
subscriptions_url¶ Type: string
-
total_private_repos¶ Type: integer
-
type¶ Type: string
-
updated_at¶ Type: datetime
-
url¶ Type: string
-
two_factor_authentication¶ Type: bool
-
add_to_emails(*emails)¶ Calls: POST /user/emails Parameters: email – string Return type: None
-
add_to_following(following)¶ Calls: PUT /user/following/{user} Parameters: following – github.NamedUser.NamedUserReturn type: None
-
add_to_starred(starred)¶ Calls: PUT /user/starred/{owner}/{repo} Parameters: starred – github.Repository.RepositoryReturn type: None
-
add_to_subscriptions(subscription)¶ Calls: PUT /user/subscriptions/{owner}/{repo} Parameters: subscription – github.Repository.RepositoryReturn type: None
-
add_to_watched(watched)¶ Calls: PUT /repos/{owner}/{repo}/subscription Parameters: watched – github.Repository.RepositoryReturn type: None
Calls: Parameters: - scopes – list of string
- note – string
- note_url – string
- client_id – string
- client_secret – string
- onetime_password – string
Return type:
-
static
create_fork(repo, name=NotSet, default_branch_only=NotSet)¶ Calls: Parameters: - repo –
github.Repository.Repository - name – string
- default_branch_only – bool
Return type: - repo –
-
create_repo_from_template(name, repo, description=NotSet, private=NotSet)¶ Calls: POST /repos/{template_owner}/{template_repo}/generate Parameters: name – string :param repo
github.Repository.Repository:param description: string :param private: bool :rtype:github.Repository.Repository
-
create_gist(public, files, description=NotSet)¶ Calls: Parameters: - public – bool
- files – dict of string to
github.InputFileContent.InputFileContent - description – string
Return type:
-
create_key(title, key)¶ Calls: Parameters: - title – string
- key – string
Return type:
-
create_project(name, body=NotSet)¶ Calls: Parameters: - name – string
- body – string
Return type:
-
create_repo(name, description=NotSet, homepage=NotSet, private=NotSet, has_issues=NotSet, has_wiki=NotSet, has_downloads=NotSet, has_projects=NotSet, auto_init=NotSet, license_template=NotSet, gitignore_template=NotSet, allow_squash_merge=NotSet, allow_merge_commit=NotSet, allow_rebase_merge=NotSet, delete_branch_on_merge=NotSet)¶ Calls: Parameters: - name – string
- description – string
- homepage – string
- private – bool
- has_issues – bool
- has_wiki – bool
- has_downloads – bool
- has_projects – bool
- auto_init – bool
- license_template – string
- gitignore_template – string
- allow_squash_merge – bool
- allow_merge_commit – bool
- allow_rebase_merge – bool
- delete_branch_on_merge – bool
Return type:
-
edit(name=NotSet, email=NotSet, blog=NotSet, company=NotSet, location=NotSet, hireable=NotSet, bio=NotSet)¶ Calls: Parameters: - name – string
- email – string
- blog – string
- company – string
- location – string
- hireable – bool
- bio – string
Return type: None
Calls: GET /authorizations/{id} Parameters: id – integer Return type: github.Authorization.Authorization
Calls: GET /authorizations Return type: github.PaginatedList.PaginatedListofgithub.Authorization.Authorization
-
get_emails()¶ Calls: GET /user/emails Return type: list of namedtuples with members email, primary, verified and visibility
-
get_events()¶ Calls: GET /events Return type: github.PaginatedList.PaginatedListofgithub.Event.Event
-
get_followers()¶ Calls: GET /user/followers Return type: github.PaginatedList.PaginatedListofgithub.NamedUser.NamedUser
-
get_following()¶ Calls: GET /user/following Return type: github.PaginatedList.PaginatedListofgithub.NamedUser.NamedUser
-
get_gists(since=NotSet)¶ Calls: GET /gists Parameters: since – datetime format YYYY-MM-DDTHH:MM:SSZ Return type: github.PaginatedList.PaginatedListofgithub.Gist.Gist
-
get_issues(filter=NotSet, state=NotSet, labels=NotSet, sort=NotSet, direction=NotSet, since=NotSet)¶ Calls: Return type: Parameters: - filter – string
- state – string
- labels – list of
github.Label.Label - sort – string
- direction – string
- since – datetime
Return type:
-
get_user_issues(filter=NotSet, state=NotSet, labels=NotSet, sort=NotSet, direction=NotSet, since=NotSet)¶ Calls: Return type: Parameters: - filter – string
- state – string
- labels – list of
github.Label.Label - sort – string
- direction – string
- since – datetime
Return type:
-
get_key(id)¶ Calls: GET /user/keys/{id} Parameters: id – integer Return type: github.UserKey.UserKey
-
get_keys()¶ Calls: GET /user/keys Return type: github.PaginatedList.PaginatedListofgithub.UserKey.UserKey
-
get_notification(id)¶ Calls: GET /notifications/threads/{id} Return type: github.Notification.Notification
-
get_notifications(all=NotSet, participating=NotSet, since=NotSet, before=NotSet)¶ Calls: Parameters: - all – bool
- participating – bool
- since – datetime
- before – datetime
Return type: github.PaginatedList.PaginatedListofgithub.Notification.Notification
-
get_organization_events(org)¶ Calls: GET /users/{user}/events/orgs/{org} Parameters: org – github.Organization.OrganizationReturn type: github.PaginatedList.PaginatedListofgithub.Event.Event
-
get_orgs()¶ Calls: GET /user/orgs Return type: github.PaginatedList.PaginatedListofgithub.Organization.Organization
-
get_repo(name)¶ Calls: GET /repos/{owner}/{repo} Parameters: name – string Return type: github.Repository.Repository
-
get_repos(visibility=NotSet, affiliation=NotSet, type=NotSet, sort=NotSet, direction=NotSet)¶ Calls: Parameters: - visibility – string
- affiliation – string
- type – string
- sort – string
- direction – string
Return type: github.PaginatedList.PaginatedListofgithub.Repository.Repository
-
get_starred()¶ Calls: GET /user/starred Return type: github.PaginatedList.PaginatedListofgithub.Repository.Repository
-
get_starred_gists()¶ Calls: GET /gists/starred Return type: github.PaginatedList.PaginatedListofgithub.Gist.Gist
-
get_subscriptions()¶ Calls: GET /user/subscriptions Return type: github.PaginatedList.PaginatedListofgithub.Repository.Repository
-
get_teams()¶ Calls: GET /user/teams Return type: github.PaginatedList.PaginatedListofgithub.Team.Team
-
get_watched()¶ Calls: GET /user/subscriptions Return type: github.PaginatedList.PaginatedListofgithub.Repository.Repository
-
get_installations()¶ Calls: GET /user/installations Return type: github.PaginatedList.PaginatedListofgithub.Installation.Installation
-
has_in_following(following)¶ Calls: GET /user/following/{user} Parameters: following – github.NamedUser.NamedUserReturn type: bool
-
has_in_starred(starred)¶ Calls: GET /user/starred/{owner}/{repo} Parameters: starred – github.Repository.RepositoryReturn type: bool
-
has_in_subscriptions(subscription)¶ Calls: GET /user/subscriptions/{owner}/{repo} Parameters: subscription – github.Repository.RepositoryReturn type: bool
-
has_in_watched(watched)¶ Calls: GET /repos/{owner}/{repo}/subscription Parameters: watched – github.Repository.RepositoryReturn type: bool
-
mark_notifications_as_read(last_read_at=datetime.datetime(2023, 8, 10, 7, 43, 40, 443814, tzinfo=datetime.timezone.utc))¶ Calls: PUT /notifications Parameters: last_read_at – datetime
-
remove_from_emails(*emails)¶ Calls: DELETE /user/emails Parameters: email – string Return type: None
-
remove_from_following(following)¶ Calls: DELETE /user/following/{user} Parameters: following – github.NamedUser.NamedUserReturn type: None
-
remove_from_starred(starred)¶ Calls: DELETE /user/starred/{owner}/{repo} Parameters: starred – github.Repository.RepositoryReturn type: None
-
remove_from_subscriptions(subscription)¶ Calls: DELETE /user/subscriptions/{owner}/{repo} Parameters: subscription – github.Repository.RepositoryReturn type: None
-
remove_from_watched(watched)¶ Calls: DELETE /repos/{owner}/{repo}/subscription Parameters: watched – github.Repository.RepositoryReturn type: None
-
accept_invitation(invitation)¶ Calls: PATCH /user/repository_invitations/{invitation_id} Parameters: invitation – github.Invitation.Invitationor intReturn type: None
-
get_invitations()¶ Calls: GET /user/repository_invitations Return type: github.PaginatedList.PaginatedListofgithub.Invitation.Invitation
-
create_migration(repos, lock_repositories=NotSet, exclude_attachments=NotSet)¶ Calls: Parameters: - repos – list or tuple of str
- lock_repositories – bool
- exclude_attachments – bool
Return type:
-
get_migrations()¶ Calls: GET /user/migrations Return type: github.PaginatedList.PaginatedListofgithub.Migration.Migration
-
get_organization_membership(org)¶ Calls: GET /user/memberships/orgs/{org} Return type: github.Membership.Membership
-