mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-01 03:11:09 +00:00
Generate some repetitive doc files
This commit is contained in:
@@ -17,32 +17,55 @@ import github.GithubObject
|
||||
|
||||
|
||||
class UserKey(github.GithubObject.GithubObject):
|
||||
"""
|
||||
This class represents UserKeys as returned for example by http://developer.github.com/v3/todo
|
||||
"""
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
"""
|
||||
:type: integer
|
||||
"""
|
||||
self._completeIfNotSet(self._id)
|
||||
return self._NoneIfNotSet(self._id)
|
||||
|
||||
@property
|
||||
def key(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._key)
|
||||
return self._NoneIfNotSet(self._key)
|
||||
|
||||
@property
|
||||
def title(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._title)
|
||||
return self._NoneIfNotSet(self._title)
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
"""
|
||||
:type: string
|
||||
"""
|
||||
self._completeIfNotSet(self._url)
|
||||
return self._NoneIfNotSet(self._url)
|
||||
|
||||
@property
|
||||
def verified(self):
|
||||
"""
|
||||
:type: bool
|
||||
"""
|
||||
self._completeIfNotSet(self._verified)
|
||||
return self._NoneIfNotSet(self._verified)
|
||||
|
||||
def delete(self):
|
||||
"""
|
||||
:calls: `DELETE /user/keys/:id <http://developer.github.com/v3/todo>`_
|
||||
:rtype: None
|
||||
"""
|
||||
headers, data = self._requester.requestAndCheck(
|
||||
"DELETE",
|
||||
self.url,
|
||||
@@ -51,6 +74,12 @@ class UserKey(github.GithubObject.GithubObject):
|
||||
)
|
||||
|
||||
def edit(self, title=github.GithubObject.NotSet, key=github.GithubObject.NotSet):
|
||||
"""
|
||||
:calls: `PATCH /user/keys/:id <http://developer.github.com/v3/todo>`_
|
||||
:param title: string
|
||||
:param key: string
|
||||
:rtype: None
|
||||
"""
|
||||
assert title is github.GithubObject.NotSet or isinstance(title, (str, unicode)), title
|
||||
assert key is github.GithubObject.NotSet or isinstance(key, (str, unicode)), key
|
||||
post_parameters = dict()
|
||||
|
||||
Reference in New Issue
Block a user