Class: Glass::Contact
- Inherits:
-
Object
- Object
- Glass::Contact
- Defined in:
- lib/glass/contacts/contact.rb
Overview
A person or group that can be used as a creator or a contact.
Constant Summary collapse
Class Attribute Summary collapse
-
.kind ⇒ Object
The type of resource.
Instance Attribute Summary collapse
-
#acceptTypes ⇒ Object
A list of MIME types that a contact supports.
-
#displayName ⇒ Object
The name to display for this contact.
-
#id ⇒ Object
readonly
An ID for this contact.
-
#imageUrls ⇒ Object
Set of image URLs to display for a contact.
-
#phoneNumber ⇒ Object
Primary phone number for the contact.
-
#priority ⇒ Object
Priority for the contact to determine ordering in a list of contacts.
-
#source ⇒ Object
readonly
The ID of the application that created this contact.
-
#type ⇒ Object
The type for this contact.
Class Attribute Details
.kind ⇒ Object
The type of resource. This is always mirror#contact.
12 13 14 |
# File 'lib/glass/contacts/contact.rb', line 12 def kind @kind end |
Instance Attribute Details
#acceptTypes ⇒ Object
A list of MIME types that a contact supports. The contact will be shown to the user if any of its acceptTypes matches any of the types of the attachments on the item. If no acceptTypes are given, the contact will be shown for all items.
50 51 52 |
# File 'lib/glass/contacts/contact.rb', line 50 def acceptTypes @acceptTypes end |
#displayName ⇒ Object
The name to display for this contact.
30 31 32 |
# File 'lib/glass/contacts/contact.rb', line 30 def displayName @displayName end |
#id ⇒ Object (readonly)
An ID for this contact. This is generated by the application and is treated as an opaque token.
25 26 27 |
# File 'lib/glass/contacts/contact.rb', line 25 def id @id end |
#imageUrls ⇒ Object
Set of image URLs to display for a contact. Most contacts will have a single image, but a “group” contact may include up to 8 image URLs and they will be resized and cropped into a mosaic on the client.
36 37 38 |
# File 'lib/glass/contacts/contact.rb', line 36 def imageUrls @imageUrls end |
#phoneNumber ⇒ Object
Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
56 57 58 |
# File 'lib/glass/contacts/contact.rb', line 56 def phoneNumber @phoneNumber end |
#priority ⇒ Object
Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
62 63 64 |
# File 'lib/glass/contacts/contact.rb', line 62 def priority @priority end |
#source ⇒ Object (readonly)
The ID of the application that created this contact. This is populated by the API
19 20 21 |
# File 'lib/glass/contacts/contact.rb', line 19 def source @source end |
#type ⇒ Object
The type for this contact. This is used for sorting in UIs. Allowed values are:
INDIVIDUAL - Represents a single person. This is the default.
GROUP - Represents more than a single person.
43 44 45 |
# File 'lib/glass/contacts/contact.rb', line 43 def type @type end |