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.-
add_to_emails
(*emails) → None¶ Calls: POST /user/emails
-
add_to_following
(following: NamedUser) → None¶ Calls: PUT /user/following/{user}
-
add_to_starred
(starred: Repository) → None¶ Calls: PUT /user/starred/{owner}/{repo}
-
add_to_subscriptions
(subscription: Repository) → None¶ Calls: PUT /user/subscriptions/{owner}/{repo}
-
add_to_watched
(watched: Repository) → None¶ Calls: PUT /repos/{owner}/{repo}/subscription
Calls: POST /authorizations
-
static
create_fork
(repo: Repository, name: Opt[str] = NotSet, default_branch_only: Opt[bool] = NotSet) → Repository¶ Calls: POST /repos/{owner}/{repo}/forks
-
create_repo_from_template
(name: str, repo: Repository, description: Opt[str] = NotSet, private: Opt[bool] = NotSet) → Repository¶ Calls: POST /repos/{template_owner}/{template_repo}/generate
-
create_gist
(public: bool, files: dict[str, InputFileContent], description: Opt[str] = NotSet) → Gist¶ Calls: POST /gists
-
create_key
(title: str, key: str) → UserKey¶ Calls: Parameters: - title – string
- key – string
Return type:
-
create_project
(name: str, body: Opt[str] = NotSet) → Project¶ Calls: Parameters: - name – string
- body – string
Return type:
-
create_repo
(name: str, description: Opt[str] = NotSet, homepage: Opt[str] = NotSet, private: Opt[bool] = NotSet, has_issues: Opt[bool] = NotSet, has_wiki: Opt[bool] = NotSet, has_downloads: Opt[bool] = NotSet, has_projects: Opt[bool] = NotSet, auto_init: Opt[bool] = NotSet, license_template: Opt[str] = NotSet, gitignore_template: Opt[str] = NotSet, allow_squash_merge: Opt[bool] = NotSet, allow_merge_commit: Opt[bool] = NotSet, allow_rebase_merge: Opt[bool] = NotSet, delete_branch_on_merge: Opt[bool] = NotSet) → Repository¶ Calls: POST /user/repos
-
edit
(name: Union[str, github.GithubObject._NotSetType] = NotSet, email: Union[str, github.GithubObject._NotSetType] = NotSet, blog: Union[str, github.GithubObject._NotSetType] = NotSet, company: Union[str, github.GithubObject._NotSetType] = NotSet, location: Union[str, github.GithubObject._NotSetType] = NotSet, hireable: Union[bool, github.GithubObject._NotSetType] = NotSet, bio: Union[str, github.GithubObject._NotSetType] = NotSet) → None¶ Calls: PATCH /user
Calls: GET /authorizations/{id}
Calls: GET /authorizations
-
get_emails
() → list[EmailData]¶ Calls: GET /user/emails
-
get_events
() → PaginatedList[Event]¶ Calls: GET /events
-
get_followers
() → PaginatedList[NamedUser]¶ Calls: GET /user/followers
-
get_following
() → PaginatedList[NamedUser]¶ Calls: GET /user/following
-
get_gists
(since: Opt[datetime] = NotSet) → PaginatedList[Gist]¶ Calls: GET /gists Parameters: since – datetime format YYYY-MM-DDTHH:MM:SSZ Return type: PaginatedList
ofgithub.Gist.Gist
-
get_issues
(filter: Opt[str] = NotSet, state: Opt[str] = NotSet, labels: Opt[list[Label]] = NotSet, sort: Opt[str] = NotSet, direction: Opt[str] = NotSet, since: Opt[datetime] = NotSet) → PaginatedList[Issue]¶ Calls: GET /issues
-
get_user_issues
(filter: Opt[str] = NotSet, state: Opt[str] = NotSet, labels: Opt[list[Label]] = NotSet, sort: Opt[str] = NotSet, direction: Opt[str] = NotSet, since: Opt[datetime] = NotSet) → PaginatedList[Issue]¶ Calls: GET /user/issues
-
get_key
(id: int) → UserKey¶ Calls: GET /user/keys/{id}
-
get_keys
() → PaginatedList[UserKey]¶ Calls: GET /user/keys
-
get_notification
(id: str) → Notification¶ Calls: GET /notifications/threads/{id}
-
get_notifications
(all: Opt[bool] = NotSet, participating: Opt[bool] = NotSet, since: Opt[datetime] = NotSet, before: Opt[datetime] = NotSet) → PaginatedList[Notification]¶ Calls: GET /notifications
-
get_organization_events
(org: Organization) → PaginatedList[Event]¶ Calls: GET /users/{user}/events/orgs/{org}
-
get_orgs
() → PaginatedList[Organization]¶ Calls: GET /user/orgs
-
get_repo
(name: str) → Repository¶ Calls: GET /repos/{owner}/{repo}
-
get_repos
(visibility: Opt[str] = NotSet, affiliation: Opt[str] = NotSet, type: Opt[str] = NotSet, sort: Opt[str] = NotSet, direction: Opt[str] = NotSet) → PaginatedList[Repository]¶ Calls: GET /user/repos
-
get_starred
() → PaginatedList[Repository]¶ Calls: GET /user/starred
-
get_starred_gists
() → PaginatedList[Gist]¶ Calls: GET /gists/starred
-
get_subscriptions
() → PaginatedList[Repository]¶ Calls: GET /user/subscriptions
-
get_teams
() → PaginatedList[Team]¶ Calls: GET /user/teams
-
get_watched
() → PaginatedList[Repository]¶ Calls: GET /user/subscriptions
-
get_installations
() → PaginatedList[Installation]¶ Calls: GET /user/installations
-
has_in_following
(following: NamedUser) → bool¶ Calls: GET /user/following/{user}
-
has_in_starred
(starred: Repository) → bool¶ Calls: GET /user/starred/{owner}/{repo}
-
has_in_subscriptions
(subscription: Repository) → bool¶ Calls: GET /user/subscriptions/{owner}/{repo}
-
has_in_watched
(watched: Repository) → bool¶ Calls: GET /repos/{owner}/{repo}/subscription
-
mark_notifications_as_read
(last_read_at: datetime | None = None) → None¶ Calls: PUT /notifications
-
remove_from_emails
(*emails) → None¶ Calls: DELETE /user/emails
-
remove_from_following
(following: NamedUser) → None¶ Calls: DELETE /user/following/{user}
-
remove_from_starred
(starred: Repository) → None¶ Calls: DELETE /user/starred/{owner}/{repo}
-
remove_from_subscriptions
(subscription: Repository) → None¶ Calls: DELETE /user/subscriptions/{owner}/{repo}
-
remove_from_watched
(watched: Repository) → None¶ Calls: DELETE /repos/{owner}/{repo}/subscription
-
accept_invitation
(invitation: Invitation | int) → None¶ Calls: PATCH /user/repository_invitations/{invitation_id}
-
get_invitations
() → PaginatedList[Invitation]¶ Calls: GET /user/repository_invitations
-
create_migration
(repos: list[Repository] | tuple[Repository], lock_repositories: Opt[bool] = NotSet, exclude_attachments: Opt[bool] = NotSet) → Migration¶ Calls: POST /user/migrations
-
get_migrations
() → PaginatedList[Migration]¶ Calls: GET /user/migrations
-
get_organization_membership
(org: str) → Membership¶ Calls: GET /user/memberships/orgs/{org}
-