mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 19:01:15 +00:00
Fix doc for raw_data (issue #144)
This commit is contained in:
@@ -250,6 +250,8 @@ with open("github_objects.rst", "w") as github_objects:
|
||||
github_objects.write("Github objects\n")
|
||||
github_objects.write("==============\n")
|
||||
github_objects.write("\n")
|
||||
github_objects.write(".. autoclass:: github.GithubObject.GithubObject()\n")
|
||||
github_objects.write("\n")
|
||||
github_objects.write(".. toctree::\n")
|
||||
|
||||
for obj in ["AuthenticatedUser", "Authorization", "AuthorizationApplication", "Branch", "Commit", "CommitComment", "CommitStats", "CommitStatus", "Comparison", "ContentFile", "Download", "Event", "File", "Gist", "GistComment", "GistFile", "GistHistoryState", "GitAuthor", "GitBlob", "GitCommit", "GitObject", "GitignoreTemplate", "GitRef", "GitTag", "GitTree", "GitTreeElement", "Hook", "HookDescription", "HookResponse", "Issue", "IssueComment", "IssueEvent", "IssuePullRequest", "Label", "Milestone", "NamedUser", "Notification", "NotificationSubject", "Organization", "Permissions", "Plan", "PullRequest", "PullRequestComment", "PullRequestMergeStatus", "PullRequestPart", "Repository", "RepositoryKey", "Tag", "Team", "UserKey"]:
|
||||
|
||||
@@ -25,6 +25,9 @@ NotSet = _NotSetType()
|
||||
|
||||
|
||||
class GithubObject(object):
|
||||
"""
|
||||
Base class for all classes representing objects returned by the API.
|
||||
"""
|
||||
def __init__(self, requester, attributes, completed):
|
||||
self._requester = requester
|
||||
self._initAttributes()
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@ class Github(object):
|
||||
|
||||
def create_from_raw_data(self, klass, raw_data):
|
||||
"""
|
||||
Creates an object from raw_data previously obtained by ``myObject.raw_data``
|
||||
Creates an object from raw_data previously obtained by :attr:`github.GithubObject.GithubObject.raw_data`
|
||||
|
||||
:param klass: the class of the object to create
|
||||
:param raw_data: dict
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
The primary class you will instanciate is :class:`github.MainClass.Github`.
|
||||
From its ``get_``, ``create_`` methods, you will obtain instances of all Github objects
|
||||
like :class:`github.NamedUser.NamedUser` or :class:`github.Repository.Repository`.
|
||||
|
||||
All classes inherit from :class:`github.GithubObject.GithubObject`.
|
||||
"""
|
||||
|
||||
import logging
|
||||
|
||||
Reference in New Issue
Block a user