Show
Ignore:
Timestamp:
05/06/11 17:20:15 (12 months ago)
Author:
Menno Smits <menno@…>
Branch:
default
Message:

Remaining gaps in IMAPClient class docs done.

This is sufficient for an initial release

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • imapclient/imapclient.py

    r245 r248  
    134134        """Return the folder separator used by the IMAP server. 
    135135 
    136         WARNING: The implementation just picks the first folder 
    137         separator from the first namespace returned. This is not 
    138         particularly sensible. Use namespace instead(). 
     136        .. warning:: 
     137 
     138            The implementation just picks the first folder separator 
     139            from the first namespace returned. This is not 
     140            particularly sensible. Use namespace instead(). 
    139141        """ 
    140142        warnings.warn(DeprecationWarning('get_folder_delimiter is going away. Use namespace() instead.')) 
     
    344346        """Return a list of messages ids matching *criteria*. 
    345347 
    346         XXX more detail 
     348        *criteria* should be a list of of one or more criteria 
     349        specifications or a single critera string. Example values 
     350        include:: 
     351 
     352             'NOT DELETED' 
     353             'UNSEEN' 
     354             'SINCE 1-Feb-2011' 
     355 
     356        *charset* specifies the character set of the strings in the 
     357        criteria. It defaults to US-ASCII. 
     358 
     359        See `RFC-3501 section 6.4.4 <http://tools.ietf.org/html/rfc3501#section-6.4.4>`_ 
     360        for more details. 
    347361        """ 
    348362        if not criteria: 
     
    369383 
    370384 
    371     def sort(self, sort_criteria, criteria='ALL', charset='UTF-8' ): 
     385    def sort(self, sort_criteria, criteria='ALL', charset='UTF-8'): 
    372386        """Return a list of message ids sorted by *sort_criteria* and 
    373387        optionally filtered by *criteria*. 
    374388 
    375         The *critera* are as per search().   
    376  
    377         Note that this is an extension to the IMAP4: 
    378         http://www.ietf.org/internet-drafts/draft-ietf-imapext-sort-19.txt 
    379  
    380         XXX needs more detail 
    381         XXX explain charset 
     389        Example values for *sort_criteria* include:: 
     390 
     391            ARRIVAL 
     392            REVERSE SIZE 
     393            SUBJECT 
     394 
     395        The *criteria* argument is as per search().  
     396        See `RFC-5256 <http://tools.ietf.org/html/rfc5256>`_ for full details. 
     397 
     398        Note that SORT is an extension to the IMAP4 standard so it may 
     399        not be supported by all IMAP servers. 
    382400        """ 
    383401        if not criteria: 
     
    401419        self._checkok('sort', typ, data) 
    402420 
    403         return [ long(i) for i in data[0].split() ] 
     421        return [long(i) for i in data[0].split()] 
    404422 
    405423 
    406424    def get_flags(self, messages): 
    407         """Returns the flags set for each message in *messages* as a 
    408         dictionary structured like this: 
    409           ``{ msgid1: [flag1, flag2, ... ], }``. 
     425        """Return the flags set for each message in *messages*. 
     426 
     427        The return value is a dictionary structured like this: ``{ 
     428        msgid1: [flag1, flag2, ... ], }``. 
    410429        """ 
    411430        response = self.fetch(messages, ['FLAGS'])