Admin Directory API . users . photos

Instance Methods

delete(userKey=*)

Remove photos for the user

get(userKey=*)

Retrieve photo of a user

patch(userKey=*, body=None)

Add a photo for the user. This method supports patch semantics.

update(userKey=*, body=None)

Add a photo for the user

Method Details

delete(userKey=*)
Remove photos for the user

Args:
  userKey: string, Email or immutable ID of the user (required)
get(userKey=*)
Retrieve photo of a user

Args:
  userKey: string, Email or immutable ID of the user (required)

Returns:
  An object of the form:

    { # JSON template for Photo object in Directory API.
      "mimeType": "A String", # Mime Type of the photo
      "kind": "admin#directory#user#photo", # Kind of resource this is.
      "photoData": "A String", # Base64 encoded photo data
      "height": 42, # Height in pixels of the photo
      "width": 42, # Width in pixels of the photo
      "etag": "A String", # ETag of the resource.
      "primaryEmail": "A String", # Primary email of User (Read-only)
      "id": "A String", # Unique identifier of User (Read-only)
    }
patch(userKey=*, body=None)
Add a photo for the user. This method supports patch semantics.

Args:
  userKey: string, Email or immutable ID of the user (required)
  body: object, The request body.
    The object takes the form of:

{ # JSON template for Photo object in Directory API.
    "mimeType": "A String", # Mime Type of the photo
    "kind": "admin#directory#user#photo", # Kind of resource this is.
    "photoData": "A String", # Base64 encoded photo data
    "height": 42, # Height in pixels of the photo
    "width": 42, # Width in pixels of the photo
    "etag": "A String", # ETag of the resource.
    "primaryEmail": "A String", # Primary email of User (Read-only)
    "id": "A String", # Unique identifier of User (Read-only)
  }


Returns:
  An object of the form:

    { # JSON template for Photo object in Directory API.
      "mimeType": "A String", # Mime Type of the photo
      "kind": "admin#directory#user#photo", # Kind of resource this is.
      "photoData": "A String", # Base64 encoded photo data
      "height": 42, # Height in pixels of the photo
      "width": 42, # Width in pixels of the photo
      "etag": "A String", # ETag of the resource.
      "primaryEmail": "A String", # Primary email of User (Read-only)
      "id": "A String", # Unique identifier of User (Read-only)
    }
update(userKey=*, body=None)
Add a photo for the user

Args:
  userKey: string, Email or immutable ID of the user (required)
  body: object, The request body.
    The object takes the form of:

{ # JSON template for Photo object in Directory API.
    "mimeType": "A String", # Mime Type of the photo
    "kind": "admin#directory#user#photo", # Kind of resource this is.
    "photoData": "A String", # Base64 encoded photo data
    "height": 42, # Height in pixels of the photo
    "width": 42, # Width in pixels of the photo
    "etag": "A String", # ETag of the resource.
    "primaryEmail": "A String", # Primary email of User (Read-only)
    "id": "A String", # Unique identifier of User (Read-only)
  }


Returns:
  An object of the form:

    { # JSON template for Photo object in Directory API.
      "mimeType": "A String", # Mime Type of the photo
      "kind": "admin#directory#user#photo", # Kind of resource this is.
      "photoData": "A String", # Base64 encoded photo data
      "height": 42, # Height in pixels of the photo
      "width": 42, # Width in pixels of the photo
      "etag": "A String", # ETag of the resource.
      "primaryEmail": "A String", # Primary email of User (Read-only)
      "id": "A String", # Unique identifier of User (Read-only)
    }