codecraftai-restclient-github-public 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccai/restclient/github/public/__init__.py +0 -0
- ccai/restclient/github/public/generation/githubrestclientgenerator.py +56 -0
- ccai/restclient/github/public/generation/specs/api-hints.json +172 -0
- ccai/restclient/github/public/generation/specs/api-public.json +306020 -0
- ccai/restclient/github/public/generation/specs/pagination-hints.json +31 -0
- ccai/restclient/github/public/githubpublicrestclient.py +262 -0
- ccai/restclient/github/public/githubrestclientbase.py +120 -0
- ccai/restclient/github/public/groups/__init__.py +0 -0
- ccai/restclient/github/public/groups/actions.py +8042 -0
- ccai/restclient/github/public/groups/activity.py +1488 -0
- ccai/restclient/github/public/groups/apiinsights.py +478 -0
- ccai/restclient/github/public/groups/apps.py +1662 -0
- ccai/restclient/github/public/groups/billing.py +401 -0
- ccai/restclient/github/public/groups/campaigns.py +262 -0
- ccai/restclient/github/public/groups/checks.py +632 -0
- ccai/restclient/github/public/groups/classroom.py +276 -0
- ccai/restclient/github/public/groups/codescanning.py +1203 -0
- ccai/restclient/github/public/groups/codesecurity.py +997 -0
- ccai/restclient/github/public/groups/codesofconduct.py +92 -0
- ccai/restclient/github/public/groups/codespaces.py +2271 -0
- ccai/restclient/github/public/groups/copilot.py +517 -0
- ccai/restclient/github/public/groups/credentials.py +62 -0
- ccai/restclient/github/public/groups/dependabot.py +1155 -0
- ccai/restclient/github/public/groups/dependencygraph.py +152 -0
- ccai/restclient/github/public/groups/emojis.py +51 -0
- ccai/restclient/github/public/groups/gists.py +909 -0
- ccai/restclient/github/public/groups/git.py +734 -0
- ccai/restclient/github/public/groups/gitignore.py +96 -0
- ccai/restclient/github/public/groups/hostedcompute.py +290 -0
- ccai/restclient/github/public/groups/interactions.py +389 -0
- ccai/restclient/github/public/groups/issues.py +2460 -0
- ccai/restclient/github/public/groups/licenses.py +153 -0
- ccai/restclient/github/public/groups/markdown.py +88 -0
- ccai/restclient/github/public/groups/meta.py +213 -0
- ccai/restclient/github/public/groups/migrations.py +1079 -0
- ccai/restclient/github/public/groups/oidc.py +102 -0
- ccai/restclient/github/public/groups/orgs.py +3958 -0
- ccai/restclient/github/public/groups/packages.py +1316 -0
- ccai/restclient/github/public/groups/privateregistries.py +294 -0
- ccai/restclient/github/public/groups/projectsclassic.py +1154 -0
- ccai/restclient/github/public/groups/pulls.py +1469 -0
- ccai/restclient/github/public/groups/ratelimit.py +68 -0
- ccai/restclient/github/public/groups/reactions.py +1247 -0
- ccai/restclient/github/public/groups/repos.py +9741 -0
- ccai/restclient/github/public/groups/search.py +417 -0
- ccai/restclient/github/public/groups/secretscanning.py +568 -0
- ccai/restclient/github/public/groups/securityadvisories.py +541 -0
- ccai/restclient/github/public/groups/teams.py +2985 -0
- ccai/restclient/github/public/groups/users.py +2054 -0
- ccai/restclient/github/public/py.typed +0 -0
- ccai/restclient/github/public/schemas/__init__.py +0 -0
- ccai/restclient/github/public/schemas/actions.py +418 -0
- ccai/restclient/github/public/schemas/activity.py +95 -0
- ccai/restclient/github/public/schemas/actor.py +20 -0
- ccai/restclient/github/public/schemas/addedtoprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/apps.py +151 -0
- ccai/restclient/github/public/schemas/assignedissueevent.py +25 -0
- ccai/restclient/github/public/schemas/authenticationtoken.py +20 -0
- ccai/restclient/github/public/schemas/automerge.py +16 -0
- ccai/restclient/github/public/schemas/basicerror.py +16 -0
- ccai/restclient/github/public/schemas/billing.py +27 -0
- ccai/restclient/github/public/schemas/billingusagereport.py +12 -0
- ccai/restclient/github/public/schemas/billingusagereportuser.py +12 -0
- ccai/restclient/github/public/schemas/campaigns.py +27 -0
- ccai/restclient/github/public/schemas/checkrunwithsimplechecksuite.py +31 -0
- ccai/restclient/github/public/schemas/checks.py +80 -0
- ccai/restclient/github/public/schemas/classroom.py +109 -0
- ccai/restclient/github/public/schemas/codeofconductsimple.py +18 -0
- ccai/restclient/github/public/schemas/codescanning.py +197 -0
- ccai/restclient/github/public/schemas/codescanningalertlocation.py +17 -0
- ccai/restclient/github/public/schemas/codescanningalertrule.py +20 -0
- ccai/restclient/github/public/schemas/codescanningalertrulesummary.py +20 -0
- ccai/restclient/github/public/schemas/codescanninganalysistool.py +14 -0
- ccai/restclient/github/public/schemas/codescanningautofixcommitsresponse.py +11 -0
- ccai/restclient/github/public/schemas/codescanningdefaultsetupupdateresponse.py +15 -0
- ccai/restclient/github/public/schemas/codescanningsarifsreceipt.py +11 -0
- ccai/restclient/github/public/schemas/codescanningvariantanalysisrepository.py +20 -0
- ccai/restclient/github/public/schemas/codescanningvariantanalysisskippedrepogroup.py +13 -0
- ccai/restclient/github/public/schemas/codesecurity.py +73 -0
- ccai/restclient/github/public/schemas/codesofconduct.py +19 -0
- ccai/restclient/github/public/schemas/codespaces.py +130 -0
- ccai/restclient/github/public/schemas/codespacewithfullrepository.py +45 -0
- ccai/restclient/github/public/schemas/commit.py +25 -0
- ccai/restclient/github/public/schemas/contenttree.py +27 -0
- ccai/restclient/github/public/schemas/convertednotetoissueissueevent.py +24 -0
- ccai/restclient/github/public/schemas/copilot.py +50 -0
- ccai/restclient/github/public/schemas/copilotdotcomchat.py +16 -0
- ccai/restclient/github/public/schemas/copilotdotcompullrequests.py +16 -0
- ccai/restclient/github/public/schemas/copilotidechat.py +16 -0
- ccai/restclient/github/public/schemas/copilotidecodecompletions.py +17 -0
- ccai/restclient/github/public/schemas/copilotorganizationseatbreakdown.py +18 -0
- ccai/restclient/github/public/schemas/cvssseverities.py +13 -0
- ccai/restclient/github/public/schemas/demilestonedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/dependabot.py +87 -0
- ccai/restclient/github/public/schemas/dependabotalertpackage.py +14 -0
- ccai/restclient/github/public/schemas/dependabotalertsecurityadvisory.py +29 -0
- ccai/restclient/github/public/schemas/dependabotalertsecurityvulnerability.py +18 -0
- ccai/restclient/github/public/schemas/dependency.py +16 -0
- ccai/restclient/github/public/schemas/dependencygraph.py +29 -0
- ccai/restclient/github/public/schemas/deploymentsimple.py +28 -0
- ccai/restclient/github/public/schemas/discussion.py +37 -0
- ccai/restclient/github/public/schemas/enterprise.py +24 -0
- ccai/restclient/github/public/schemas/enterpriseteam.py +27 -0
- ccai/restclient/github/public/schemas/enterprisewebhooks.py +26 -0
- ccai/restclient/github/public/schemas/gisthistory.py +19 -0
- ccai/restclient/github/public/schemas/gists.py +88 -0
- ccai/restclient/github/public/schemas/git.py +71 -0
- ccai/restclient/github/public/schemas/gitignore.py +14 -0
- ccai/restclient/github/public/schemas/hookdelivery.py +29 -0
- ccai/restclient/github/public/schemas/hookdeliveryitem.py +26 -0
- ccai/restclient/github/public/schemas/hookresponse.py +14 -0
- ccai/restclient/github/public/schemas/hostedcompute.py +30 -0
- ccai/restclient/github/public/schemas/installation.py +35 -0
- ccai/restclient/github/public/schemas/installationtoken.py +22 -0
- ccai/restclient/github/public/schemas/interactions.py +23 -0
- ccai/restclient/github/public/schemas/issuedependenciessummary.py +13 -0
- ccai/restclient/github/public/schemas/issueeventdismissedreview.py +15 -0
- ccai/restclient/github/public/schemas/issueeventlabel.py +16 -0
- ccai/restclient/github/public/schemas/issueeventmilestone.py +13 -0
- ccai/restclient/github/public/schemas/issueeventprojectcard.py +18 -0
- ccai/restclient/github/public/schemas/issueeventrename.py +14 -0
- ccai/restclient/github/public/schemas/issuefieldvalue.py +19 -0
- ccai/restclient/github/public/schemas/issues.py +135 -0
- ccai/restclient/github/public/schemas/labeledissueevent.py +24 -0
- ccai/restclient/github/public/schemas/licenses.py +58 -0
- ccai/restclient/github/public/schemas/link.py +13 -0
- ccai/restclient/github/public/schemas/linkwithtype.py +14 -0
- ccai/restclient/github/public/schemas/lockedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/manifest.py +15 -0
- ccai/restclient/github/public/schemas/marketplaceaccount.py +18 -0
- ccai/restclient/github/public/schemas/mergegroup.py +17 -0
- ccai/restclient/github/public/schemas/meta.py +67 -0
- ccai/restclient/github/public/schemas/migrations.py +84 -0
- ccai/restclient/github/public/schemas/milestonedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/minimalrepository.py +102 -0
- ccai/restclient/github/public/schemas/movedcolumninprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/nullableactionshostedrunnerpoolimage.py +16 -0
- ccai/restclient/github/public/schemas/nullablecodeofconductsimple.py +18 -0
- ccai/restclient/github/public/schemas/nullablecodespacemachine.py +21 -0
- ccai/restclient/github/public/schemas/nullablecollaborator.py +37 -0
- ccai/restclient/github/public/schemas/nullablecommunityhealthfile.py +11 -0
- ccai/restclient/github/public/schemas/nullablegituser.py +15 -0
- ccai/restclient/github/public/schemas/nullableintegration.py +28 -0
- ccai/restclient/github/public/schemas/nullableissue.py +52 -0
- ccai/restclient/github/public/schemas/nullablelicensesimple.py +20 -0
- ccai/restclient/github/public/schemas/nullablemilestone.py +30 -0
- ccai/restclient/github/public/schemas/nullableminimalrepository.py +102 -0
- ccai/restclient/github/public/schemas/nullableorganizationsimple.py +26 -0
- ccai/restclient/github/public/schemas/nullableprojectsv2statusupdate.py +24 -0
- ccai/restclient/github/public/schemas/nullablerepository.py +110 -0
- ccai/restclient/github/public/schemas/nullablerepositorywebhooks.py +115 -0
- ccai/restclient/github/public/schemas/nullablescopedinstallation.py +18 -0
- ccai/restclient/github/public/schemas/nullablesimplecommit.py +20 -0
- ccai/restclient/github/public/schemas/nullablesimplerepository.py +60 -0
- ccai/restclient/github/public/schemas/nullablesimpleuser.py +36 -0
- ccai/restclient/github/public/schemas/nullableteamsimple.py +27 -0
- ccai/restclient/github/public/schemas/oidc.py +15 -0
- ccai/restclient/github/public/schemas/organizationinvitation.py +26 -0
- ccai/restclient/github/public/schemas/organizationsimplewebhooks.py +27 -0
- ccai/restclient/github/public/schemas/orgprivateregistryconfigurationwithselectedrepositories.py +21 -0
- ccai/restclient/github/public/schemas/orgs.py +332 -0
- ccai/restclient/github/public/schemas/packages.py +42 -0
- ccai/restclient/github/public/schemas/pagebuildstatus.py +14 -0
- ccai/restclient/github/public/schemas/pageshttpscertificate.py +15 -0
- ccai/restclient/github/public/schemas/pagessourcehash.py +11 -0
- ccai/restclient/github/public/schemas/personalaccesstokenrequest.py +28 -0
- ccai/restclient/github/public/schemas/privateregistries.py +20 -0
- ccai/restclient/github/public/schemas/projectsclassic.py +70 -0
- ccai/restclient/github/public/schemas/projectsv2.py +31 -0
- ccai/restclient/github/public/schemas/projectsv2item.py +23 -0
- ccai/restclient/github/public/schemas/projectsv2iterationsetting.py +20 -0
- ccai/restclient/github/public/schemas/projectsv2singleselectoption.py +18 -0
- ccai/restclient/github/public/schemas/projectsv2statusupdate.py +24 -0
- ccai/restclient/github/public/schemas/protectedbranchrequiredstatuscheck.py +20 -0
- ccai/restclient/github/public/schemas/publicip.py +15 -0
- ccai/restclient/github/public/schemas/pullrequestminimal.py +16 -0
- ccai/restclient/github/public/schemas/pullrequestsimple.py +50 -0
- ccai/restclient/github/public/schemas/pulls.py +185 -0
- ccai/restclient/github/public/schemas/ratelimit.py +23 -0
- ccai/restclient/github/public/schemas/reactions.py +17 -0
- ccai/restclient/github/public/schemas/referencedworkflow.py +15 -0
- ccai/restclient/github/public/schemas/removedfromprojectissueevent.py +24 -0
- ccai/restclient/github/public/schemas/renamedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/repos.py +952 -0
- ccai/restclient/github/public/schemas/repository.py +110 -0
- ccai/restclient/github/public/schemas/repositoryadvisorycredit.py +15 -0
- ccai/restclient/github/public/schemas/repositoryadvisoryvulnerability.py +18 -0
- ccai/restclient/github/public/schemas/repositoryrulebranchnamepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecodescanning.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitauthoremailpattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitmessagepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecommitteremailpattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulecreation.py +13 -0
- ccai/restclient/github/public/schemas/repositoryruledeletion.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulefileextensionrestriction.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulefilepathrestriction.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemaxfilepathlength.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemaxfilesize.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulemergequeue.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulenonfastforward.py +13 -0
- ccai/restclient/github/public/schemas/repositoryruleparamscodescanningtool.py +15 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsrequiredreviewerconfiguration.py +17 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsrestrictedcommits.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsreviewer.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsstatuscheckconfiguration.py +14 -0
- ccai/restclient/github/public/schemas/repositoryruleparamsworkflowfilereference.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulepullrequest.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerequireddeployments.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredlinearhistory.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredsignatures.py +13 -0
- ccai/restclient/github/public/schemas/repositoryrulerequiredstatuschecks.py +16 -0
- ccai/restclient/github/public/schemas/repositoryrulerulesetinfo.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositoryidtarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorynametarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorypropertyspec.py +17 -0
- ccai/restclient/github/public/schemas/repositoryrulesetconditionsrepositorypropertytarget.py +15 -0
- ccai/restclient/github/public/schemas/repositoryruletagnamepattern.py +16 -0
- ccai/restclient/github/public/schemas/repositoryruleupdate.py +16 -0
- ccai/restclient/github/public/schemas/repositoryruleviolationerror.py +18 -0
- ccai/restclient/github/public/schemas/repositoryruleworkflows.py +16 -0
- ccai/restclient/github/public/schemas/repositorywebhooks.py +115 -0
- ccai/restclient/github/public/schemas/reviewdismissedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/reviewrequestedissueevent.py +26 -0
- ccai/restclient/github/public/schemas/reviewrequestremovedissueevent.py +26 -0
- ccai/restclient/github/public/schemas/rulesetversion.py +17 -0
- ccai/restclient/github/public/schemas/runnerlabel.py +15 -0
- ccai/restclient/github/public/schemas/scimerror.py +20 -0
- ccai/restclient/github/public/schemas/search.py +263 -0
- ccai/restclient/github/public/schemas/secretscanning.py +96 -0
- ccai/restclient/github/public/schemas/secretscanningalertwebhook.py +33 -0
- ccai/restclient/github/public/schemas/secretscanninglocationcommit.py +21 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussionbody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussioncomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationdiscussiontitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuebody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuecomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationissuetitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestbody.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestcomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestreview.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequestreviewcomment.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationpullrequesttitle.py +13 -0
- ccai/restclient/github/public/schemas/secretscanninglocationwikicommit.py +21 -0
- ccai/restclient/github/public/schemas/secretscanningpatternoverride.py +23 -0
- ccai/restclient/github/public/schemas/secretscanningscan.py +18 -0
- ccai/restclient/github/public/schemas/securityadvisories.py +106 -0
- ccai/restclient/github/public/schemas/securityadvisoryepss.py +14 -0
- ccai/restclient/github/public/schemas/securityandanalysis.py +18 -0
- ccai/restclient/github/public/schemas/shortblob.py +14 -0
- ccai/restclient/github/public/schemas/simplechecksuite.py +28 -0
- ccai/restclient/github/public/schemas/simpleclassroomorganization.py +20 -0
- ccai/restclient/github/public/schemas/simpleclassroomrepository.py +18 -0
- ccai/restclient/github/public/schemas/simpleclassroomuser.py +16 -0
- ccai/restclient/github/public/schemas/simplecommit.py +20 -0
- ccai/restclient/github/public/schemas/simplecommitstatus.py +22 -0
- ccai/restclient/github/public/schemas/simpleinstallation.py +16 -0
- ccai/restclient/github/public/schemas/simplerepository.py +60 -0
- ccai/restclient/github/public/schemas/statechangeissueevent.py +24 -0
- ccai/restclient/github/public/schemas/subissuessummary.py +12 -0
- ccai/restclient/github/public/schemas/teamorganization.py +63 -0
- ccai/restclient/github/public/schemas/teams.py +202 -0
- ccai/restclient/github/public/schemas/timelineassignedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/timelinecommentevent.py +30 -0
- ccai/restclient/github/public/schemas/timelinecommitcommentedevent.py +18 -0
- ccai/restclient/github/public/schemas/timelinecommittedevent.py +25 -0
- ccai/restclient/github/public/schemas/timelinecrossreferencedevent.py +19 -0
- ccai/restclient/github/public/schemas/timelinelinecommentedevent.py +17 -0
- ccai/restclient/github/public/schemas/timelinereviewedevent.py +29 -0
- ccai/restclient/github/public/schemas/timelineunassignedissueevent.py +24 -0
- ccai/restclient/github/public/schemas/traffic.py +12 -0
- ccai/restclient/github/public/schemas/unassignedissueevent.py +25 -0
- ccai/restclient/github/public/schemas/unlabeledissueevent.py +24 -0
- ccai/restclient/github/public/schemas/users.py +183 -0
- ccai/restclient/github/public/schemas/validationerror.py +17 -0
- ccai/restclient/github/public/schemas/validationerrorsimple.py +17 -0
- ccai/restclient/github/public/schemas/verification.py +16 -0
- ccai/restclient/github/public/schemas/vulnerability.py +18 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionconfigurationdisabled.py +15 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionconfigurationenabled.py +15 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionrulecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionruledeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookbranchprotectionruleedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookcheckruncompleted.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckruncompletedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckruncreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckruncreatedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrequestedaction.py +18 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrequestedactionformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrerequested.py +15 -0
- ccai/restclient/github/public/schemas/webhookcheckrunrerequestedformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookchecksuitecompleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookchecksuiterequested.py +18 -0
- ccai/restclient/github/public/schemas/webhookchecksuitererequested.py +18 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertappearedinbranch.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertclosedbyuser.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertcreated.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertfixed.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertreopened.py +20 -0
- ccai/restclient/github/public/schemas/webhookcodescanningalertreopenedbyuser.py +20 -0
- ccai/restclient/github/public/schemas/webhookcommitcommentcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookcreate.py +21 -0
- ccai/restclient/github/public/schemas/webhookcustompropertycreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertydeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookcustompropertypromotedtoenterprise.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertyupdated.py +15 -0
- ccai/restclient/github/public/schemas/webhookcustompropertyvaluesupdated.py +19 -0
- ccai/restclient/github/public/schemas/webhookdelete.py +17 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertautodismissed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertautoreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertdismissed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertfixed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertreintroduced.py +16 -0
- ccai/restclient/github/public/schemas/webhookdependabotalertreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploykeycreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploykeydeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookdeploymentcreated.py +20 -0
- ccai/restclient/github/public/schemas/webhookdeploymentprotectionrulerequested.py +21 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewapproved.py +24 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewrejected.py +24 -0
- ccai/restclient/github/public/schemas/webhookdeploymentreviewrequested.py +23 -0
- ccai/restclient/github/public/schemas/webhookdeploymentstatuscreated.py +22 -0
- ccai/restclient/github/public/schemas/webhookdiscussionanswered.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncategorychanged.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentcreated.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentdeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncommentedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookdiscussioncreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussiondeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussionlocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussiontransferred.py +19 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunanswered.py +15 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunlocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookdiscussionunpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookfork.py +18 -0
- ccai/restclient/github/public/schemas/webhookgithubappauthorizationrevoked.py +11 -0
- ccai/restclient/github/public/schemas/webhookgollum.py +17 -0
- ccai/restclient/github/public/schemas/webhookinstallationcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationdeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationnewpermissionsaccepted.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationrepositoriesadded.py +21 -0
- ccai/restclient/github/public/schemas/webhookinstallationrepositoriesremoved.py +21 -0
- ccai/restclient/github/public/schemas/webhookinstallationsuspend.py +19 -0
- ccai/restclient/github/public/schemas/webhookinstallationtargetrenamed.py +20 -0
- ccai/restclient/github/public/schemas/webhookinstallationunsuspend.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuecommentcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuecommentdeleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuecommentedited.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockedbyadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockedbyremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockingadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuedependenciesblockingremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesassigned.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesdeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesdemilestoned.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookissueslabeled.py +19 -0
- ccai/restclient/github/public/schemas/webhookissueslocked.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesmilestoned.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuesopened.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuespinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesreopened.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuestransferred.py +19 -0
- ccai/restclient/github/public/schemas/webhookissuestyped.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunassigned.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunlabeled.py +17 -0
- ccai/restclient/github/public/schemas/webhookissuesunlocked.py +18 -0
- ccai/restclient/github/public/schemas/webhookissuesunpinned.py +16 -0
- ccai/restclient/github/public/schemas/webhookissuesuntyped.py +17 -0
- ccai/restclient/github/public/schemas/webhooklabelcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooklabeldeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhooklabeledited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasecancelled.py +18 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasechanged.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasependingchange.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasependingchangecancelled.py +20 -0
- ccai/restclient/github/public/schemas/webhookmarketplacepurchasepurchased.py +18 -0
- ccai/restclient/github/public/schemas/webhookmemberadded.py +19 -0
- ccai/restclient/github/public/schemas/webhookmemberedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmemberremoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookmembershipadded.py +20 -0
- ccai/restclient/github/public/schemas/webhookmembershipremoved.py +20 -0
- ccai/restclient/github/public/schemas/webhookmergegroupchecksrequested.py +15 -0
- ccai/restclient/github/public/schemas/webhookmergegroupdestroyed.py +16 -0
- ccai/restclient/github/public/schemas/webhookmetadeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookmilestoneclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestonecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestonedeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookmilestoneedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookmilestoneopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberadded.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberinvited.py +19 -0
- ccai/restclient/github/public/schemas/webhookorganizationmemberremoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookorganizationrenamed.py +19 -0
- ccai/restclient/github/public/schemas/webhookorgblockblocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookorgblockunblocked.py +16 -0
- ccai/restclient/github/public/schemas/webhookpackagepublished.py +18 -0
- ccai/restclient/github/public/schemas/webhookpackageupdated.py +18 -0
- ccai/restclient/github/public/schemas/webhookpagebuild.py +18 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestapproved.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestcancelled.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestcreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookpersonalaccesstokenrequestdenied.py +15 -0
- ccai/restclient/github/public/schemas/webhookping.py +17 -0
- ccai/restclient/github/public/schemas/webhookpingformencoded.py +13 -0
- ccai/restclient/github/public/schemas/webhookprojectcardconverted.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcardcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcarddeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookprojectcardedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcardmoved.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectclosed.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumncreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumndeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumnedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectcolumnmoved.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookprojectreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemconverted.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemcreated.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemdeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemreordered.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2itemrestored.py +15 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectclosed.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectcreated.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectdeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2projectreopened.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdatecreated.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdatedeleted.py +14 -0
- ccai/restclient/github/public/schemas/webhookprojectsv2statusupdateedited.py +17 -0
- ccai/restclient/github/public/schemas/webhookpublic.py +14 -0
- ccai/restclient/github/public/schemas/webhookpullrequestassigned.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestautomergedisabled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestautomergeenabled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestclosed.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestconvertedtodraft.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestdemilestoned.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestdequeued.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestenqueued.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestlabeled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestlocked.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestmilestoned.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestopened.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreadyforreview.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreopened.py +17 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentcreated.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentdeleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewcommentedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewdismissed.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewedited.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewsubmitted.py +19 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewthreadresolved.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestreviewthreadunresolved.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestsynchronize.py +21 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunassigned.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunlabeled.py +20 -0
- ccai/restclient/github/public/schemas/webhookpullrequestunlocked.py +19 -0
- ccai/restclient/github/public/schemas/webhookpush.py +27 -0
- ccai/restclient/github/public/schemas/webhookregistrypackagepublished.py +18 -0
- ccai/restclient/github/public/schemas/webhookregistrypackageupdated.py +18 -0
- ccai/restclient/github/public/schemas/webhookreleasecreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleasedeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleaseedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookreleaseprereleased.py +18 -0
- ccai/restclient/github/public/schemas/webhookreleasepublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleasereleased.py +16 -0
- ccai/restclient/github/public/schemas/webhookreleaseunpublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryadvisorypublished.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryadvisoryreported.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorycreated.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorydeleted.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorydispatchsample.py +19 -0
- ccai/restclient/github/public/schemas/webhookrepositoryedited.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryimport.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryprivatized.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositorypublicized.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrenamed.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetdeleted.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryrulesetedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookrepositorytransferred.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryunarchived.py +15 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertcreate.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertdismiss.py +18 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertreopen.py +16 -0
- ccai/restclient/github/public/schemas/webhookrepositoryvulnerabilityalertresolve.py +18 -0
- ccai/restclient/github/public/schemas/webhookrubygemsmetadata.py +21 -0
- ccai/restclient/github/public/schemas/webhooksalert.py +31 -0
- ccai/restclient/github/public/schemas/webhooksanswer.py +24 -0
- ccai/restclient/github/public/schemas/webhooksapprover.py +28 -0
- ccai/restclient/github/public/schemas/webhookschanges.py +15 -0
- ccai/restclient/github/public/schemas/webhookschanges8.py +12 -0
- ccai/restclient/github/public/schemas/webhookscomment.py +24 -0
- ccai/restclient/github/public/schemas/webhooksdeploykey.py +24 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertlocationcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertlocationcreatedformencoded.py +10 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertpubliclyleaked.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertreopened.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertresolved.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningalertvalidated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecretscanningscancompleted.py +24 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisorypublished.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisoryupdated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksecurityadvisorywithdrawn.py +18 -0
- ccai/restclient/github/public/schemas/webhooksecurityandanalysis.py +17 -0
- ccai/restclient/github/public/schemas/webhooksissue.py +48 -0
- ccai/restclient/github/public/schemas/webhooksissue2.py +48 -0
- ccai/restclient/github/public/schemas/webhooksissuecomment.py +26 -0
- ccai/restclient/github/public/schemas/webhookslabel.py +18 -0
- ccai/restclient/github/public/schemas/webhooksmarketplacepurchase.py +18 -0
- ccai/restclient/github/public/schemas/webhooksmembership.py +21 -0
- ccai/restclient/github/public/schemas/webhooksmilestone.py +30 -0
- ccai/restclient/github/public/schemas/webhooksmilestone3.py +30 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipcancelled.py +16 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipcreated.py +16 -0
- ccai/restclient/github/public/schemas/webhooksponsorshipedited.py +19 -0
- ccai/restclient/github/public/schemas/webhooksponsorshippendingcancellation.py +17 -0
- ccai/restclient/github/public/schemas/webhooksponsorshippendingtierchange.py +18 -0
- ccai/restclient/github/public/schemas/webhooksponsorshiptierchanged.py +17 -0
- ccai/restclient/github/public/schemas/webhookspreviousmarketplacepurchase.py +18 -0
- ccai/restclient/github/public/schemas/webhooksproject.py +24 -0
- ccai/restclient/github/public/schemas/webhooksprojectcard.py +24 -0
- ccai/restclient/github/public/schemas/webhooksprojectchanges.py +12 -0
- ccai/restclient/github/public/schemas/webhooksprojectcolumn.py +20 -0
- ccai/restclient/github/public/schemas/webhookspullrequest5.py +59 -0
- ccai/restclient/github/public/schemas/webhooksrelease.py +36 -0
- ccai/restclient/github/public/schemas/webhooksrelease1.py +36 -0
- ccai/restclient/github/public/schemas/webhooksreview.py +26 -0
- ccai/restclient/github/public/schemas/webhooksreviewcomment.py +41 -0
- ccai/restclient/github/public/schemas/webhooksrule.py +42 -0
- ccai/restclient/github/public/schemas/webhookssecurityadvisory.py +27 -0
- ccai/restclient/github/public/schemas/webhookssponsorship.py +18 -0
- ccai/restclient/github/public/schemas/webhookstarcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookstardeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookstatus.py +28 -0
- ccai/restclient/github/public/schemas/webhooksteam.py +28 -0
- ccai/restclient/github/public/schemas/webhooksteam1.py +28 -0
- ccai/restclient/github/public/schemas/webhooksubissuesparentissueadded.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuesparentissueremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuessubissueadded.py +19 -0
- ccai/restclient/github/public/schemas/webhooksubissuessubissueremoved.py +19 -0
- ccai/restclient/github/public/schemas/webhooksuser.py +33 -0
- ccai/restclient/github/public/schemas/webhooksusermannequin.py +33 -0
- ccai/restclient/github/public/schemas/webhooksworkflow.py +19 -0
- ccai/restclient/github/public/schemas/webhooksworkflowjobrun.py +19 -0
- ccai/restclient/github/public/schemas/webhookteamadd.py +15 -0
- ccai/restclient/github/public/schemas/webhookteamaddedtorepository.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamcreated.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamdeleted.py +18 -0
- ccai/restclient/github/public/schemas/webhookteamedited.py +19 -0
- ccai/restclient/github/public/schemas/webhookteamremovedfromrepository.py +18 -0
- ccai/restclient/github/public/schemas/webhookwatchstarted.py +15 -0
- ccai/restclient/github/public/schemas/webhookworkflowdispatch.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobcompleted.py +17 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobinprogress.py +17 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobqueued.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowjobwaiting.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowruncompleted.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowruninprogress.py +19 -0
- ccai/restclient/github/public/schemas/webhookworkflowrunrequested.py +19 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/METADATA +87 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/RECORD +579 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/WHEEL +4 -0
- codecraftai_restclient_github_public-1.2.0.dist-info/licenses/LICENSE.md +204 -0
|
@@ -0,0 +1,2054 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List, Optional, Union
|
|
4
|
+
|
|
5
|
+
from ccai.restclient.base.aspectsrest import AspectsRest
|
|
6
|
+
from ccai.restclient.base.pagedlist import PagedList
|
|
7
|
+
from ccai.restclient.base.restapigroup import RestApiGroup
|
|
8
|
+
from ccai.restclient.github.public.schemas.repos import SimpleUser
|
|
9
|
+
from ccai.restclient.github.public.schemas.users import Email
|
|
10
|
+
from ccai.restclient.github.public.schemas.users import GpgKey
|
|
11
|
+
from ccai.restclient.github.public.schemas.users import Hovercard
|
|
12
|
+
from ccai.restclient.github.public.schemas.users import Key
|
|
13
|
+
from ccai.restclient.github.public.schemas.users import KeySimple
|
|
14
|
+
from ccai.restclient.github.public.schemas.users import PrivateUser
|
|
15
|
+
from ccai.restclient.github.public.schemas.users import PublicUser
|
|
16
|
+
from ccai.restclient.github.public.schemas.users import SocialAccount
|
|
17
|
+
from ccai.restclient.github.public.schemas.users import SshSigningKey
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class UsersApiGroup(RestApiGroup):
|
|
21
|
+
"""
|
|
22
|
+
Interact with and view information about users and also current user.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
def add_email_for_authenticated_user(self, body: Union[Dict[str, Any], List[str], str], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
26
|
+
"""
|
|
27
|
+
Add an email address for the authenticated user
|
|
28
|
+
|
|
29
|
+
OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
|
|
30
|
+
"""
|
|
31
|
+
client = self.client
|
|
32
|
+
if aspects is None:
|
|
33
|
+
aspects = client.aspects
|
|
34
|
+
|
|
35
|
+
header_params = client.headers
|
|
36
|
+
if headers is not None:
|
|
37
|
+
header_params = headers
|
|
38
|
+
|
|
39
|
+
call_leaf = "/user/emails"
|
|
40
|
+
|
|
41
|
+
query_params = None
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
if exp_status is None:
|
|
45
|
+
exp_status = [201]
|
|
46
|
+
|
|
47
|
+
resp = client.perform_call(
|
|
48
|
+
leaf=call_leaf,
|
|
49
|
+
method="POST",
|
|
50
|
+
params=query_params if query_params else None,
|
|
51
|
+
body=body,
|
|
52
|
+
exp_status=exp_status,
|
|
53
|
+
headers=header_params if header_params else None,
|
|
54
|
+
context_msg=None,
|
|
55
|
+
aspects=aspects,
|
|
56
|
+
)
|
|
57
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
58
|
+
rtnval = None
|
|
59
|
+
else:
|
|
60
|
+
rtnval = resp.json()
|
|
61
|
+
return rtnval
|
|
62
|
+
|
|
63
|
+
def add_social_account_for_authenticated_user(self, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
64
|
+
"""
|
|
65
|
+
Add social accounts for the authenticated user
|
|
66
|
+
|
|
67
|
+
Add one or more social accounts to the authenticated user's profile.
|
|
68
|
+
|
|
69
|
+
OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
|
|
70
|
+
"""
|
|
71
|
+
client = self.client
|
|
72
|
+
if aspects is None:
|
|
73
|
+
aspects = client.aspects
|
|
74
|
+
|
|
75
|
+
header_params = client.headers
|
|
76
|
+
if headers is not None:
|
|
77
|
+
header_params = headers
|
|
78
|
+
|
|
79
|
+
call_leaf = "/user/social_accounts"
|
|
80
|
+
|
|
81
|
+
query_params = None
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if exp_status is None:
|
|
85
|
+
exp_status = [201]
|
|
86
|
+
|
|
87
|
+
resp = client.perform_call(
|
|
88
|
+
leaf=call_leaf,
|
|
89
|
+
method="POST",
|
|
90
|
+
params=query_params if query_params else None,
|
|
91
|
+
body=body,
|
|
92
|
+
exp_status=exp_status,
|
|
93
|
+
headers=header_params if header_params else None,
|
|
94
|
+
context_msg=None,
|
|
95
|
+
aspects=aspects,
|
|
96
|
+
)
|
|
97
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
98
|
+
rtnval = None
|
|
99
|
+
else:
|
|
100
|
+
rtnval = resp.json()
|
|
101
|
+
return rtnval
|
|
102
|
+
|
|
103
|
+
def block(self, username: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
104
|
+
"""
|
|
105
|
+
Block a user
|
|
106
|
+
|
|
107
|
+
Blocks the given user and returns a 204. If the authenticated user cannot block the given user a 422 is returned.
|
|
108
|
+
"""
|
|
109
|
+
client = self.client
|
|
110
|
+
if aspects is None:
|
|
111
|
+
aspects = client.aspects
|
|
112
|
+
|
|
113
|
+
header_params = client.headers
|
|
114
|
+
if headers is not None:
|
|
115
|
+
header_params = headers
|
|
116
|
+
|
|
117
|
+
leaf_template = "/user/blocks/{username}"
|
|
118
|
+
path_params = {
|
|
119
|
+
'username': username,
|
|
120
|
+
}
|
|
121
|
+
call_leaf = leaf_template.format(**path_params)
|
|
122
|
+
|
|
123
|
+
query_params = None
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
if exp_status is None:
|
|
127
|
+
exp_status = [204]
|
|
128
|
+
|
|
129
|
+
resp = client.perform_call(
|
|
130
|
+
leaf=call_leaf,
|
|
131
|
+
method="PUT",
|
|
132
|
+
params=query_params if query_params else None,
|
|
133
|
+
body=None,
|
|
134
|
+
exp_status=exp_status,
|
|
135
|
+
headers=header_params if header_params else None,
|
|
136
|
+
context_msg=None,
|
|
137
|
+
aspects=aspects,
|
|
138
|
+
)
|
|
139
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
140
|
+
rtnval = None
|
|
141
|
+
else:
|
|
142
|
+
rtnval = resp.json()
|
|
143
|
+
return rtnval
|
|
144
|
+
|
|
145
|
+
def check_blocked(self, username: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
146
|
+
"""
|
|
147
|
+
Check if a user is blocked by the authenticated user
|
|
148
|
+
|
|
149
|
+
Returns a 204 if the given user is blocked by the authenticated user. Returns a 404 if the given user is not blocked by the authenticated user, or if the given user account has been identified as spam by GitHub.
|
|
150
|
+
"""
|
|
151
|
+
client = self.client
|
|
152
|
+
if aspects is None:
|
|
153
|
+
aspects = client.aspects
|
|
154
|
+
|
|
155
|
+
header_params = client.headers
|
|
156
|
+
if headers is not None:
|
|
157
|
+
header_params = headers
|
|
158
|
+
|
|
159
|
+
leaf_template = "/user/blocks/{username}"
|
|
160
|
+
path_params = {
|
|
161
|
+
'username': username,
|
|
162
|
+
}
|
|
163
|
+
call_leaf = leaf_template.format(**path_params)
|
|
164
|
+
|
|
165
|
+
query_params = None
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
if exp_status is None:
|
|
169
|
+
exp_status = [204]
|
|
170
|
+
|
|
171
|
+
resp = client.perform_call(
|
|
172
|
+
leaf=call_leaf,
|
|
173
|
+
method="GET",
|
|
174
|
+
params=query_params if query_params else None,
|
|
175
|
+
body=None,
|
|
176
|
+
exp_status=exp_status,
|
|
177
|
+
headers=header_params if header_params else None,
|
|
178
|
+
context_msg=None,
|
|
179
|
+
aspects=aspects,
|
|
180
|
+
)
|
|
181
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
182
|
+
rtnval = None
|
|
183
|
+
else:
|
|
184
|
+
rtnval = resp.json()
|
|
185
|
+
return rtnval
|
|
186
|
+
|
|
187
|
+
def check_following_for_user(self, username: str, target_user: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
188
|
+
"""
|
|
189
|
+
Check if a user follows another user
|
|
190
|
+
"""
|
|
191
|
+
client = self.client
|
|
192
|
+
if aspects is None:
|
|
193
|
+
aspects = client.aspects
|
|
194
|
+
|
|
195
|
+
header_params = client.headers
|
|
196
|
+
if headers is not None:
|
|
197
|
+
header_params = headers
|
|
198
|
+
|
|
199
|
+
leaf_template = "/users/{username}/following/{target_user}"
|
|
200
|
+
path_params = {
|
|
201
|
+
'username': username,
|
|
202
|
+
'target_user': target_user,
|
|
203
|
+
}
|
|
204
|
+
call_leaf = leaf_template.format(**path_params)
|
|
205
|
+
|
|
206
|
+
query_params = None
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
if exp_status is None:
|
|
210
|
+
exp_status = [204]
|
|
211
|
+
|
|
212
|
+
resp = client.perform_call(
|
|
213
|
+
leaf=call_leaf,
|
|
214
|
+
method="GET",
|
|
215
|
+
params=query_params if query_params else None,
|
|
216
|
+
body=None,
|
|
217
|
+
exp_status=exp_status,
|
|
218
|
+
headers=header_params if header_params else None,
|
|
219
|
+
context_msg=None,
|
|
220
|
+
aspects=aspects,
|
|
221
|
+
)
|
|
222
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
223
|
+
rtnval = None
|
|
224
|
+
else:
|
|
225
|
+
rtnval = resp.json()
|
|
226
|
+
return rtnval
|
|
227
|
+
|
|
228
|
+
def check_person_is_followed_by_authenticated(self, username: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
229
|
+
"""
|
|
230
|
+
Check if a person is followed by the authenticated user
|
|
231
|
+
"""
|
|
232
|
+
client = self.client
|
|
233
|
+
if aspects is None:
|
|
234
|
+
aspects = client.aspects
|
|
235
|
+
|
|
236
|
+
header_params = client.headers
|
|
237
|
+
if headers is not None:
|
|
238
|
+
header_params = headers
|
|
239
|
+
|
|
240
|
+
leaf_template = "/user/following/{username}"
|
|
241
|
+
path_params = {
|
|
242
|
+
'username': username,
|
|
243
|
+
}
|
|
244
|
+
call_leaf = leaf_template.format(**path_params)
|
|
245
|
+
|
|
246
|
+
query_params = None
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
if exp_status is None:
|
|
250
|
+
exp_status = [204]
|
|
251
|
+
|
|
252
|
+
resp = client.perform_call(
|
|
253
|
+
leaf=call_leaf,
|
|
254
|
+
method="GET",
|
|
255
|
+
params=query_params if query_params else None,
|
|
256
|
+
body=None,
|
|
257
|
+
exp_status=exp_status,
|
|
258
|
+
headers=header_params if header_params else None,
|
|
259
|
+
context_msg=None,
|
|
260
|
+
aspects=aspects,
|
|
261
|
+
)
|
|
262
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
263
|
+
rtnval = None
|
|
264
|
+
else:
|
|
265
|
+
rtnval = resp.json()
|
|
266
|
+
return rtnval
|
|
267
|
+
|
|
268
|
+
def create_gpg_key_for_authenticated_user(self, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
269
|
+
"""
|
|
270
|
+
Create a GPG key for the authenticated user
|
|
271
|
+
|
|
272
|
+
Adds a GPG key to the authenticated user's GitHub account.
|
|
273
|
+
|
|
274
|
+
OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint.
|
|
275
|
+
"""
|
|
276
|
+
client = self.client
|
|
277
|
+
if aspects is None:
|
|
278
|
+
aspects = client.aspects
|
|
279
|
+
|
|
280
|
+
header_params = client.headers
|
|
281
|
+
if headers is not None:
|
|
282
|
+
header_params = headers
|
|
283
|
+
|
|
284
|
+
call_leaf = "/user/gpg_keys"
|
|
285
|
+
|
|
286
|
+
query_params = None
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
if exp_status is None:
|
|
290
|
+
exp_status = [201]
|
|
291
|
+
|
|
292
|
+
resp = client.perform_call(
|
|
293
|
+
leaf=call_leaf,
|
|
294
|
+
method="POST",
|
|
295
|
+
params=query_params if query_params else None,
|
|
296
|
+
body=body,
|
|
297
|
+
exp_status=exp_status,
|
|
298
|
+
headers=header_params if header_params else None,
|
|
299
|
+
context_msg=None,
|
|
300
|
+
aspects=aspects,
|
|
301
|
+
)
|
|
302
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
303
|
+
rtnval = None
|
|
304
|
+
else:
|
|
305
|
+
rtnval = resp.json()
|
|
306
|
+
return rtnval
|
|
307
|
+
|
|
308
|
+
def create_public_ssh_key_for_authenticated_user(self, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
309
|
+
"""
|
|
310
|
+
Create a public SSH key for the authenticated user
|
|
311
|
+
|
|
312
|
+
Adds a public SSH key to the authenticated user's GitHub account.
|
|
313
|
+
|
|
314
|
+
OAuth app tokens and personal access tokens (classic) need the `write:gpg_key` scope to use this endpoint.
|
|
315
|
+
"""
|
|
316
|
+
client = self.client
|
|
317
|
+
if aspects is None:
|
|
318
|
+
aspects = client.aspects
|
|
319
|
+
|
|
320
|
+
header_params = client.headers
|
|
321
|
+
if headers is not None:
|
|
322
|
+
header_params = headers
|
|
323
|
+
|
|
324
|
+
call_leaf = "/user/keys"
|
|
325
|
+
|
|
326
|
+
query_params = None
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
if exp_status is None:
|
|
330
|
+
exp_status = [201]
|
|
331
|
+
|
|
332
|
+
resp = client.perform_call(
|
|
333
|
+
leaf=call_leaf,
|
|
334
|
+
method="POST",
|
|
335
|
+
params=query_params if query_params else None,
|
|
336
|
+
body=body,
|
|
337
|
+
exp_status=exp_status,
|
|
338
|
+
headers=header_params if header_params else None,
|
|
339
|
+
context_msg=None,
|
|
340
|
+
aspects=aspects,
|
|
341
|
+
)
|
|
342
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
343
|
+
rtnval = None
|
|
344
|
+
else:
|
|
345
|
+
rtnval = resp.json()
|
|
346
|
+
return rtnval
|
|
347
|
+
|
|
348
|
+
def create_ssh_signing_key_for_authenticated_user(self, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
349
|
+
"""
|
|
350
|
+
Create a SSH signing key for the authenticated user
|
|
351
|
+
|
|
352
|
+
Creates an SSH signing key for the authenticated user's GitHub account.
|
|
353
|
+
|
|
354
|
+
OAuth app tokens and personal access tokens (classic) need the `write:ssh_signing_key` scope to use this endpoint.
|
|
355
|
+
"""
|
|
356
|
+
client = self.client
|
|
357
|
+
if aspects is None:
|
|
358
|
+
aspects = client.aspects
|
|
359
|
+
|
|
360
|
+
header_params = client.headers
|
|
361
|
+
if headers is not None:
|
|
362
|
+
header_params = headers
|
|
363
|
+
|
|
364
|
+
call_leaf = "/user/ssh_signing_keys"
|
|
365
|
+
|
|
366
|
+
query_params = None
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
if exp_status is None:
|
|
370
|
+
exp_status = [201]
|
|
371
|
+
|
|
372
|
+
resp = client.perform_call(
|
|
373
|
+
leaf=call_leaf,
|
|
374
|
+
method="POST",
|
|
375
|
+
params=query_params if query_params else None,
|
|
376
|
+
body=body,
|
|
377
|
+
exp_status=exp_status,
|
|
378
|
+
headers=header_params if header_params else None,
|
|
379
|
+
context_msg=None,
|
|
380
|
+
aspects=aspects,
|
|
381
|
+
)
|
|
382
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
383
|
+
rtnval = None
|
|
384
|
+
else:
|
|
385
|
+
rtnval = resp.json()
|
|
386
|
+
return rtnval
|
|
387
|
+
|
|
388
|
+
def delete_attestations_bulk(self, username: str, body: Union[str, str], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
389
|
+
"""
|
|
390
|
+
Delete attestations in bulk
|
|
391
|
+
|
|
392
|
+
Delete artifact attestations in bulk by either subject digests or unique ID.
|
|
393
|
+
"""
|
|
394
|
+
client = self.client
|
|
395
|
+
if aspects is None:
|
|
396
|
+
aspects = client.aspects
|
|
397
|
+
|
|
398
|
+
header_params = client.headers
|
|
399
|
+
if headers is not None:
|
|
400
|
+
header_params = headers
|
|
401
|
+
|
|
402
|
+
leaf_template = "/users/{username}/attestations/delete-request"
|
|
403
|
+
path_params = {
|
|
404
|
+
'username': username,
|
|
405
|
+
}
|
|
406
|
+
call_leaf = leaf_template.format(**path_params)
|
|
407
|
+
|
|
408
|
+
query_params = None
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
if exp_status is None:
|
|
412
|
+
exp_status = [200]
|
|
413
|
+
|
|
414
|
+
resp = client.perform_call(
|
|
415
|
+
leaf=call_leaf,
|
|
416
|
+
method="POST",
|
|
417
|
+
params=query_params if query_params else None,
|
|
418
|
+
body=body,
|
|
419
|
+
exp_status=exp_status,
|
|
420
|
+
headers=header_params if header_params else None,
|
|
421
|
+
context_msg=None,
|
|
422
|
+
aspects=aspects,
|
|
423
|
+
)
|
|
424
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
425
|
+
rtnval = None
|
|
426
|
+
else:
|
|
427
|
+
rtnval = resp.json()
|
|
428
|
+
return rtnval
|
|
429
|
+
|
|
430
|
+
def delete_attestations_by_id(self, username: str, attestation_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
431
|
+
"""
|
|
432
|
+
Delete attestations by ID
|
|
433
|
+
|
|
434
|
+
Delete an artifact attestation by unique ID that is associated with a repository owned by a user.
|
|
435
|
+
"""
|
|
436
|
+
client = self.client
|
|
437
|
+
if aspects is None:
|
|
438
|
+
aspects = client.aspects
|
|
439
|
+
|
|
440
|
+
header_params = client.headers
|
|
441
|
+
if headers is not None:
|
|
442
|
+
header_params = headers
|
|
443
|
+
|
|
444
|
+
leaf_template = "/users/{username}/attestations/{attestation_id}"
|
|
445
|
+
path_params = {
|
|
446
|
+
'username': username,
|
|
447
|
+
'attestation_id': attestation_id,
|
|
448
|
+
}
|
|
449
|
+
call_leaf = leaf_template.format(**path_params)
|
|
450
|
+
|
|
451
|
+
query_params = None
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
if exp_status is None:
|
|
455
|
+
exp_status = [200, 204]
|
|
456
|
+
|
|
457
|
+
resp = client.perform_call(
|
|
458
|
+
leaf=call_leaf,
|
|
459
|
+
method="DELETE",
|
|
460
|
+
params=query_params if query_params else None,
|
|
461
|
+
body=None,
|
|
462
|
+
exp_status=exp_status,
|
|
463
|
+
headers=header_params if header_params else None,
|
|
464
|
+
context_msg=None,
|
|
465
|
+
aspects=aspects,
|
|
466
|
+
)
|
|
467
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
468
|
+
rtnval = None
|
|
469
|
+
else:
|
|
470
|
+
rtnval = resp.json()
|
|
471
|
+
return rtnval
|
|
472
|
+
|
|
473
|
+
def delete_attestations_by_subject_digest(self, username: str, subject_digest: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
474
|
+
"""
|
|
475
|
+
Delete attestations by subject digest
|
|
476
|
+
|
|
477
|
+
Delete an artifact attestation by subject digest.
|
|
478
|
+
"""
|
|
479
|
+
client = self.client
|
|
480
|
+
if aspects is None:
|
|
481
|
+
aspects = client.aspects
|
|
482
|
+
|
|
483
|
+
header_params = client.headers
|
|
484
|
+
if headers is not None:
|
|
485
|
+
header_params = headers
|
|
486
|
+
|
|
487
|
+
leaf_template = "/users/{username}/attestations/digest/{subject_digest}"
|
|
488
|
+
path_params = {
|
|
489
|
+
'username': username,
|
|
490
|
+
'subject_digest': subject_digest,
|
|
491
|
+
}
|
|
492
|
+
call_leaf = leaf_template.format(**path_params)
|
|
493
|
+
|
|
494
|
+
query_params = None
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
if exp_status is None:
|
|
498
|
+
exp_status = [200, 204]
|
|
499
|
+
|
|
500
|
+
resp = client.perform_call(
|
|
501
|
+
leaf=call_leaf,
|
|
502
|
+
method="DELETE",
|
|
503
|
+
params=query_params if query_params else None,
|
|
504
|
+
body=None,
|
|
505
|
+
exp_status=exp_status,
|
|
506
|
+
headers=header_params if header_params else None,
|
|
507
|
+
context_msg=None,
|
|
508
|
+
aspects=aspects,
|
|
509
|
+
)
|
|
510
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
511
|
+
rtnval = None
|
|
512
|
+
else:
|
|
513
|
+
rtnval = resp.json()
|
|
514
|
+
return rtnval
|
|
515
|
+
|
|
516
|
+
def delete_email_for_authenticated_user(self, body: Union[Dict[str, Any], List[str], str], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
517
|
+
"""
|
|
518
|
+
Delete an email address for the authenticated user
|
|
519
|
+
|
|
520
|
+
OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
|
|
521
|
+
"""
|
|
522
|
+
client = self.client
|
|
523
|
+
if aspects is None:
|
|
524
|
+
aspects = client.aspects
|
|
525
|
+
|
|
526
|
+
header_params = client.headers
|
|
527
|
+
if headers is not None:
|
|
528
|
+
header_params = headers
|
|
529
|
+
|
|
530
|
+
call_leaf = "/user/emails"
|
|
531
|
+
|
|
532
|
+
query_params = None
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
if exp_status is None:
|
|
536
|
+
exp_status = [204]
|
|
537
|
+
|
|
538
|
+
resp = client.perform_call(
|
|
539
|
+
leaf=call_leaf,
|
|
540
|
+
method="DELETE",
|
|
541
|
+
params=query_params if query_params else None,
|
|
542
|
+
body=body,
|
|
543
|
+
exp_status=exp_status,
|
|
544
|
+
headers=header_params if header_params else None,
|
|
545
|
+
context_msg=None,
|
|
546
|
+
aspects=aspects,
|
|
547
|
+
)
|
|
548
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
549
|
+
rtnval = None
|
|
550
|
+
else:
|
|
551
|
+
rtnval = resp.json()
|
|
552
|
+
return rtnval
|
|
553
|
+
|
|
554
|
+
def delete_gpg_key_for_authenticated_user(self, gpg_key_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
555
|
+
"""
|
|
556
|
+
Delete a GPG key for the authenticated user
|
|
557
|
+
|
|
558
|
+
Removes a GPG key from the authenticated user's GitHub account.
|
|
559
|
+
|
|
560
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:gpg_key` scope to use this endpoint.
|
|
561
|
+
"""
|
|
562
|
+
client = self.client
|
|
563
|
+
if aspects is None:
|
|
564
|
+
aspects = client.aspects
|
|
565
|
+
|
|
566
|
+
header_params = client.headers
|
|
567
|
+
if headers is not None:
|
|
568
|
+
header_params = headers
|
|
569
|
+
|
|
570
|
+
leaf_template = "/user/gpg_keys/{gpg_key_id}"
|
|
571
|
+
path_params = {
|
|
572
|
+
'gpg_key_id': gpg_key_id,
|
|
573
|
+
}
|
|
574
|
+
call_leaf = leaf_template.format(**path_params)
|
|
575
|
+
|
|
576
|
+
query_params = None
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
if exp_status is None:
|
|
580
|
+
exp_status = [204]
|
|
581
|
+
|
|
582
|
+
resp = client.perform_call(
|
|
583
|
+
leaf=call_leaf,
|
|
584
|
+
method="DELETE",
|
|
585
|
+
params=query_params if query_params else None,
|
|
586
|
+
body=None,
|
|
587
|
+
exp_status=exp_status,
|
|
588
|
+
headers=header_params if header_params else None,
|
|
589
|
+
context_msg=None,
|
|
590
|
+
aspects=aspects,
|
|
591
|
+
)
|
|
592
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
593
|
+
rtnval = None
|
|
594
|
+
else:
|
|
595
|
+
rtnval = resp.json()
|
|
596
|
+
return rtnval
|
|
597
|
+
|
|
598
|
+
def delete_public_ssh_key_for_authenticated_user(self, key_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
599
|
+
"""
|
|
600
|
+
Delete a public SSH key for the authenticated user
|
|
601
|
+
|
|
602
|
+
Removes a public SSH key from the authenticated user's GitHub account.
|
|
603
|
+
|
|
604
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:public_key` scope to use this endpoint.
|
|
605
|
+
"""
|
|
606
|
+
client = self.client
|
|
607
|
+
if aspects is None:
|
|
608
|
+
aspects = client.aspects
|
|
609
|
+
|
|
610
|
+
header_params = client.headers
|
|
611
|
+
if headers is not None:
|
|
612
|
+
header_params = headers
|
|
613
|
+
|
|
614
|
+
leaf_template = "/user/keys/{key_id}"
|
|
615
|
+
path_params = {
|
|
616
|
+
'key_id': key_id,
|
|
617
|
+
}
|
|
618
|
+
call_leaf = leaf_template.format(**path_params)
|
|
619
|
+
|
|
620
|
+
query_params = None
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
if exp_status is None:
|
|
624
|
+
exp_status = [204]
|
|
625
|
+
|
|
626
|
+
resp = client.perform_call(
|
|
627
|
+
leaf=call_leaf,
|
|
628
|
+
method="DELETE",
|
|
629
|
+
params=query_params if query_params else None,
|
|
630
|
+
body=None,
|
|
631
|
+
exp_status=exp_status,
|
|
632
|
+
headers=header_params if header_params else None,
|
|
633
|
+
context_msg=None,
|
|
634
|
+
aspects=aspects,
|
|
635
|
+
)
|
|
636
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
637
|
+
rtnval = None
|
|
638
|
+
else:
|
|
639
|
+
rtnval = resp.json()
|
|
640
|
+
return rtnval
|
|
641
|
+
|
|
642
|
+
def delete_social_account_for_authenticated_user(self, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
643
|
+
"""
|
|
644
|
+
Delete social accounts for the authenticated user
|
|
645
|
+
|
|
646
|
+
Deletes one or more social accounts from the authenticated user's profile.
|
|
647
|
+
|
|
648
|
+
OAuth app tokens and personal access tokens (classic) need the `user` scope to use this endpoint.
|
|
649
|
+
"""
|
|
650
|
+
client = self.client
|
|
651
|
+
if aspects is None:
|
|
652
|
+
aspects = client.aspects
|
|
653
|
+
|
|
654
|
+
header_params = client.headers
|
|
655
|
+
if headers is not None:
|
|
656
|
+
header_params = headers
|
|
657
|
+
|
|
658
|
+
call_leaf = "/user/social_accounts"
|
|
659
|
+
|
|
660
|
+
query_params = None
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
if exp_status is None:
|
|
664
|
+
exp_status = [204]
|
|
665
|
+
|
|
666
|
+
resp = client.perform_call(
|
|
667
|
+
leaf=call_leaf,
|
|
668
|
+
method="DELETE",
|
|
669
|
+
params=query_params if query_params else None,
|
|
670
|
+
body=body,
|
|
671
|
+
exp_status=exp_status,
|
|
672
|
+
headers=header_params if header_params else None,
|
|
673
|
+
context_msg=None,
|
|
674
|
+
aspects=aspects,
|
|
675
|
+
)
|
|
676
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
677
|
+
rtnval = None
|
|
678
|
+
else:
|
|
679
|
+
rtnval = resp.json()
|
|
680
|
+
return rtnval
|
|
681
|
+
|
|
682
|
+
def delete_ssh_signing_key_for_authenticated_user(self, ssh_signing_key_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
683
|
+
"""
|
|
684
|
+
Delete an SSH signing key for the authenticated user
|
|
685
|
+
|
|
686
|
+
Deletes an SSH signing key from the authenticated user's GitHub account.
|
|
687
|
+
|
|
688
|
+
OAuth app tokens and personal access tokens (classic) need the `admin:ssh_signing_key` scope to use this endpoint.
|
|
689
|
+
"""
|
|
690
|
+
client = self.client
|
|
691
|
+
if aspects is None:
|
|
692
|
+
aspects = client.aspects
|
|
693
|
+
|
|
694
|
+
header_params = client.headers
|
|
695
|
+
if headers is not None:
|
|
696
|
+
header_params = headers
|
|
697
|
+
|
|
698
|
+
leaf_template = "/user/ssh_signing_keys/{ssh_signing_key_id}"
|
|
699
|
+
path_params = {
|
|
700
|
+
'ssh_signing_key_id': ssh_signing_key_id,
|
|
701
|
+
}
|
|
702
|
+
call_leaf = leaf_template.format(**path_params)
|
|
703
|
+
|
|
704
|
+
query_params = None
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
if exp_status is None:
|
|
708
|
+
exp_status = [204]
|
|
709
|
+
|
|
710
|
+
resp = client.perform_call(
|
|
711
|
+
leaf=call_leaf,
|
|
712
|
+
method="DELETE",
|
|
713
|
+
params=query_params if query_params else None,
|
|
714
|
+
body=None,
|
|
715
|
+
exp_status=exp_status,
|
|
716
|
+
headers=header_params if header_params else None,
|
|
717
|
+
context_msg=None,
|
|
718
|
+
aspects=aspects,
|
|
719
|
+
)
|
|
720
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
721
|
+
rtnval = None
|
|
722
|
+
else:
|
|
723
|
+
rtnval = resp.json()
|
|
724
|
+
return rtnval
|
|
725
|
+
|
|
726
|
+
def follow(self, username: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
727
|
+
"""
|
|
728
|
+
Follow a user
|
|
729
|
+
|
|
730
|
+
Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#http-method)."
|
|
731
|
+
|
|
732
|
+
OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint.
|
|
733
|
+
"""
|
|
734
|
+
client = self.client
|
|
735
|
+
if aspects is None:
|
|
736
|
+
aspects = client.aspects
|
|
737
|
+
|
|
738
|
+
header_params = client.headers
|
|
739
|
+
if headers is not None:
|
|
740
|
+
header_params = headers
|
|
741
|
+
|
|
742
|
+
leaf_template = "/user/following/{username}"
|
|
743
|
+
path_params = {
|
|
744
|
+
'username': username,
|
|
745
|
+
}
|
|
746
|
+
call_leaf = leaf_template.format(**path_params)
|
|
747
|
+
|
|
748
|
+
query_params = None
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
if exp_status is None:
|
|
752
|
+
exp_status = [204]
|
|
753
|
+
|
|
754
|
+
resp = client.perform_call(
|
|
755
|
+
leaf=call_leaf,
|
|
756
|
+
method="PUT",
|
|
757
|
+
params=query_params if query_params else None,
|
|
758
|
+
body=None,
|
|
759
|
+
exp_status=exp_status,
|
|
760
|
+
headers=header_params if header_params else None,
|
|
761
|
+
context_msg=None,
|
|
762
|
+
aspects=aspects,
|
|
763
|
+
)
|
|
764
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
765
|
+
rtnval = None
|
|
766
|
+
else:
|
|
767
|
+
rtnval = resp.json()
|
|
768
|
+
return rtnval
|
|
769
|
+
|
|
770
|
+
def get_authenticated(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Union[PrivateUser, PublicUser]:
|
|
771
|
+
"""
|
|
772
|
+
Get the authenticated user
|
|
773
|
+
|
|
774
|
+
OAuth app tokens and personal access tokens (classic) need the `user` scope in order for the response to include private profile information.
|
|
775
|
+
"""
|
|
776
|
+
client = self.client
|
|
777
|
+
if aspects is None:
|
|
778
|
+
aspects = client.aspects
|
|
779
|
+
|
|
780
|
+
header_params = client.headers
|
|
781
|
+
if headers is not None:
|
|
782
|
+
header_params = headers
|
|
783
|
+
|
|
784
|
+
call_leaf = "/user"
|
|
785
|
+
|
|
786
|
+
query_params = None
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
if exp_status is None:
|
|
790
|
+
exp_status = [200]
|
|
791
|
+
|
|
792
|
+
resp = client.perform_call(
|
|
793
|
+
leaf=call_leaf,
|
|
794
|
+
method="GET",
|
|
795
|
+
params=query_params if query_params else None,
|
|
796
|
+
body=None,
|
|
797
|
+
exp_status=exp_status,
|
|
798
|
+
headers=header_params if header_params else None,
|
|
799
|
+
context_msg=None,
|
|
800
|
+
aspects=aspects,
|
|
801
|
+
)
|
|
802
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
803
|
+
rtnval = None
|
|
804
|
+
else:
|
|
805
|
+
raw_data = resp.json()
|
|
806
|
+
rtnval = self._parse_item(raw_data, Union[PrivateUser, PublicUser])
|
|
807
|
+
return rtnval
|
|
808
|
+
|
|
809
|
+
def get_by_id(self, account_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Union[PrivateUser, PublicUser]:
|
|
810
|
+
"""
|
|
811
|
+
Get a user using their ID
|
|
812
|
+
|
|
813
|
+
Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.
|
|
814
|
+
|
|
815
|
+
If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.
|
|
816
|
+
|
|
817
|
+
The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).
|
|
818
|
+
|
|
819
|
+
The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails).
|
|
820
|
+
"""
|
|
821
|
+
client = self.client
|
|
822
|
+
if aspects is None:
|
|
823
|
+
aspects = client.aspects
|
|
824
|
+
|
|
825
|
+
header_params = client.headers
|
|
826
|
+
if headers is not None:
|
|
827
|
+
header_params = headers
|
|
828
|
+
|
|
829
|
+
leaf_template = "/user/{account_id}"
|
|
830
|
+
path_params = {
|
|
831
|
+
'account_id': account_id,
|
|
832
|
+
}
|
|
833
|
+
call_leaf = leaf_template.format(**path_params)
|
|
834
|
+
|
|
835
|
+
query_params = None
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
if exp_status is None:
|
|
839
|
+
exp_status = [200]
|
|
840
|
+
|
|
841
|
+
resp = client.perform_call(
|
|
842
|
+
leaf=call_leaf,
|
|
843
|
+
method="GET",
|
|
844
|
+
params=query_params if query_params else None,
|
|
845
|
+
body=None,
|
|
846
|
+
exp_status=exp_status,
|
|
847
|
+
headers=header_params if header_params else None,
|
|
848
|
+
context_msg=None,
|
|
849
|
+
aspects=aspects,
|
|
850
|
+
)
|
|
851
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
852
|
+
rtnval = None
|
|
853
|
+
else:
|
|
854
|
+
raw_data = resp.json()
|
|
855
|
+
rtnval = self._parse_item(raw_data, Union[PrivateUser, PublicUser])
|
|
856
|
+
return rtnval
|
|
857
|
+
|
|
858
|
+
def get_by_username(self, username: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Union[PrivateUser, PublicUser]:
|
|
859
|
+
"""
|
|
860
|
+
Get a user
|
|
861
|
+
|
|
862
|
+
Provides publicly available information about someone with a GitHub account.
|
|
863
|
+
|
|
864
|
+
If you are requesting information about an [Enterprise Managed User](https://docs.github.com/enterprise-cloud@latest/admin/managing-iam/understanding-iam-for-enterprises/about-enterprise-managed-users), or a GitHub App bot that is installed in an organization that uses Enterprise Managed Users, your requests must be authenticated as a user or GitHub App that has access to the organization to view that account's information. If you are not authorized, the request will return a `404 Not Found` status.
|
|
865
|
+
|
|
866
|
+
The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be public which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).
|
|
867
|
+
|
|
868
|
+
The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see [Emails API](https://docs.github.com/rest/users/emails).
|
|
869
|
+
"""
|
|
870
|
+
client = self.client
|
|
871
|
+
if aspects is None:
|
|
872
|
+
aspects = client.aspects
|
|
873
|
+
|
|
874
|
+
header_params = client.headers
|
|
875
|
+
if headers is not None:
|
|
876
|
+
header_params = headers
|
|
877
|
+
|
|
878
|
+
leaf_template = "/users/{username}"
|
|
879
|
+
path_params = {
|
|
880
|
+
'username': username,
|
|
881
|
+
}
|
|
882
|
+
call_leaf = leaf_template.format(**path_params)
|
|
883
|
+
|
|
884
|
+
query_params = None
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
if exp_status is None:
|
|
888
|
+
exp_status = [200]
|
|
889
|
+
|
|
890
|
+
resp = client.perform_call(
|
|
891
|
+
leaf=call_leaf,
|
|
892
|
+
method="GET",
|
|
893
|
+
params=query_params if query_params else None,
|
|
894
|
+
body=None,
|
|
895
|
+
exp_status=exp_status,
|
|
896
|
+
headers=header_params if header_params else None,
|
|
897
|
+
context_msg=None,
|
|
898
|
+
aspects=aspects,
|
|
899
|
+
)
|
|
900
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
901
|
+
rtnval = None
|
|
902
|
+
else:
|
|
903
|
+
raw_data = resp.json()
|
|
904
|
+
rtnval = self._parse_item(raw_data, Union[PrivateUser, PublicUser])
|
|
905
|
+
return rtnval
|
|
906
|
+
|
|
907
|
+
def get_context_for_user(self, username: str, *, subject_type: Optional[str] = None, subject_id: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Hovercard:
|
|
908
|
+
"""
|
|
909
|
+
Get contextual information for a user
|
|
910
|
+
|
|
911
|
+
Provides hovercard information. You can find out more about someone in relation to their pull requests, issues, repositories, and organizations.
|
|
912
|
+
|
|
913
|
+
The `subject_type` and `subject_id` parameters provide context for the person's hovercard, which returns more information than without the parameters. For example, if you wanted to find out more about `octocat` who owns the `Spoon-Knife` repository, you would use a `subject_type` value of `repository` and a `subject_id` value of `1300192` (the ID of the `Spoon-Knife` repository).
|
|
914
|
+
|
|
915
|
+
OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint.
|
|
916
|
+
"""
|
|
917
|
+
client = self.client
|
|
918
|
+
if aspects is None:
|
|
919
|
+
aspects = client.aspects
|
|
920
|
+
|
|
921
|
+
header_params = client.headers
|
|
922
|
+
if headers is not None:
|
|
923
|
+
header_params = headers
|
|
924
|
+
|
|
925
|
+
leaf_template = "/users/{username}/hovercard"
|
|
926
|
+
path_params = {
|
|
927
|
+
'username': username,
|
|
928
|
+
}
|
|
929
|
+
call_leaf = leaf_template.format(**path_params)
|
|
930
|
+
|
|
931
|
+
query_params = {}
|
|
932
|
+
if subject_type is not None:
|
|
933
|
+
query_params['subject_type'] = subject_type
|
|
934
|
+
if subject_id is not None:
|
|
935
|
+
query_params['subject_id'] = subject_id
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
if exp_status is None:
|
|
939
|
+
exp_status = [200]
|
|
940
|
+
|
|
941
|
+
resp = client.perform_call(
|
|
942
|
+
leaf=call_leaf,
|
|
943
|
+
method="GET",
|
|
944
|
+
params=query_params if query_params else None,
|
|
945
|
+
body=None,
|
|
946
|
+
exp_status=exp_status,
|
|
947
|
+
headers=header_params if header_params else None,
|
|
948
|
+
context_msg=None,
|
|
949
|
+
aspects=aspects,
|
|
950
|
+
)
|
|
951
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
952
|
+
rtnobj = None
|
|
953
|
+
else:
|
|
954
|
+
raw_data = resp.json()
|
|
955
|
+
rtnobj = Hovercard.from_dict(raw_data)
|
|
956
|
+
return rtnobj
|
|
957
|
+
|
|
958
|
+
def get_gpg_key_for_authenticated_user(self, gpg_key_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> GpgKey:
|
|
959
|
+
"""
|
|
960
|
+
Get a GPG key for the authenticated user
|
|
961
|
+
|
|
962
|
+
View extended details for a single GPG key.
|
|
963
|
+
|
|
964
|
+
OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint.
|
|
965
|
+
"""
|
|
966
|
+
client = self.client
|
|
967
|
+
if aspects is None:
|
|
968
|
+
aspects = client.aspects
|
|
969
|
+
|
|
970
|
+
header_params = client.headers
|
|
971
|
+
if headers is not None:
|
|
972
|
+
header_params = headers
|
|
973
|
+
|
|
974
|
+
leaf_template = "/user/gpg_keys/{gpg_key_id}"
|
|
975
|
+
path_params = {
|
|
976
|
+
'gpg_key_id': gpg_key_id,
|
|
977
|
+
}
|
|
978
|
+
call_leaf = leaf_template.format(**path_params)
|
|
979
|
+
|
|
980
|
+
query_params = None
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
if exp_status is None:
|
|
984
|
+
exp_status = [200]
|
|
985
|
+
|
|
986
|
+
resp = client.perform_call(
|
|
987
|
+
leaf=call_leaf,
|
|
988
|
+
method="GET",
|
|
989
|
+
params=query_params if query_params else None,
|
|
990
|
+
body=None,
|
|
991
|
+
exp_status=exp_status,
|
|
992
|
+
headers=header_params if header_params else None,
|
|
993
|
+
context_msg=None,
|
|
994
|
+
aspects=aspects,
|
|
995
|
+
)
|
|
996
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
997
|
+
rtnobj = None
|
|
998
|
+
else:
|
|
999
|
+
raw_data = resp.json()
|
|
1000
|
+
rtnobj = GpgKey.from_dict(raw_data)
|
|
1001
|
+
return rtnobj
|
|
1002
|
+
|
|
1003
|
+
def get_public_ssh_key_for_authenticated_user(self, key_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Key:
|
|
1004
|
+
"""
|
|
1005
|
+
Get a public SSH key for the authenticated user
|
|
1006
|
+
|
|
1007
|
+
View extended details for a single public SSH key.
|
|
1008
|
+
|
|
1009
|
+
OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.
|
|
1010
|
+
"""
|
|
1011
|
+
client = self.client
|
|
1012
|
+
if aspects is None:
|
|
1013
|
+
aspects = client.aspects
|
|
1014
|
+
|
|
1015
|
+
header_params = client.headers
|
|
1016
|
+
if headers is not None:
|
|
1017
|
+
header_params = headers
|
|
1018
|
+
|
|
1019
|
+
leaf_template = "/user/keys/{key_id}"
|
|
1020
|
+
path_params = {
|
|
1021
|
+
'key_id': key_id,
|
|
1022
|
+
}
|
|
1023
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1024
|
+
|
|
1025
|
+
query_params = None
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
if exp_status is None:
|
|
1029
|
+
exp_status = [200]
|
|
1030
|
+
|
|
1031
|
+
resp = client.perform_call(
|
|
1032
|
+
leaf=call_leaf,
|
|
1033
|
+
method="GET",
|
|
1034
|
+
params=query_params if query_params else None,
|
|
1035
|
+
body=None,
|
|
1036
|
+
exp_status=exp_status,
|
|
1037
|
+
headers=header_params if header_params else None,
|
|
1038
|
+
context_msg=None,
|
|
1039
|
+
aspects=aspects,
|
|
1040
|
+
)
|
|
1041
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1042
|
+
rtnobj = None
|
|
1043
|
+
else:
|
|
1044
|
+
raw_data = resp.json()
|
|
1045
|
+
rtnobj = Key.from_dict(raw_data)
|
|
1046
|
+
return rtnobj
|
|
1047
|
+
|
|
1048
|
+
def get_ssh_signing_key_for_authenticated_user(self, ssh_signing_key_id: int, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> SshSigningKey:
|
|
1049
|
+
"""
|
|
1050
|
+
Get an SSH signing key for the authenticated user
|
|
1051
|
+
|
|
1052
|
+
Gets extended details for an SSH signing key.
|
|
1053
|
+
|
|
1054
|
+
OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint.
|
|
1055
|
+
"""
|
|
1056
|
+
client = self.client
|
|
1057
|
+
if aspects is None:
|
|
1058
|
+
aspects = client.aspects
|
|
1059
|
+
|
|
1060
|
+
header_params = client.headers
|
|
1061
|
+
if headers is not None:
|
|
1062
|
+
header_params = headers
|
|
1063
|
+
|
|
1064
|
+
leaf_template = "/user/ssh_signing_keys/{ssh_signing_key_id}"
|
|
1065
|
+
path_params = {
|
|
1066
|
+
'ssh_signing_key_id': ssh_signing_key_id,
|
|
1067
|
+
}
|
|
1068
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1069
|
+
|
|
1070
|
+
query_params = None
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
if exp_status is None:
|
|
1074
|
+
exp_status = [200]
|
|
1075
|
+
|
|
1076
|
+
resp = client.perform_call(
|
|
1077
|
+
leaf=call_leaf,
|
|
1078
|
+
method="GET",
|
|
1079
|
+
params=query_params if query_params else None,
|
|
1080
|
+
body=None,
|
|
1081
|
+
exp_status=exp_status,
|
|
1082
|
+
headers=header_params if header_params else None,
|
|
1083
|
+
context_msg=None,
|
|
1084
|
+
aspects=aspects,
|
|
1085
|
+
)
|
|
1086
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1087
|
+
rtnobj = None
|
|
1088
|
+
else:
|
|
1089
|
+
raw_data = resp.json()
|
|
1090
|
+
rtnobj = SshSigningKey.from_dict(raw_data)
|
|
1091
|
+
return rtnobj
|
|
1092
|
+
|
|
1093
|
+
def list(self, *, since: Optional[int] = None, per_page: Optional[int] = 30, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SimpleUser]:
|
|
1094
|
+
"""
|
|
1095
|
+
List users
|
|
1096
|
+
|
|
1097
|
+
Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts.
|
|
1098
|
+
|
|
1099
|
+
Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/guides/using-pagination-in-the-rest-api#using-link-headers) to get the URL for the next page of users.
|
|
1100
|
+
"""
|
|
1101
|
+
client = self.client
|
|
1102
|
+
if aspects is None:
|
|
1103
|
+
aspects = client.aspects
|
|
1104
|
+
|
|
1105
|
+
header_params = client.headers
|
|
1106
|
+
if headers is not None:
|
|
1107
|
+
header_params = headers
|
|
1108
|
+
|
|
1109
|
+
call_leaf = "/users"
|
|
1110
|
+
|
|
1111
|
+
query_params = {}
|
|
1112
|
+
if since is not None:
|
|
1113
|
+
query_params['since'] = since
|
|
1114
|
+
if per_page is not None:
|
|
1115
|
+
query_params['per_page'] = per_page
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
if exp_status is None:
|
|
1119
|
+
exp_status = [200]
|
|
1120
|
+
|
|
1121
|
+
resp = client.perform_call(
|
|
1122
|
+
leaf=call_leaf,
|
|
1123
|
+
method="GET",
|
|
1124
|
+
params=query_params if query_params else None,
|
|
1125
|
+
body=None,
|
|
1126
|
+
exp_status=exp_status,
|
|
1127
|
+
headers=header_params if header_params else None,
|
|
1128
|
+
context_msg=None,
|
|
1129
|
+
aspects=aspects,
|
|
1130
|
+
)
|
|
1131
|
+
raw_data = resp.json()
|
|
1132
|
+
items = [self._parse_item(item, SimpleUser) for item in raw_data]
|
|
1133
|
+
rtnval = PagedList[SimpleUser](items, dict(resp.headers), raw_data)
|
|
1134
|
+
return rtnval
|
|
1135
|
+
|
|
1136
|
+
def list_attestations(self, username: str, subject_digest: str, *, per_page: Optional[int] = 30, before: Optional[str] = None, after: Optional[str] = None, predicate_type: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1137
|
+
"""
|
|
1138
|
+
List attestations
|
|
1139
|
+
|
|
1140
|
+
List a collection of artifact attestations with a given subject digest that are associated with repositories owned by a user.
|
|
1141
|
+
|
|
1142
|
+
The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.
|
|
1143
|
+
|
|
1144
|
+
**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
|
|
1145
|
+
"""
|
|
1146
|
+
client = self.client
|
|
1147
|
+
if aspects is None:
|
|
1148
|
+
aspects = client.aspects
|
|
1149
|
+
|
|
1150
|
+
header_params = client.headers
|
|
1151
|
+
if headers is not None:
|
|
1152
|
+
header_params = headers
|
|
1153
|
+
|
|
1154
|
+
leaf_template = "/users/{username}/attestations/{subject_digest}"
|
|
1155
|
+
path_params = {
|
|
1156
|
+
'username': username,
|
|
1157
|
+
'subject_digest': subject_digest,
|
|
1158
|
+
}
|
|
1159
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1160
|
+
|
|
1161
|
+
query_params = {}
|
|
1162
|
+
if per_page is not None:
|
|
1163
|
+
query_params['per_page'] = per_page
|
|
1164
|
+
if before is not None:
|
|
1165
|
+
query_params['before'] = before
|
|
1166
|
+
if after is not None:
|
|
1167
|
+
query_params['after'] = after
|
|
1168
|
+
if predicate_type is not None:
|
|
1169
|
+
query_params['predicate_type'] = predicate_type
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
if exp_status is None:
|
|
1173
|
+
exp_status = [200, 201, 204]
|
|
1174
|
+
|
|
1175
|
+
resp = client.perform_call(
|
|
1176
|
+
leaf=call_leaf,
|
|
1177
|
+
method="GET",
|
|
1178
|
+
params=query_params if query_params else None,
|
|
1179
|
+
body=None,
|
|
1180
|
+
exp_status=exp_status,
|
|
1181
|
+
headers=header_params if header_params else None,
|
|
1182
|
+
context_msg=None,
|
|
1183
|
+
aspects=aspects,
|
|
1184
|
+
)
|
|
1185
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1186
|
+
rtnval = None
|
|
1187
|
+
else:
|
|
1188
|
+
raw_data = resp.json()
|
|
1189
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1190
|
+
return rtnval
|
|
1191
|
+
|
|
1192
|
+
def list_attestations_bulk(self, username: str, body: Dict[str, Any], *, per_page: Optional[int] = 30, before: Optional[str] = None, after: Optional[str] = None, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
|
|
1193
|
+
"""
|
|
1194
|
+
List attestations by bulk subject digests
|
|
1195
|
+
|
|
1196
|
+
List a collection of artifact attestations associated with any entry in a list of subject digests owned by a user.
|
|
1197
|
+
|
|
1198
|
+
The collection of attestations returned by this endpoint is filtered according to the authenticated user's permissions; if the authenticated user cannot read a repository, the attestations associated with that repository will not be included in the response. In addition, when using a fine-grained access token the `attestations:read` permission is required.
|
|
1199
|
+
|
|
1200
|
+
**Please note:** in order to offer meaningful security benefits, an attestation's signature and timestamps **must** be cryptographically verified, and the identity of the attestation signer **must** be validated. Attestations can be verified using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). For more information, see [our guide on how to use artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds).
|
|
1201
|
+
"""
|
|
1202
|
+
client = self.client
|
|
1203
|
+
if aspects is None:
|
|
1204
|
+
aspects = client.aspects
|
|
1205
|
+
|
|
1206
|
+
header_params = client.headers
|
|
1207
|
+
if headers is not None:
|
|
1208
|
+
header_params = headers
|
|
1209
|
+
|
|
1210
|
+
leaf_template = "/users/{username}/attestations/bulk-list"
|
|
1211
|
+
path_params = {
|
|
1212
|
+
'username': username,
|
|
1213
|
+
}
|
|
1214
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1215
|
+
|
|
1216
|
+
query_params = {}
|
|
1217
|
+
if per_page is not None:
|
|
1218
|
+
query_params['per_page'] = per_page
|
|
1219
|
+
if before is not None:
|
|
1220
|
+
query_params['before'] = before
|
|
1221
|
+
if after is not None:
|
|
1222
|
+
query_params['after'] = after
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
if exp_status is None:
|
|
1226
|
+
exp_status = [200]
|
|
1227
|
+
|
|
1228
|
+
resp = client.perform_call(
|
|
1229
|
+
leaf=call_leaf,
|
|
1230
|
+
method="POST",
|
|
1231
|
+
params=query_params if query_params else None,
|
|
1232
|
+
body=body,
|
|
1233
|
+
exp_status=exp_status,
|
|
1234
|
+
headers=header_params if header_params else None,
|
|
1235
|
+
context_msg=None,
|
|
1236
|
+
aspects=aspects,
|
|
1237
|
+
)
|
|
1238
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1239
|
+
rtnval = None
|
|
1240
|
+
else:
|
|
1241
|
+
raw_data = resp.json()
|
|
1242
|
+
rtnval = self._parse_item(raw_data, Dict[str, Any])
|
|
1243
|
+
return rtnval
|
|
1244
|
+
|
|
1245
|
+
def list_blocked_by_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SimpleUser]:
|
|
1246
|
+
"""
|
|
1247
|
+
List users blocked by the authenticated user
|
|
1248
|
+
|
|
1249
|
+
List the users you've blocked on your personal account.
|
|
1250
|
+
"""
|
|
1251
|
+
client = self.client
|
|
1252
|
+
if aspects is None:
|
|
1253
|
+
aspects = client.aspects
|
|
1254
|
+
|
|
1255
|
+
header_params = client.headers
|
|
1256
|
+
if headers is not None:
|
|
1257
|
+
header_params = headers
|
|
1258
|
+
|
|
1259
|
+
call_leaf = "/user/blocks"
|
|
1260
|
+
|
|
1261
|
+
query_params = {}
|
|
1262
|
+
if per_page is not None:
|
|
1263
|
+
query_params['per_page'] = per_page
|
|
1264
|
+
if page is not None:
|
|
1265
|
+
query_params['page'] = page
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
if exp_status is None:
|
|
1269
|
+
exp_status = [200]
|
|
1270
|
+
|
|
1271
|
+
resp = client.perform_call(
|
|
1272
|
+
leaf=call_leaf,
|
|
1273
|
+
method="GET",
|
|
1274
|
+
params=query_params if query_params else None,
|
|
1275
|
+
body=None,
|
|
1276
|
+
exp_status=exp_status,
|
|
1277
|
+
headers=header_params if header_params else None,
|
|
1278
|
+
context_msg=None,
|
|
1279
|
+
aspects=aspects,
|
|
1280
|
+
)
|
|
1281
|
+
raw_data = resp.json()
|
|
1282
|
+
items = [self._parse_item(item, SimpleUser) for item in raw_data]
|
|
1283
|
+
rtnval = PagedList[SimpleUser](items, dict(resp.headers), raw_data)
|
|
1284
|
+
return rtnval
|
|
1285
|
+
|
|
1286
|
+
def list_emails_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[Email]:
|
|
1287
|
+
"""
|
|
1288
|
+
List email addresses for the authenticated user
|
|
1289
|
+
|
|
1290
|
+
Lists all of your email addresses, and specifies which one is visible
|
|
1291
|
+
to the public.
|
|
1292
|
+
|
|
1293
|
+
OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint.
|
|
1294
|
+
"""
|
|
1295
|
+
client = self.client
|
|
1296
|
+
if aspects is None:
|
|
1297
|
+
aspects = client.aspects
|
|
1298
|
+
|
|
1299
|
+
header_params = client.headers
|
|
1300
|
+
if headers is not None:
|
|
1301
|
+
header_params = headers
|
|
1302
|
+
|
|
1303
|
+
call_leaf = "/user/emails"
|
|
1304
|
+
|
|
1305
|
+
query_params = {}
|
|
1306
|
+
if per_page is not None:
|
|
1307
|
+
query_params['per_page'] = per_page
|
|
1308
|
+
if page is not None:
|
|
1309
|
+
query_params['page'] = page
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
if exp_status is None:
|
|
1313
|
+
exp_status = [200]
|
|
1314
|
+
|
|
1315
|
+
resp = client.perform_call(
|
|
1316
|
+
leaf=call_leaf,
|
|
1317
|
+
method="GET",
|
|
1318
|
+
params=query_params if query_params else None,
|
|
1319
|
+
body=None,
|
|
1320
|
+
exp_status=exp_status,
|
|
1321
|
+
headers=header_params if header_params else None,
|
|
1322
|
+
context_msg=None,
|
|
1323
|
+
aspects=aspects,
|
|
1324
|
+
)
|
|
1325
|
+
raw_data = resp.json()
|
|
1326
|
+
items = [self._parse_item(item, Email) for item in raw_data]
|
|
1327
|
+
rtnval = PagedList[Email](items, dict(resp.headers), raw_data)
|
|
1328
|
+
return rtnval
|
|
1329
|
+
|
|
1330
|
+
def list_followed_by_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SimpleUser]:
|
|
1331
|
+
"""
|
|
1332
|
+
List the people the authenticated user follows
|
|
1333
|
+
|
|
1334
|
+
Lists the people who the authenticated user follows.
|
|
1335
|
+
"""
|
|
1336
|
+
client = self.client
|
|
1337
|
+
if aspects is None:
|
|
1338
|
+
aspects = client.aspects
|
|
1339
|
+
|
|
1340
|
+
header_params = client.headers
|
|
1341
|
+
if headers is not None:
|
|
1342
|
+
header_params = headers
|
|
1343
|
+
|
|
1344
|
+
call_leaf = "/user/following"
|
|
1345
|
+
|
|
1346
|
+
query_params = {}
|
|
1347
|
+
if per_page is not None:
|
|
1348
|
+
query_params['per_page'] = per_page
|
|
1349
|
+
if page is not None:
|
|
1350
|
+
query_params['page'] = page
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
if exp_status is None:
|
|
1354
|
+
exp_status = [200]
|
|
1355
|
+
|
|
1356
|
+
resp = client.perform_call(
|
|
1357
|
+
leaf=call_leaf,
|
|
1358
|
+
method="GET",
|
|
1359
|
+
params=query_params if query_params else None,
|
|
1360
|
+
body=None,
|
|
1361
|
+
exp_status=exp_status,
|
|
1362
|
+
headers=header_params if header_params else None,
|
|
1363
|
+
context_msg=None,
|
|
1364
|
+
aspects=aspects,
|
|
1365
|
+
)
|
|
1366
|
+
raw_data = resp.json()
|
|
1367
|
+
items = [self._parse_item(item, SimpleUser) for item in raw_data]
|
|
1368
|
+
rtnval = PagedList[SimpleUser](items, dict(resp.headers), raw_data)
|
|
1369
|
+
return rtnval
|
|
1370
|
+
|
|
1371
|
+
def list_followers_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SimpleUser]:
|
|
1372
|
+
"""
|
|
1373
|
+
List followers of the authenticated user
|
|
1374
|
+
|
|
1375
|
+
Lists the people following the authenticated user.
|
|
1376
|
+
"""
|
|
1377
|
+
client = self.client
|
|
1378
|
+
if aspects is None:
|
|
1379
|
+
aspects = client.aspects
|
|
1380
|
+
|
|
1381
|
+
header_params = client.headers
|
|
1382
|
+
if headers is not None:
|
|
1383
|
+
header_params = headers
|
|
1384
|
+
|
|
1385
|
+
call_leaf = "/user/followers"
|
|
1386
|
+
|
|
1387
|
+
query_params = {}
|
|
1388
|
+
if per_page is not None:
|
|
1389
|
+
query_params['per_page'] = per_page
|
|
1390
|
+
if page is not None:
|
|
1391
|
+
query_params['page'] = page
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
if exp_status is None:
|
|
1395
|
+
exp_status = [200]
|
|
1396
|
+
|
|
1397
|
+
resp = client.perform_call(
|
|
1398
|
+
leaf=call_leaf,
|
|
1399
|
+
method="GET",
|
|
1400
|
+
params=query_params if query_params else None,
|
|
1401
|
+
body=None,
|
|
1402
|
+
exp_status=exp_status,
|
|
1403
|
+
headers=header_params if header_params else None,
|
|
1404
|
+
context_msg=None,
|
|
1405
|
+
aspects=aspects,
|
|
1406
|
+
)
|
|
1407
|
+
raw_data = resp.json()
|
|
1408
|
+
items = [self._parse_item(item, SimpleUser) for item in raw_data]
|
|
1409
|
+
rtnval = PagedList[SimpleUser](items, dict(resp.headers), raw_data)
|
|
1410
|
+
return rtnval
|
|
1411
|
+
|
|
1412
|
+
def list_followers_for_user(self, username: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SimpleUser]:
|
|
1413
|
+
"""
|
|
1414
|
+
List followers of a user
|
|
1415
|
+
|
|
1416
|
+
Lists the people following the specified user.
|
|
1417
|
+
"""
|
|
1418
|
+
client = self.client
|
|
1419
|
+
if aspects is None:
|
|
1420
|
+
aspects = client.aspects
|
|
1421
|
+
|
|
1422
|
+
header_params = client.headers
|
|
1423
|
+
if headers is not None:
|
|
1424
|
+
header_params = headers
|
|
1425
|
+
|
|
1426
|
+
leaf_template = "/users/{username}/followers"
|
|
1427
|
+
path_params = {
|
|
1428
|
+
'username': username,
|
|
1429
|
+
}
|
|
1430
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1431
|
+
|
|
1432
|
+
query_params = {}
|
|
1433
|
+
if per_page is not None:
|
|
1434
|
+
query_params['per_page'] = per_page
|
|
1435
|
+
if page is not None:
|
|
1436
|
+
query_params['page'] = page
|
|
1437
|
+
|
|
1438
|
+
|
|
1439
|
+
if exp_status is None:
|
|
1440
|
+
exp_status = [200]
|
|
1441
|
+
|
|
1442
|
+
resp = client.perform_call(
|
|
1443
|
+
leaf=call_leaf,
|
|
1444
|
+
method="GET",
|
|
1445
|
+
params=query_params if query_params else None,
|
|
1446
|
+
body=None,
|
|
1447
|
+
exp_status=exp_status,
|
|
1448
|
+
headers=header_params if header_params else None,
|
|
1449
|
+
context_msg=None,
|
|
1450
|
+
aspects=aspects,
|
|
1451
|
+
)
|
|
1452
|
+
raw_data = resp.json()
|
|
1453
|
+
items = [self._parse_item(item, SimpleUser) for item in raw_data]
|
|
1454
|
+
rtnval = PagedList[SimpleUser](items, dict(resp.headers), raw_data)
|
|
1455
|
+
return rtnval
|
|
1456
|
+
|
|
1457
|
+
def list_following_for_user(self, username: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SimpleUser]:
|
|
1458
|
+
"""
|
|
1459
|
+
List the people a user follows
|
|
1460
|
+
|
|
1461
|
+
Lists the people who the specified user follows.
|
|
1462
|
+
"""
|
|
1463
|
+
client = self.client
|
|
1464
|
+
if aspects is None:
|
|
1465
|
+
aspects = client.aspects
|
|
1466
|
+
|
|
1467
|
+
header_params = client.headers
|
|
1468
|
+
if headers is not None:
|
|
1469
|
+
header_params = headers
|
|
1470
|
+
|
|
1471
|
+
leaf_template = "/users/{username}/following"
|
|
1472
|
+
path_params = {
|
|
1473
|
+
'username': username,
|
|
1474
|
+
}
|
|
1475
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1476
|
+
|
|
1477
|
+
query_params = {}
|
|
1478
|
+
if per_page is not None:
|
|
1479
|
+
query_params['per_page'] = per_page
|
|
1480
|
+
if page is not None:
|
|
1481
|
+
query_params['page'] = page
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
if exp_status is None:
|
|
1485
|
+
exp_status = [200]
|
|
1486
|
+
|
|
1487
|
+
resp = client.perform_call(
|
|
1488
|
+
leaf=call_leaf,
|
|
1489
|
+
method="GET",
|
|
1490
|
+
params=query_params if query_params else None,
|
|
1491
|
+
body=None,
|
|
1492
|
+
exp_status=exp_status,
|
|
1493
|
+
headers=header_params if header_params else None,
|
|
1494
|
+
context_msg=None,
|
|
1495
|
+
aspects=aspects,
|
|
1496
|
+
)
|
|
1497
|
+
raw_data = resp.json()
|
|
1498
|
+
items = [self._parse_item(item, SimpleUser) for item in raw_data]
|
|
1499
|
+
rtnval = PagedList[SimpleUser](items, dict(resp.headers), raw_data)
|
|
1500
|
+
return rtnval
|
|
1501
|
+
|
|
1502
|
+
def list_gpg_keys_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[GpgKey]:
|
|
1503
|
+
"""
|
|
1504
|
+
List GPG keys for the authenticated user
|
|
1505
|
+
|
|
1506
|
+
Lists the current user's GPG keys.
|
|
1507
|
+
|
|
1508
|
+
OAuth app tokens and personal access tokens (classic) need the `read:gpg_key` scope to use this endpoint.
|
|
1509
|
+
"""
|
|
1510
|
+
client = self.client
|
|
1511
|
+
if aspects is None:
|
|
1512
|
+
aspects = client.aspects
|
|
1513
|
+
|
|
1514
|
+
header_params = client.headers
|
|
1515
|
+
if headers is not None:
|
|
1516
|
+
header_params = headers
|
|
1517
|
+
|
|
1518
|
+
call_leaf = "/user/gpg_keys"
|
|
1519
|
+
|
|
1520
|
+
query_params = {}
|
|
1521
|
+
if per_page is not None:
|
|
1522
|
+
query_params['per_page'] = per_page
|
|
1523
|
+
if page is not None:
|
|
1524
|
+
query_params['page'] = page
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
if exp_status is None:
|
|
1528
|
+
exp_status = [200]
|
|
1529
|
+
|
|
1530
|
+
resp = client.perform_call(
|
|
1531
|
+
leaf=call_leaf,
|
|
1532
|
+
method="GET",
|
|
1533
|
+
params=query_params if query_params else None,
|
|
1534
|
+
body=None,
|
|
1535
|
+
exp_status=exp_status,
|
|
1536
|
+
headers=header_params if header_params else None,
|
|
1537
|
+
context_msg=None,
|
|
1538
|
+
aspects=aspects,
|
|
1539
|
+
)
|
|
1540
|
+
raw_data = resp.json()
|
|
1541
|
+
items = [self._parse_item(item, GpgKey) for item in raw_data]
|
|
1542
|
+
rtnval = PagedList[GpgKey](items, dict(resp.headers), raw_data)
|
|
1543
|
+
return rtnval
|
|
1544
|
+
|
|
1545
|
+
def list_gpg_keys_for_user(self, username: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[GpgKey]:
|
|
1546
|
+
"""
|
|
1547
|
+
List GPG keys for a user
|
|
1548
|
+
|
|
1549
|
+
Lists the GPG keys for a user. This information is accessible by anyone.
|
|
1550
|
+
"""
|
|
1551
|
+
client = self.client
|
|
1552
|
+
if aspects is None:
|
|
1553
|
+
aspects = client.aspects
|
|
1554
|
+
|
|
1555
|
+
header_params = client.headers
|
|
1556
|
+
if headers is not None:
|
|
1557
|
+
header_params = headers
|
|
1558
|
+
|
|
1559
|
+
leaf_template = "/users/{username}/gpg_keys"
|
|
1560
|
+
path_params = {
|
|
1561
|
+
'username': username,
|
|
1562
|
+
}
|
|
1563
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1564
|
+
|
|
1565
|
+
query_params = {}
|
|
1566
|
+
if per_page is not None:
|
|
1567
|
+
query_params['per_page'] = per_page
|
|
1568
|
+
if page is not None:
|
|
1569
|
+
query_params['page'] = page
|
|
1570
|
+
|
|
1571
|
+
|
|
1572
|
+
if exp_status is None:
|
|
1573
|
+
exp_status = [200]
|
|
1574
|
+
|
|
1575
|
+
resp = client.perform_call(
|
|
1576
|
+
leaf=call_leaf,
|
|
1577
|
+
method="GET",
|
|
1578
|
+
params=query_params if query_params else None,
|
|
1579
|
+
body=None,
|
|
1580
|
+
exp_status=exp_status,
|
|
1581
|
+
headers=header_params if header_params else None,
|
|
1582
|
+
context_msg=None,
|
|
1583
|
+
aspects=aspects,
|
|
1584
|
+
)
|
|
1585
|
+
raw_data = resp.json()
|
|
1586
|
+
items = [self._parse_item(item, GpgKey) for item in raw_data]
|
|
1587
|
+
rtnval = PagedList[GpgKey](items, dict(resp.headers), raw_data)
|
|
1588
|
+
return rtnval
|
|
1589
|
+
|
|
1590
|
+
def list_public_emails_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[Email]:
|
|
1591
|
+
"""
|
|
1592
|
+
List public email addresses for the authenticated user
|
|
1593
|
+
|
|
1594
|
+
Lists your publicly visible email address, which you can set with the
|
|
1595
|
+
[Set primary email visibility for the authenticated user](https://docs.github.com/rest/users/emails#set-primary-email-visibility-for-the-authenticated-user)
|
|
1596
|
+
endpoint.
|
|
1597
|
+
|
|
1598
|
+
OAuth app tokens and personal access tokens (classic) need the `user:email` scope to use this endpoint.
|
|
1599
|
+
"""
|
|
1600
|
+
client = self.client
|
|
1601
|
+
if aspects is None:
|
|
1602
|
+
aspects = client.aspects
|
|
1603
|
+
|
|
1604
|
+
header_params = client.headers
|
|
1605
|
+
if headers is not None:
|
|
1606
|
+
header_params = headers
|
|
1607
|
+
|
|
1608
|
+
call_leaf = "/user/public_emails"
|
|
1609
|
+
|
|
1610
|
+
query_params = {}
|
|
1611
|
+
if per_page is not None:
|
|
1612
|
+
query_params['per_page'] = per_page
|
|
1613
|
+
if page is not None:
|
|
1614
|
+
query_params['page'] = page
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
if exp_status is None:
|
|
1618
|
+
exp_status = [200]
|
|
1619
|
+
|
|
1620
|
+
resp = client.perform_call(
|
|
1621
|
+
leaf=call_leaf,
|
|
1622
|
+
method="GET",
|
|
1623
|
+
params=query_params if query_params else None,
|
|
1624
|
+
body=None,
|
|
1625
|
+
exp_status=exp_status,
|
|
1626
|
+
headers=header_params if header_params else None,
|
|
1627
|
+
context_msg=None,
|
|
1628
|
+
aspects=aspects,
|
|
1629
|
+
)
|
|
1630
|
+
raw_data = resp.json()
|
|
1631
|
+
items = [self._parse_item(item, Email) for item in raw_data]
|
|
1632
|
+
rtnval = PagedList[Email](items, dict(resp.headers), raw_data)
|
|
1633
|
+
return rtnval
|
|
1634
|
+
|
|
1635
|
+
def list_public_keys_for_user(self, username: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[KeySimple]:
|
|
1636
|
+
"""
|
|
1637
|
+
List public keys for a user
|
|
1638
|
+
|
|
1639
|
+
Lists the _verified_ public SSH keys for a user. This is accessible by anyone.
|
|
1640
|
+
"""
|
|
1641
|
+
client = self.client
|
|
1642
|
+
if aspects is None:
|
|
1643
|
+
aspects = client.aspects
|
|
1644
|
+
|
|
1645
|
+
header_params = client.headers
|
|
1646
|
+
if headers is not None:
|
|
1647
|
+
header_params = headers
|
|
1648
|
+
|
|
1649
|
+
leaf_template = "/users/{username}/keys"
|
|
1650
|
+
path_params = {
|
|
1651
|
+
'username': username,
|
|
1652
|
+
}
|
|
1653
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1654
|
+
|
|
1655
|
+
query_params = {}
|
|
1656
|
+
if per_page is not None:
|
|
1657
|
+
query_params['per_page'] = per_page
|
|
1658
|
+
if page is not None:
|
|
1659
|
+
query_params['page'] = page
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
if exp_status is None:
|
|
1663
|
+
exp_status = [200]
|
|
1664
|
+
|
|
1665
|
+
resp = client.perform_call(
|
|
1666
|
+
leaf=call_leaf,
|
|
1667
|
+
method="GET",
|
|
1668
|
+
params=query_params if query_params else None,
|
|
1669
|
+
body=None,
|
|
1670
|
+
exp_status=exp_status,
|
|
1671
|
+
headers=header_params if header_params else None,
|
|
1672
|
+
context_msg=None,
|
|
1673
|
+
aspects=aspects,
|
|
1674
|
+
)
|
|
1675
|
+
raw_data = resp.json()
|
|
1676
|
+
items = [self._parse_item(item, KeySimple) for item in raw_data]
|
|
1677
|
+
rtnval = PagedList[KeySimple](items, dict(resp.headers), raw_data)
|
|
1678
|
+
return rtnval
|
|
1679
|
+
|
|
1680
|
+
def list_public_ssh_keys_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[Key]:
|
|
1681
|
+
"""
|
|
1682
|
+
List public SSH keys for the authenticated user
|
|
1683
|
+
|
|
1684
|
+
Lists the public SSH keys for the authenticated user's GitHub account.
|
|
1685
|
+
|
|
1686
|
+
OAuth app tokens and personal access tokens (classic) need the `read:public_key` scope to use this endpoint.
|
|
1687
|
+
"""
|
|
1688
|
+
client = self.client
|
|
1689
|
+
if aspects is None:
|
|
1690
|
+
aspects = client.aspects
|
|
1691
|
+
|
|
1692
|
+
header_params = client.headers
|
|
1693
|
+
if headers is not None:
|
|
1694
|
+
header_params = headers
|
|
1695
|
+
|
|
1696
|
+
call_leaf = "/user/keys"
|
|
1697
|
+
|
|
1698
|
+
query_params = {}
|
|
1699
|
+
if per_page is not None:
|
|
1700
|
+
query_params['per_page'] = per_page
|
|
1701
|
+
if page is not None:
|
|
1702
|
+
query_params['page'] = page
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
if exp_status is None:
|
|
1706
|
+
exp_status = [200]
|
|
1707
|
+
|
|
1708
|
+
resp = client.perform_call(
|
|
1709
|
+
leaf=call_leaf,
|
|
1710
|
+
method="GET",
|
|
1711
|
+
params=query_params if query_params else None,
|
|
1712
|
+
body=None,
|
|
1713
|
+
exp_status=exp_status,
|
|
1714
|
+
headers=header_params if header_params else None,
|
|
1715
|
+
context_msg=None,
|
|
1716
|
+
aspects=aspects,
|
|
1717
|
+
)
|
|
1718
|
+
raw_data = resp.json()
|
|
1719
|
+
items = [self._parse_item(item, Key) for item in raw_data]
|
|
1720
|
+
rtnval = PagedList[Key](items, dict(resp.headers), raw_data)
|
|
1721
|
+
return rtnval
|
|
1722
|
+
|
|
1723
|
+
def list_social_accounts_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SocialAccount]:
|
|
1724
|
+
"""
|
|
1725
|
+
List social accounts for the authenticated user
|
|
1726
|
+
|
|
1727
|
+
Lists all of your social accounts.
|
|
1728
|
+
"""
|
|
1729
|
+
client = self.client
|
|
1730
|
+
if aspects is None:
|
|
1731
|
+
aspects = client.aspects
|
|
1732
|
+
|
|
1733
|
+
header_params = client.headers
|
|
1734
|
+
if headers is not None:
|
|
1735
|
+
header_params = headers
|
|
1736
|
+
|
|
1737
|
+
call_leaf = "/user/social_accounts"
|
|
1738
|
+
|
|
1739
|
+
query_params = {}
|
|
1740
|
+
if per_page is not None:
|
|
1741
|
+
query_params['per_page'] = per_page
|
|
1742
|
+
if page is not None:
|
|
1743
|
+
query_params['page'] = page
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
if exp_status is None:
|
|
1747
|
+
exp_status = [200]
|
|
1748
|
+
|
|
1749
|
+
resp = client.perform_call(
|
|
1750
|
+
leaf=call_leaf,
|
|
1751
|
+
method="GET",
|
|
1752
|
+
params=query_params if query_params else None,
|
|
1753
|
+
body=None,
|
|
1754
|
+
exp_status=exp_status,
|
|
1755
|
+
headers=header_params if header_params else None,
|
|
1756
|
+
context_msg=None,
|
|
1757
|
+
aspects=aspects,
|
|
1758
|
+
)
|
|
1759
|
+
raw_data = resp.json()
|
|
1760
|
+
items = [self._parse_item(item, SocialAccount) for item in raw_data]
|
|
1761
|
+
rtnval = PagedList[SocialAccount](items, dict(resp.headers), raw_data)
|
|
1762
|
+
return rtnval
|
|
1763
|
+
|
|
1764
|
+
def list_social_accounts_for_user(self, username: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SocialAccount]:
|
|
1765
|
+
"""
|
|
1766
|
+
List social accounts for a user
|
|
1767
|
+
|
|
1768
|
+
Lists social media accounts for a user. This endpoint is accessible by anyone.
|
|
1769
|
+
"""
|
|
1770
|
+
client = self.client
|
|
1771
|
+
if aspects is None:
|
|
1772
|
+
aspects = client.aspects
|
|
1773
|
+
|
|
1774
|
+
header_params = client.headers
|
|
1775
|
+
if headers is not None:
|
|
1776
|
+
header_params = headers
|
|
1777
|
+
|
|
1778
|
+
leaf_template = "/users/{username}/social_accounts"
|
|
1779
|
+
path_params = {
|
|
1780
|
+
'username': username,
|
|
1781
|
+
}
|
|
1782
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1783
|
+
|
|
1784
|
+
query_params = {}
|
|
1785
|
+
if per_page is not None:
|
|
1786
|
+
query_params['per_page'] = per_page
|
|
1787
|
+
if page is not None:
|
|
1788
|
+
query_params['page'] = page
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
if exp_status is None:
|
|
1792
|
+
exp_status = [200]
|
|
1793
|
+
|
|
1794
|
+
resp = client.perform_call(
|
|
1795
|
+
leaf=call_leaf,
|
|
1796
|
+
method="GET",
|
|
1797
|
+
params=query_params if query_params else None,
|
|
1798
|
+
body=None,
|
|
1799
|
+
exp_status=exp_status,
|
|
1800
|
+
headers=header_params if header_params else None,
|
|
1801
|
+
context_msg=None,
|
|
1802
|
+
aspects=aspects,
|
|
1803
|
+
)
|
|
1804
|
+
raw_data = resp.json()
|
|
1805
|
+
items = [self._parse_item(item, SocialAccount) for item in raw_data]
|
|
1806
|
+
rtnval = PagedList[SocialAccount](items, dict(resp.headers), raw_data)
|
|
1807
|
+
return rtnval
|
|
1808
|
+
|
|
1809
|
+
def list_ssh_signing_keys_for_authenticated_user(self, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SshSigningKey]:
|
|
1810
|
+
"""
|
|
1811
|
+
List SSH signing keys for the authenticated user
|
|
1812
|
+
|
|
1813
|
+
Lists the SSH signing keys for the authenticated user's GitHub account.
|
|
1814
|
+
|
|
1815
|
+
OAuth app tokens and personal access tokens (classic) need the `read:ssh_signing_key` scope to use this endpoint.
|
|
1816
|
+
"""
|
|
1817
|
+
client = self.client
|
|
1818
|
+
if aspects is None:
|
|
1819
|
+
aspects = client.aspects
|
|
1820
|
+
|
|
1821
|
+
header_params = client.headers
|
|
1822
|
+
if headers is not None:
|
|
1823
|
+
header_params = headers
|
|
1824
|
+
|
|
1825
|
+
call_leaf = "/user/ssh_signing_keys"
|
|
1826
|
+
|
|
1827
|
+
query_params = {}
|
|
1828
|
+
if per_page is not None:
|
|
1829
|
+
query_params['per_page'] = per_page
|
|
1830
|
+
if page is not None:
|
|
1831
|
+
query_params['page'] = page
|
|
1832
|
+
|
|
1833
|
+
|
|
1834
|
+
if exp_status is None:
|
|
1835
|
+
exp_status = [200]
|
|
1836
|
+
|
|
1837
|
+
resp = client.perform_call(
|
|
1838
|
+
leaf=call_leaf,
|
|
1839
|
+
method="GET",
|
|
1840
|
+
params=query_params if query_params else None,
|
|
1841
|
+
body=None,
|
|
1842
|
+
exp_status=exp_status,
|
|
1843
|
+
headers=header_params if header_params else None,
|
|
1844
|
+
context_msg=None,
|
|
1845
|
+
aspects=aspects,
|
|
1846
|
+
)
|
|
1847
|
+
raw_data = resp.json()
|
|
1848
|
+
items = [self._parse_item(item, SshSigningKey) for item in raw_data]
|
|
1849
|
+
rtnval = PagedList[SshSigningKey](items, dict(resp.headers), raw_data)
|
|
1850
|
+
return rtnval
|
|
1851
|
+
|
|
1852
|
+
def list_ssh_signing_keys_for_user(self, username: str, *, per_page: Optional[int] = 30, page: Optional[int] = 1, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PagedList[SshSigningKey]:
|
|
1853
|
+
"""
|
|
1854
|
+
List SSH signing keys for a user
|
|
1855
|
+
|
|
1856
|
+
Lists the SSH signing keys for a user. This operation is accessible by anyone.
|
|
1857
|
+
"""
|
|
1858
|
+
client = self.client
|
|
1859
|
+
if aspects is None:
|
|
1860
|
+
aspects = client.aspects
|
|
1861
|
+
|
|
1862
|
+
header_params = client.headers
|
|
1863
|
+
if headers is not None:
|
|
1864
|
+
header_params = headers
|
|
1865
|
+
|
|
1866
|
+
leaf_template = "/users/{username}/ssh_signing_keys"
|
|
1867
|
+
path_params = {
|
|
1868
|
+
'username': username,
|
|
1869
|
+
}
|
|
1870
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1871
|
+
|
|
1872
|
+
query_params = {}
|
|
1873
|
+
if per_page is not None:
|
|
1874
|
+
query_params['per_page'] = per_page
|
|
1875
|
+
if page is not None:
|
|
1876
|
+
query_params['page'] = page
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
if exp_status is None:
|
|
1880
|
+
exp_status = [200]
|
|
1881
|
+
|
|
1882
|
+
resp = client.perform_call(
|
|
1883
|
+
leaf=call_leaf,
|
|
1884
|
+
method="GET",
|
|
1885
|
+
params=query_params if query_params else None,
|
|
1886
|
+
body=None,
|
|
1887
|
+
exp_status=exp_status,
|
|
1888
|
+
headers=header_params if header_params else None,
|
|
1889
|
+
context_msg=None,
|
|
1890
|
+
aspects=aspects,
|
|
1891
|
+
)
|
|
1892
|
+
raw_data = resp.json()
|
|
1893
|
+
items = [self._parse_item(item, SshSigningKey) for item in raw_data]
|
|
1894
|
+
rtnval = PagedList[SshSigningKey](items, dict(resp.headers), raw_data)
|
|
1895
|
+
return rtnval
|
|
1896
|
+
|
|
1897
|
+
def set_primary_email_visibility_for_authenticated_user(self, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> List[Email]:
|
|
1898
|
+
"""
|
|
1899
|
+
Set primary email visibility for the authenticated user
|
|
1900
|
+
|
|
1901
|
+
Sets the visibility for your primary email addresses.
|
|
1902
|
+
"""
|
|
1903
|
+
client = self.client
|
|
1904
|
+
if aspects is None:
|
|
1905
|
+
aspects = client.aspects
|
|
1906
|
+
|
|
1907
|
+
header_params = client.headers
|
|
1908
|
+
if headers is not None:
|
|
1909
|
+
header_params = headers
|
|
1910
|
+
|
|
1911
|
+
call_leaf = "/user/email/visibility"
|
|
1912
|
+
|
|
1913
|
+
query_params = None
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
if exp_status is None:
|
|
1917
|
+
exp_status = [200]
|
|
1918
|
+
|
|
1919
|
+
resp = client.perform_call(
|
|
1920
|
+
leaf=call_leaf,
|
|
1921
|
+
method="PATCH",
|
|
1922
|
+
params=query_params if query_params else None,
|
|
1923
|
+
body=body,
|
|
1924
|
+
exp_status=exp_status,
|
|
1925
|
+
headers=header_params if header_params else None,
|
|
1926
|
+
context_msg=None,
|
|
1927
|
+
aspects=aspects,
|
|
1928
|
+
)
|
|
1929
|
+
raw_data = resp.json()
|
|
1930
|
+
items = [self._parse_item(item, Email) for item in raw_data]
|
|
1931
|
+
return items
|
|
1932
|
+
|
|
1933
|
+
def unblock(self, username: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1934
|
+
"""
|
|
1935
|
+
Unblock a user
|
|
1936
|
+
|
|
1937
|
+
Unblocks the given user and returns a 204.
|
|
1938
|
+
"""
|
|
1939
|
+
client = self.client
|
|
1940
|
+
if aspects is None:
|
|
1941
|
+
aspects = client.aspects
|
|
1942
|
+
|
|
1943
|
+
header_params = client.headers
|
|
1944
|
+
if headers is not None:
|
|
1945
|
+
header_params = headers
|
|
1946
|
+
|
|
1947
|
+
leaf_template = "/user/blocks/{username}"
|
|
1948
|
+
path_params = {
|
|
1949
|
+
'username': username,
|
|
1950
|
+
}
|
|
1951
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1952
|
+
|
|
1953
|
+
query_params = None
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
if exp_status is None:
|
|
1957
|
+
exp_status = [204]
|
|
1958
|
+
|
|
1959
|
+
resp = client.perform_call(
|
|
1960
|
+
leaf=call_leaf,
|
|
1961
|
+
method="DELETE",
|
|
1962
|
+
params=query_params if query_params else None,
|
|
1963
|
+
body=None,
|
|
1964
|
+
exp_status=exp_status,
|
|
1965
|
+
headers=header_params if header_params else None,
|
|
1966
|
+
context_msg=None,
|
|
1967
|
+
aspects=aspects,
|
|
1968
|
+
)
|
|
1969
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
1970
|
+
rtnval = None
|
|
1971
|
+
else:
|
|
1972
|
+
rtnval = resp.json()
|
|
1973
|
+
return rtnval
|
|
1974
|
+
|
|
1975
|
+
def unfollow(self, username: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
|
|
1976
|
+
"""
|
|
1977
|
+
Unfollow a user
|
|
1978
|
+
|
|
1979
|
+
OAuth app tokens and personal access tokens (classic) need the `user:follow` scope to use this endpoint.
|
|
1980
|
+
"""
|
|
1981
|
+
client = self.client
|
|
1982
|
+
if aspects is None:
|
|
1983
|
+
aspects = client.aspects
|
|
1984
|
+
|
|
1985
|
+
header_params = client.headers
|
|
1986
|
+
if headers is not None:
|
|
1987
|
+
header_params = headers
|
|
1988
|
+
|
|
1989
|
+
leaf_template = "/user/following/{username}"
|
|
1990
|
+
path_params = {
|
|
1991
|
+
'username': username,
|
|
1992
|
+
}
|
|
1993
|
+
call_leaf = leaf_template.format(**path_params)
|
|
1994
|
+
|
|
1995
|
+
query_params = None
|
|
1996
|
+
|
|
1997
|
+
|
|
1998
|
+
if exp_status is None:
|
|
1999
|
+
exp_status = [204]
|
|
2000
|
+
|
|
2001
|
+
resp = client.perform_call(
|
|
2002
|
+
leaf=call_leaf,
|
|
2003
|
+
method="DELETE",
|
|
2004
|
+
params=query_params if query_params else None,
|
|
2005
|
+
body=None,
|
|
2006
|
+
exp_status=exp_status,
|
|
2007
|
+
headers=header_params if header_params else None,
|
|
2008
|
+
context_msg=None,
|
|
2009
|
+
aspects=aspects,
|
|
2010
|
+
)
|
|
2011
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
2012
|
+
rtnval = None
|
|
2013
|
+
else:
|
|
2014
|
+
rtnval = resp.json()
|
|
2015
|
+
return rtnval
|
|
2016
|
+
|
|
2017
|
+
def update_authenticated(self, body: Dict[str, Any], *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> PrivateUser:
|
|
2018
|
+
"""
|
|
2019
|
+
Update the authenticated user
|
|
2020
|
+
|
|
2021
|
+
**Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API.
|
|
2022
|
+
"""
|
|
2023
|
+
client = self.client
|
|
2024
|
+
if aspects is None:
|
|
2025
|
+
aspects = client.aspects
|
|
2026
|
+
|
|
2027
|
+
header_params = client.headers
|
|
2028
|
+
if headers is not None:
|
|
2029
|
+
header_params = headers
|
|
2030
|
+
|
|
2031
|
+
call_leaf = "/user"
|
|
2032
|
+
|
|
2033
|
+
query_params = None
|
|
2034
|
+
|
|
2035
|
+
|
|
2036
|
+
if exp_status is None:
|
|
2037
|
+
exp_status = [200]
|
|
2038
|
+
|
|
2039
|
+
resp = client.perform_call(
|
|
2040
|
+
leaf=call_leaf,
|
|
2041
|
+
method="PATCH",
|
|
2042
|
+
params=query_params if query_params else None,
|
|
2043
|
+
body=body,
|
|
2044
|
+
exp_status=exp_status,
|
|
2045
|
+
headers=header_params if header_params else None,
|
|
2046
|
+
context_msg=None,
|
|
2047
|
+
aspects=aspects,
|
|
2048
|
+
)
|
|
2049
|
+
if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
|
|
2050
|
+
rtnobj = None
|
|
2051
|
+
else:
|
|
2052
|
+
raw_data = resp.json()
|
|
2053
|
+
rtnobj = PrivateUser.from_dict(raw_data)
|
|
2054
|
+
return rtnobj
|