【发布时间】:2019-05-28 14:32:25
【问题描述】:
有没有使用 PyGithub 创建新 Gist 的选项?
GitHub上有这样的API option,但PyGithub中似乎没有。
【问题讨论】:
有没有使用 PyGithub 创建新 Gist 的选项?
GitHub上有这样的API option,但PyGithub中似乎没有。
【问题讨论】:
使用Github.get_user,后跟AuthenticatedUser.create_gist:
gh = github.Github("auth token")
gh_auth_user = gh.get_user()
gist = gh_auth_user.create_gist(public=False, files={"myfile.txt": github.InputFileContent("my contents")}, description="my description")
【讨论】: