fix readme style

fork
Brian White 12 years ago
parent bb5d8c43ed
commit dfb729b140

@ -188,62 +188,62 @@ node-imap exposes one object: **ImapConnection**.
A message structure with multiple parts might look something like the following: A message structure with multiple parts might look something like the following:
```javascript ```javascript
[ { type: 'mixed' [ { type: 'mixed',
, params: { boundary: '000e0cd294e80dc84c0475bf339d' } params: { boundary: '000e0cd294e80dc84c0475bf339d' },
, disposition: null disposition: null,
, language: null language: null,
, location: null location: null
},
[ { type: 'alternative',
params: { boundary: '000e0cd294e80dc83c0475bf339b' },
disposition: null,
language: null
},
[ { partID: '1.1',
type: 'text',
subtype: 'plain',
params: { charset: 'ISO-8859-1' },
id: null,
description: null,
encoding: '7BIT',
size: 935,
lines: 46,
md5: null,
disposition: null,
language: null
} }
, [ { type: 'alternative' ],
, params: { boundary: '000e0cd294e80dc83c0475bf339b' } [ { partID: '1.2',
, disposition: null type: 'text',
, language: null subtype: 'html',
} params: { charset: 'ISO-8859-1' },
, [ { partID: '1.1' id: null,
, type: 'text' description: null,
, subtype: 'plain' encoding: 'QUOTED-PRINTABLE',
, params: { charset: 'ISO-8859-1' } size: 1962,
, id: null lines: 33,
, description: null md5: null,
, encoding: '7BIT' disposition: null,
, size: 935 language: null
, lines: 46
, md5: null
, disposition: null
, language: null
} }
] ]
, [ { partID: '1.2' ],
, type: 'text' [ { partID: '2',
, subtype: 'html' type: 'application',
, params: { charset: 'ISO-8859-1' } subtype: 'octet-stream',
, id: null params: { name: 'somefile' },
, description: null id: null,
, encoding: 'QUOTED-PRINTABLE' description: null,
, size: 1962 encoding: 'BASE64',
, lines: 33 size: 98,
, md5: null lines: null,
, disposition: null md5: null,
, language: null disposition:
} { type: 'attachment',
] params: { filename: 'somefile' }
] },
, [ { partID: '2' language: null,
, type: 'application' location: null
, subtype: 'octet-stream'
, params: { name: 'somefile' }
, id: null
, description: null
, encoding: 'BASE64'
, size: 98
, lines: null
, md5: null
, disposition:
{ type: 'attachment'
, params: { filename: 'somefile' }
}
, language: null
, location: null
} }
] ]
] ]
@ -255,18 +255,18 @@ Each message part is identified by a partID which is used when you want to fetch
The structure of a message with only one part will simply look something like this: The structure of a message with only one part will simply look something like this:
```javascript ```javascript
[ { partID: '1' [ { partID: '1',
, type: 'text' type: 'text',
, subtype: 'plain' subtype: 'plain',
, params: { charset: 'ISO-8859-1' } params: { charset: 'ISO-8859-1' },
, id: null id: null,
, description: null description: null,
, encoding: '7BIT' encoding: '7BIT',
, size: 935 size: 935,
, lines: 46 lines: 46,
, md5: null md5: null,
, disposition: null disposition: null,
, language: null language: null
} }
] ]
``` ```
@ -323,13 +323,13 @@ ImapConnection Properties
There should always be at least one entry (although the IMAP spec allows for more, it doesn't seem to be very common) in the personal namespace list, with a blank namespace prefix. Each property's array contains objects of the following format (with example values): There should always be at least one entry (although the IMAP spec allows for more, it doesn't seem to be very common) in the personal namespace list, with a blank namespace prefix. Each property's array contains objects of the following format (with example values):
```javascript ```javascript
{ prefix: '' // A string containing the prefix to use to access mailboxes in this namespace { prefix: '', // A string containing the prefix to use to access mailboxes in this namespace
, delimiter: '/' // A string containing the hierarchy delimiter for this namespace, or boolean false delimiter: '/', // A string containing the hierarchy delimiter for this namespace, or boolean false
// for a flat namespace with no hierarchy // for a flat namespace with no hierarchy
, extensions: [ // An array of namespace extensions supported by this namespace, or null if none extensions: [ // An array of namespace extensions supported by this namespace, or null if none
// are specified // are specified
{ name: 'X-FOO-BAR' // A string indicating the extension name { name: 'X-FOO-BAR', // A string indicating the extension name
, params: [ 'BAZ' ] // An array of strings containing the parameters for this extension, params: [ 'BAZ' ] // An array of strings containing the parameters for this extension,
// or null if none are specified // or null if none are specified
} }
] ]
@ -382,62 +382,62 @@ ImapConnection Functions
```javascript ```javascript
{ INBOX: // mailbox name { INBOX: // mailbox name
{ attribs: [] // mailbox attributes. An attribute of 'NOSELECT' indicates the mailbox cannot { attribs: [], // mailbox attributes. An attribute of 'NOSELECT' indicates the mailbox cannot
// be opened // be opened
, displayName: 'INBOX' // the UTF-7-decoded version of the mailbox name displayName: 'INBOX', // UTF-7-decoded version of the mailbox name
, delimiter: '/' // hierarchy delimiter for accessing this mailbox's direct children. delimiter: '/', // hierarchy delimiter for accessing this mailbox's direct children.
, children: null // an object containing another structure similar in format to this top level, children: null, // an object containing another structure similar in format to this top level,
// otherwise null if no children // otherwise null if no children
, parent: null // pointer to parent mailbox, null if at the top level parent: null // pointer to parent mailbox, null if at the top level
} },
, Work: Work:
{ attribs: [] { attribs: [],
, delimiter: '/' delimiter: '/',
, children: null children: null,
, parent: null parent: null
} },
, '[Gmail]': '[Gmail]':
{ attribs: [ 'NOSELECT' ] { attribs: [ 'NOSELECT' ],
, delimiter: '/' delimiter: '/',
, children: children:
{ 'All Mail': { 'All Mail':
{ attribs: [] { attribs: [],
, delimiter: '/' delimiter: '/',
, children: null children: null,
, parent: [Circular] parent: [Circular]
} },
, Drafts: Drafts:
{ attribs: [] { attribs: [],
, delimiter: '/' delimiter: '/',
, children: null children: null,
, parent: [Circular] parent: [Circular]
} },
, 'Sent Mail': 'Sent Mail':
{ attribs: [] { attribs: [],
, delimiter: '/' delimiter: '/',
, children: null children: null,
, parent: [Circular] parent: [Circular]
} },
, Spam: Spam:
{ attribs: [] { attribs: [],
, delimiter: '/' delimiter: '/',
, children: null children: null,
, parent: [Circular] parent: [Circular]
} },
, Starred: Starred:
{ attribs: [] { attribs: [],
, delimiter: '/' delimiter: '/',
, children: null children: null,
, parent: [Circular] parent: [Circular]
} },
, Trash: Trash:
{ attribs: [] { attribs: [],
, delimiter: '/' delimiter: '/',
, children: null children: null,
, parent: [Circular] parent: [Circular]
}
} }
, parent: null },
parent: null
} }
} }
``` ```
@ -558,7 +558,7 @@ Valid `options` are:
* **size** - < _boolean_ > - Fetch the RFC822 size. **Default:** false * **size** - < _boolean_ > - Fetch the RFC822 size. **Default:** false
`request` is an _object_ or an _array_ of _object_s with the following valid properties: `request` is an _object_ or an _array_ of _object_ with the following valid properties:
* **id** - < _mixed_ > - _integer_ or _string_ referencing a message part to use when retrieving headers and/or a body. **Default:** (root part/entire message) * **id** - < _mixed_ > - _integer_ or _string_ referencing a message part to use when retrieving headers and/or a body. **Default:** (root part/entire message)

Loading…
Cancel
Save