Google Mirror API . contacts

Instance Methods

delete(id)

Deletes a contact.

get(id)

Gets a single contact by ID.

insert(body)

Inserts a new contact.

list()

Retrieves a list of contacts for the authenticated user.

patch(id, body)

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

update(id, body)

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",
      ],
      "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",
      ],
      "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.
      "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
          # - ADD_CAPTION
        "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.
      "acceptCommands": [ # A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.
        { # A single menu command that is part of a Contact.
          "type": "A String", # The type of operation this command corresponds to. Allowed values are:
              # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
              # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
        },
      ],
      "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
      "speakableName": "A String", # Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
    }
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",
    ],
    "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",
    ],
    "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.
    "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
        # - ADD_CAPTION
      "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.
    "acceptCommands": [ # A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.
      { # A single menu command that is part of a Contact.
        "type": "A String", # The type of operation this command corresponds to. Allowed values are:
            # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
            # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
      },
    ],
    "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
    "speakableName": "A String", # Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
  }


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",
      ],
      "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",
      ],
      "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.
      "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
          # - ADD_CAPTION
        "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.
      "acceptCommands": [ # A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.
        { # A single menu command that is part of a Contact.
          "type": "A String", # The type of operation this command corresponds to. Allowed values are:
              # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
              # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
        },
      ],
      "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
      "speakableName": "A String", # Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
    }
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",
          ],
          "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",
          ],
          "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.
          "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
              # - ADD_CAPTION
            "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.
          "acceptCommands": [ # A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.
            { # A single menu command that is part of a Contact.
              "type": "A String", # The type of operation this command corresponds to. Allowed values are:
                  # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
                  # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
            },
          ],
          "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
          "speakableName": "A String", # Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
        },
    ],
    "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",
    ],
    "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",
    ],
    "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.
    "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
        # - ADD_CAPTION
      "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.
    "acceptCommands": [ # A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.
      { # A single menu command that is part of a Contact.
        "type": "A String", # The type of operation this command corresponds to. Allowed values are:
            # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
            # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
      },
    ],
    "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
    "speakableName": "A String", # Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
  }


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",
      ],
      "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",
      ],
      "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.
      "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
          # - ADD_CAPTION
        "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.
      "acceptCommands": [ # A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.
        { # A single menu command that is part of a Contact.
          "type": "A String", # The type of operation this command corresponds to. Allowed values are:
              # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
              # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
        },
      ],
      "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
      "speakableName": "A String", # Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
    }
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",
    ],
    "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",
    ],
    "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.
    "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
        # - ADD_CAPTION
      "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.
    "acceptCommands": [ # A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.
      { # A single menu command that is part of a Contact.
        "type": "A String", # The type of operation this command corresponds to. Allowed values are:
            # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
            # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
      },
    ],
    "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
    "speakableName": "A String", # Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
  }


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",
      ],
      "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",
      ],
      "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.
      "sharingFeatures": [ # A list of sharing features that a contact can handle. Allowed values are:
          # - ADD_CAPTION
        "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.
      "acceptCommands": [ # A list of voice menu commands that a contact can handle. Glass shows up to three contacts for each voice menu command. If there are more than that, the three contacts with the highest priority are shown for that particular command.
        { # A single menu command that is part of a Contact.
          "type": "A String", # The type of operation this command corresponds to. Allowed values are:
              # - TAKE_A_NOTE - Shares a timeline item with the transcription of user speech from the "Take a note" voice menu command.
              # - POST_AN_UPDATE - Shares a timeline item with the transcription of user speech from the "Post an update" voice menu command.
        },
      ],
      "id": "A String", # An ID for this contact. This is generated by the application and is treated as an opaque token.
      "speakableName": "A String", # Name of this contact as it should be pronounced. If this contact's name must be spoken as part of a voice disambiguation menu, this name is used as the expected pronunciation. This is useful for contact names with unpronounceable characters or whose display spelling is otherwise not phonetic.
    }