# Google Mirror API . contacts

## Instance Methods

Deletes a contact.

Gets a single contact by ID.

Inserts a new contact.

Retrieves a list of contacts for the authenticated user.

Updates a contact in place. This method supports patch semantics.

Updates a contact in place.

### Method Details

`delete(id)`

    Deletes a contact.

    Args:
      id: string, The ID of the contact. (required)

`get(id)`

    Gets a single contact by ID.

    Args:
      id: string, The ID of the contact. (required)

    Returns:
      An object of the form:

        { # A person or group that can be used as a creator or a contact.
          "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
          "displayName": "A String", # The name to display for this contact.
          "acceptTypes": [ # 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.
            "A String",
          ],
          "type": "A String", # 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.
          "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
          "source": "A String", # The ID of the application that created this contact. This is populated by the API
          "phoneNumber": "A String", # Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
          "imageUrls": [ # 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.
            "A String",
          ],
          "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
        }

`insert(body)`

    Inserts a new contact.

    Args:
      body: object, The request body. (required)
        The object takes the form of:

    { # A person or group that can be used as a creator or a contact.
        "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
        "displayName": "A String", # The name to display for this contact.
        "acceptTypes": [ # 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.
          "A String",
        ],
        "type": "A String", # 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.
        "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
        "source": "A String", # The ID of the application that created this contact. This is populated by the API
        "phoneNumber": "A String", # Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
        "imageUrls": [ # 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.
          "A String",
        ],
        "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
      }

    Returns:
      An object of the form:

        { # A person or group that can be used as a creator or a contact.
          "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
          "displayName": "A String", # The name to display for this contact.
          "acceptTypes": [ # 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.
            "A String",
          ],
          "type": "A String", # 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.
          "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
          "source": "A String", # The ID of the application that created this contact. This is populated by the API
          "phoneNumber": "A String", # Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
          "imageUrls": [ # 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.
            "A String",
          ],
          "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
        }

`list()`

    Retrieves a list of contacts for the authenticated user.

    Args:

    Returns:
      An object of the form:

        { # A list of Contacts representing contacts. This is the response from the server to GET requests on the contacts collection.
        "items": [ # Contact list.
          { # A person or group that can be used as a creator or a contact.
              "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
              "displayName": "A String", # The name to display for this contact.
              "acceptTypes": [ # 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.
                "A String",
              ],
              "type": "A String", # 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.
              "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
              "source": "A String", # The ID of the application that created this contact. This is populated by the API
              "phoneNumber": "A String", # Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
              "imageUrls": [ # 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.
                "A String",
              ],
              "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
            },
        ],
        "kind": "mirror#contacts", # The type of resource. This is always mirror#contacts.
      }

`patch(id, body)`

    Updates a contact in place. This method supports patch semantics.

    Args:
      id: string, The ID of the contact. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A person or group that can be used as a creator or a contact.
        "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
        "displayName": "A String", # The name to display for this contact.
        "acceptTypes": [ # 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.
          "A String",
        ],
        "type": "A String", # 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.
        "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
        "source": "A String", # The ID of the application that created this contact. This is populated by the API
        "phoneNumber": "A String", # Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
        "imageUrls": [ # 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.
          "A String",
        ],
        "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
      }

    Returns:
      An object of the form:

        { # A person or group that can be used as a creator or a contact.
          "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
          "displayName": "A String", # The name to display for this contact.
          "acceptTypes": [ # 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.
            "A String",
          ],
          "type": "A String", # 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.
          "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
          "source": "A String", # The ID of the application that created this contact. This is populated by the API
          "phoneNumber": "A String", # Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
          "imageUrls": [ # 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.
            "A String",
          ],
          "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
        }

`update(id, body)`

    Updates a contact in place.

    Args:
      id: string, The ID of the contact. (required)
      body: object, The request body. (required)
        The object takes the form of:

    { # A person or group that can be used as a creator or a contact.
        "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
        "displayName": "A String", # The name to display for this contact.
        "acceptTypes": [ # 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.
          "A String",
        ],
        "type": "A String", # 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.
        "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
        "source": "A String", # The ID of the application that created this contact. This is populated by the API
        "phoneNumber": "A String", # Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
        "imageUrls": [ # 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.
          "A String",
        ],
        "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
      }

    Returns:
      An object of the form:

        { # A person or group that can be used as a creator or a contact.
          "kind": "mirror#contact", # The type of resource. This is always mirror#contact.
          "displayName": "A String", # The name to display for this contact.
          "acceptTypes": [ # 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.
            "A String",
          ],
          "type": "A String", # 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.
          "priority": 42, # Priority for the contact to determine ordering in a list of contacts. Contacts with higher priorities will be shown before ones with lower priorities.
          "source": "A String", # The ID of the application that created this contact. This is populated by the API
          "phoneNumber": "A String", # Primary phone number for the contact. This can be a fully-qualified number, with country calling code and area code, or a local number.
          "imageUrls": [ # 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.
            "A String",
          ],
          "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
        }