diff options
author | 2012-03-01 19:41:46 +0100 | |
---|---|---|
committer | 2012-03-01 19:43:26 +0100 | |
commit | 5d7ee35eb23f193ec79a1a7b24ea87c6f1bc28b8 (patch) | |
tree | c90ab9489c5217151c1f1c716aea8fa39b303393 /pygithub3/services/base.py | |
parent | WIP on services.repos doc (diff) | |
download | python-github3-5d7ee35eb23f193ec79a1a7b24ea87c6f1bc28b8.tar.xz python-github3-5d7ee35eb23f193ec79a1a7b24ea87c6f1bc28b8.zip |
Complete services.repos doc
Also add Mimetypes doc
Diffstat (limited to 'pygithub3/services/base.py')
-rw-r--r-- | pygithub3/services/base.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pygithub3/services/base.py b/pygithub3/services/base.py index 7fb6133..8602150 100644 --- a/pygithub3/services/base.py +++ b/pygithub3/services/base.py @@ -136,14 +136,9 @@ class Service(object): class MimeTypeMixin(object): """ - Mimetype support to Services that inherit this Mixin + Mimetype support to Services Adds 4 public functions to service: - - 1. set_raw_mimetype - 2. set_text_mimetype - 3. set_html_mimetype - 4. set_full_mimetype """ VERSION = 'beta' @@ -152,16 +147,21 @@ class MimeTypeMixin(object): self.mimetype = 'application/vnd.github.%s.%s+json' % ( self.VERSION, mimetype) - def set_raw_mimetype(self): + def set_raw(self): + """ Resource will have ``body`` attribute """ self.__set_mimetype('raw') - def set_text_mimetype(self): + def set_text(self): + """ Resource will have ``body_text`` attribute """ self.__set_mimetype('text') - def set_html_mimetype(self): + def set_html(self): + """ Resource will have ``body_html`` attribute """ self.__set_mimetype('html') - def set_full_mimetype(self): + def set_full(self): + """ Resource will have ``body`` ``body_text`` and ``body_html`` + attributes """ self.__set_mimetype('full') def _get_mimetype_as_header(self): |