Generate some repetitive doc files

This commit is contained in:
Vincent Jacques
2012-12-29 08:47:23 +01:00
parent d99b7ef577
commit abf0867543
108 changed files with 2603 additions and 2601 deletions
+44
View File
@@ -19,52 +19,87 @@ import github.AuthorizationApplication
class Authorization(github.GithubObject.GithubObject):
"""
This class represents Authorizations as returned for example by http://developer.github.com/v3/todo
"""
@property
def app(self):
"""
:type: :class:`github.AuthorizationApplication.AuthorizationApplication`
"""
self._completeIfNotSet(self._app)
return self._NoneIfNotSet(self._app)
@property
def created_at(self):
"""
:type: datetime.datetime
"""
self._completeIfNotSet(self._created_at)
return self._NoneIfNotSet(self._created_at)
@property
def id(self):
"""
:type: integer
"""
self._completeIfNotSet(self._id)
return self._NoneIfNotSet(self._id)
@property
def note(self):
"""
:type: string
"""
self._completeIfNotSet(self._note)
return self._NoneIfNotSet(self._note)
@property
def note_url(self):
"""
:type: string
"""
self._completeIfNotSet(self._note_url)
return self._NoneIfNotSet(self._note_url)
@property
def scopes(self):
"""
:type: list of string
"""
self._completeIfNotSet(self._scopes)
return self._NoneIfNotSet(self._scopes)
@property
def token(self):
"""
:type: string
"""
self._completeIfNotSet(self._token)
return self._NoneIfNotSet(self._token)
@property
def updated_at(self):
"""
:type: datetime.datetime
"""
self._completeIfNotSet(self._updated_at)
return self._NoneIfNotSet(self._updated_at)
@property
def url(self):
"""
:type: string
"""
self._completeIfNotSet(self._url)
return self._NoneIfNotSet(self._url)
def delete(self):
"""
:calls: `DELETE /authorizations/:id <http://developer.github.com/v3/todo>`_
:rtype: None
"""
headers, data = self._requester.requestAndCheck(
"DELETE",
self.url,
@@ -73,6 +108,15 @@ class Authorization(github.GithubObject.GithubObject):
)
def edit(self, scopes=github.GithubObject.NotSet, add_scopes=github.GithubObject.NotSet, remove_scopes=github.GithubObject.NotSet, note=github.GithubObject.NotSet, note_url=github.GithubObject.NotSet):
"""
:calls: `PATCH /authorizations/:id <http://developer.github.com/v3/todo>`_
:param scopes: list of string
:param add_scopes: list of string
:param remove_scopes: list of string
:param note: string
:param note_url: string
:rtype: None
"""
assert scopes is github.GithubObject.NotSet or all(isinstance(element, (str, unicode)) for element in scopes), scopes
assert add_scopes is github.GithubObject.NotSet or all(isinstance(element, (str, unicode)) for element in add_scopes), add_scopes
assert remove_scopes is github.GithubObject.NotSet or all(isinstance(element, (str, unicode)) for element in remove_scopes), remove_scopes