GET https://www.googleapis.com/admin/reports/v1/activity/users/userKey
GET https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive
Person contactToCreate = new Person(); List names = new ArrayList<>(); names.add(new Name().setGivenName("John").setFamilyName("Doe")); contactToCreate.setNames(names); Person createdContact = peopleService.people().createContact(contactToCreate).execute();
String resourceName = "people/c12345"; // existing contact resource name Person contactToUpdate = peopleService.people().get(resourceName) .setPersonFields("names,emailAddresses") .execute(); List emailAddresses = new ArrayList<>(); emailAddresses.add(new EmailAddress().setValue("john.doe@gmail.com")); contactToUpdate.setEmailAddresses(emailAddresses); Person updatedContact = peopleService.people().updateContact(contactToUpdate) .setUpdatePersonFields("emailAddresses") .execute();
var TIMEZONE = "America/Los_Angeles"; var EVENT = { "start": {"dateTime": "2017-07-01T19:00:00", "timeZone": TIMEZONE}, "end": {"dateTime": "2017-07-01T22:00:00", "timeZone": TIMEZONE}, "recurrence": ["RRULE:FREQ=MONTHLY;INTERVAL=2;UNTIL=20171231"] };
GCAL.events().patch(calendarId='primary', eventId=EVENT_ID, sendNotifications=True, body=EVENT).execute()