Class: Glass::Contact

Inherits:
Object
  • Object
show all
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

@@kind =
MIRROR+"#"+CONTACT

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Attribute Details

.kindObject

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

#acceptTypesObject

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

#displayNameObject

The name to display for this contact.



30
31
32
# File 'lib/glass/contacts/contact.rb', line 30

def displayName
  @displayName
end

#idObject (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

#imageUrlsObject

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

#phoneNumberObject

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

#priorityObject

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

#sourceObject (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

#typeObject

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