AuthenticatedUser

class github.AuthenticatedUser.AuthenticatedUser

This class represents AuthenticatedUsers as returned by https://developer.github.com/v3/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.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.datetime
url
Type:string
add_to_emails(*emails)
Calls:POST /user/emails
Parameters:email – string
Return type:None
add_to_following(following)
Calls:PUT /user/following/:user
Parameters:followinggithub.NamedUser.NamedUser
Return type:None
add_to_starred(starred)
Calls:PUT /user/starred/:owner/:repo
Parameters:starredgithub.Repository.Repository
Return type:None
add_to_subscriptions(subscription)
Calls:PUT /user/subscriptions/:owner/:repo
Parameters:subscriptiongithub.Repository.Repository
Return type:None
add_to_watched(watched)
Calls:PUT /repos/:owner/:repo/subscription
Parameters:watchedgithub.Repository.Repository
Return type:None
create_authorization(scopes=NotSet, note=NotSet, note_url=NotSet, client_id=NotSet, client_secret=NotSet, onetime_password=None)
Calls:

POST /authorizations

Parameters:
  • scopes – list of string
  • note – string
  • note_url – string
  • client_id – string
  • client_secret – string
  • onetime_password – string
Return type:

github.Authorization.Authorization

create_fork(repo)
Calls:POST /repos/:owner/:repo/forks
Parameters:repogithub.Repository.Repository
Return type:github.Repository.Repository
create_gist(public, files, description=NotSet)
Calls:

POST /gists

Parameters:
Return type:

github.Gist.Gist

create_key(title, key)
Calls:

POST /user/keys

Parameters:
  • title – string
  • key – string
Return type:

github.UserKey.UserKey

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)
Calls:

POST /user/repos

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
Return type:

github.Repository.Repository

edit(name=NotSet, email=NotSet, blog=NotSet, company=NotSet, location=NotSet, hireable=NotSet, bio=NotSet)
Calls:

PATCH /user

Parameters:
  • name – string
  • email – string
  • blog – string
  • company – string
  • location – string
  • hireable – bool
  • bio – string
Return type:

None

get_authorization(id)
Calls:GET /authorizations/:id
Parameters:id – integer
Return type:github.Authorization.Authorization
get_authorizations()
Calls:GET /authorizations
Return type:github.PaginatedList.PaginatedList of github.Authorization.Authorization
get_emails()
Calls:GET /user/emails
Return type:list of string
get_events()
Calls:GET /events
Return type:github.PaginatedList.PaginatedList of github.Event.Event
get_followers()
Calls:GET /user/followers
Return type:github.PaginatedList.PaginatedList of github.NamedUser.NamedUser
get_following()
Calls:GET /user/following
Return type:github.PaginatedList.PaginatedList of github.NamedUser.NamedUser
get_gists(since=NotSet)
Calls:GET /gists
Parameters:since – datetime.datetime format YYYY-MM-DDTHH:MM:SSZ
Return type:github.PaginatedList.PaginatedList of github.Gist.Gist
get_issues(filter=NotSet, state=NotSet, labels=NotSet, sort=NotSet, direction=NotSet, since=NotSet)
Calls:

GET /issues

Return type:

github.PaginatedList.PaginatedList of github.Issue.Issue

Parameters:
  • filter – string
  • state – string
  • labels – list of github.Label.Label
  • sort – string
  • direction – string
  • since – datetime.datetime
Return type:

github.PaginatedList.PaginatedList of github.Issue.Issue

get_user_issues(filter=NotSet, state=NotSet, labels=NotSet, sort=NotSet, direction=NotSet, since=NotSet)
Calls:

GET /user/issues

Return type:

github.PaginatedList.PaginatedList of github.Issue.Issue

Parameters:
  • filter – string
  • state – string
  • labels – list of github.Label.Label
  • sort – string
  • direction – string
  • since – datetime.datetime
Return type:

github.PaginatedList.PaginatedList of github.Issue.Issue

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.PaginatedList of github.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:

GET /notifications

Parameters:
  • all – bool
  • participating – bool
  • since – datetime.datetime
  • before – datetime.datetime
Return type:

github.PaginatedList.PaginatedList of github.Notification.Notification

get_organization_events(org)
Calls:GET /users/:user/events/orgs/:org
Parameters:orggithub.Organization.Organization
Return type:github.PaginatedList.PaginatedList of github.Event.Event
get_orgs()
Calls:GET /user/orgs
Return type:github.PaginatedList.PaginatedList of github.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:

GET /user/repos <http://developer.github.com/v3/repos>

Parameters:
  • visibility – string
  • affiliation – string
  • type – string
  • sort – string
  • direction – string
Return type:

github.PaginatedList.PaginatedList of github.Repository.Repository

get_starred()
Calls:GET /user/starred
Return type:github.PaginatedList.PaginatedList of github.Repository.Repository
get_starred_gists()
Calls:GET /gists/starred
Return type:github.PaginatedList.PaginatedList of github.Gist.Gist
get_subscriptions()
Calls:GET /user/subscriptions
Return type:github.PaginatedList.PaginatedList of github.Repository.Repository
get_teams()
Calls:GET /user/teams
Return type:github.PaginatedList.PaginatedList of github.Team.Team
get_watched()
Calls:GET /user/subscriptions
Return type:github.PaginatedList.PaginatedList of github.Repository.Repository
has_in_following(following)
Calls:GET /user/following/:user
Parameters:followinggithub.NamedUser.NamedUser
Return type:bool
has_in_starred(starred)
Calls:GET /user/starred/:owner/:repo
Parameters:starredgithub.Repository.Repository
Return type:bool
has_in_subscriptions(subscription)
Calls:GET /user/subscriptions/:owner/:repo
Parameters:subscriptiongithub.Repository.Repository
Return type:bool
has_in_watched(watched)
Calls:GET /repos/:owner/:repo/subscription
Parameters:watchedgithub.Repository.Repository
Return type:bool
mark_notifications_as_read(last_read_at=datetime.datetime(2019, 6, 24, 7, 14, 50, 791627))
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:followinggithub.NamedUser.NamedUser
Return type:None
remove_from_starred(starred)
Calls:DELETE /user/starred/:owner/:repo
Parameters:starredgithub.Repository.Repository
Return type:None
remove_from_subscriptions(subscription)
Calls:DELETE /user/subscriptions/:owner/:repo
Parameters:subscriptiongithub.Repository.Repository
Return type:None
remove_from_watched(watched)
Calls:DELETE /repos/:owner/:repo/subscription
Parameters:watchedgithub.Repository.Repository
Return type:None
accept_invitation(invitation)
Calls:PATCH /user/repository_invitations/:invitation_id <https://developer.github.com/v3/repos/invitations/>
Parameters:invitationgithub.Invitation.Invitation or int
Return type:None
create_migration(repos, lock_repositories=NotSet, exclude_attachments=NotSet)
Calls:

`POST /user/migrations`_

Parameters:
  • repos – list or tuple of str
  • lock_repositories – bool
  • exclude_attachments – bool
Return type:

github.Migration.Migration

get_migrations()
Calls:`GET /user/migrations`_
Return type:github.PaginatedList.PaginatedList of github.Migration.Migration