mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-09-06 12:44:30 +08:00
71 lines
2.4 KiB
HTML
71 lines
2.4 KiB
HTML
---
|
|
layout: docs
|
|
title: Contact
|
|
edit_url: "https://github.com/nylas/N1/blob/master/src/flux/models/contact.coffee"
|
|
---
|
|
|
|
<h2>Summary</h2>
|
|
|
|
<div class="markdown-from-sourecode">
|
|
<p><p>The Contact model represents a Contact object served by the Nylas Platform API.
|
|
For more information about Contacts on the Nylas Platform, read the
|
|
<a href="https://nylas.com/docs/api#contacts">Contacts API Documentation</a></p>
|
|
<h2 id="attributes">Attributes</h2>
|
|
<p><code>name</code>: <a href='attributestring.html'>AttributeString</a> The name of the contact. Queryable.</p>
|
|
<p><code>email</code>: <a href='attributestring.html'>AttributeString</a> The email address of the contact. Queryable.</p>
|
|
<p><code>thirdPartyData</code>: <a href='attributeobject.html'>AttributeObject</a> Extra data that we find out about a
|
|
contact. The data is keyed by the 3rd party service that dumped the data
|
|
there. The value is an object of raw data in the form that the service
|
|
provides</p>
|
|
<p>We also have "normalized" optional data for each contact. This list may
|
|
grow as the needs of a contact become more complex.</p>
|
|
<p>This class also inherits attributes from <a href='model.html'>Model</a></p>
|
|
</p>
|
|
</div>
|
|
|
|
<ul>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<h3>Instance Methods</h3>
|
|
|
|
<h4 id=toString class="function-name">
|
|
toString(<span class="args"></span>) <a href="#toString" class="link"></a>
|
|
</h4>
|
|
|
|
<div class="function-description markdown-from-sourecode">
|
|
<p></p>
|
|
</div>
|
|
|
|
|
|
<strong>Returns</strong>
|
|
<table class="arguments">
|
|
<tr>
|
|
<th>Return Values</th>
|
|
</tr>
|
|
<tr><td class="markdown-from-sourecode"><p>Returns a string of the format <code>Full Name <email@address.com></code> if
|
|
the contact has a populated name, just the email address otherwise.</p>
|
|
</td></tr>
|
|
</table>
|
|
<h4 id=isMe class="function-name">
|
|
isMe(<span class="args"></span>) <a href="#isMe" class="link"></a>
|
|
</h4>
|
|
|
|
<div class="function-description markdown-from-sourecode">
|
|
<p></p>
|
|
</div>
|
|
|
|
|
|
<strong>Returns</strong>
|
|
<table class="arguments">
|
|
<tr>
|
|
<th>Return Values</th>
|
|
</tr>
|
|
<tr><td class="markdown-from-sourecode"><p>Returns true if the contact is the current user, false otherwise.
|
|
You should use this method instead of comparing the user's email address to
|
|
the account email, since it is case-insensitive and future-proof.</p>
|
|
</td></tr>
|
|
</table>
|