Fix doc for raw_data (issue #144)

This commit is contained in:
Vincent Jacques
2013-03-21 21:56:51 +01:00
parent 109495175e
commit a397fac6db
4 changed files with 8 additions and 1 deletions
+2
View File
@@ -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"]:
+3
View File
@@ -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
View File
@@ -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
+2
View File
@@ -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