From 5d7ee35eb23f193ec79a1a7b24ea87c6f1bc28b8 Mon Sep 17 00:00:00 2001 From: David Medina Date: Thu, 1 Mar 2012 19:41:46 +0100 Subject: Complete services.repos doc Also add Mimetypes doc --- pygithub3/services/base.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'pygithub3/services/base.py') 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): -- cgit v1.2.3-59-g8ed1b