From 844635d4ca47ccda46f8f836485e66f3a0c94804 Mon Sep 17 00:00:00 2001 From: Doug Fenstermacher Date: Wed, 23 Sep 2020 15:14:40 -0400 Subject: [PATCH 1/2] corrects variable names in msgraph.group.Group.create method --- msgraph/group.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/msgraph/group.py b/msgraph/group.py index 323ae6d..ca6a648 100644 --- a/msgraph/group.py +++ b/msgraph/group.py @@ -164,14 +164,7 @@ def get(cls, api, **kwargs): @classmethod def create(cls, api, display_name, mail_enabled, mail_nickname, security_enabled, **kwargs): """ - Fetches User instances from the API endpoint that were created from a certain point forward - - If a uri is not specified, will return a list users created since the beginning of time. - The process will return a list of User instances along with a deltaLink. The deltaLink - should be used during the next execution to fetch all User instances that were created/updated - since the previous execution when the deltaLink was obtained. - - For more information see: https://docs.microsoft.com/en-us/graph/delta-query-users + creates a new Group instance at the API endpoint Parameters: api (msgraph.api.GraphAPI): The endpoint in which to create the Group @@ -191,10 +184,10 @@ def create(cls, api, display_name, mail_enabled, mail_nickname, security_enabled members = kwargs.get('members', []) data = { - 'displayName': self.display_name, - 'mailEnabled': self.mail_enabled, - 'mailNickname': self.mail_nickname, - 'securityEnabled': self.security_enabled, + 'displayName': display_name, + 'mailEnabled': mail_enabled, + 'mailNickname': mail_nickname, + 'securityEnabled': security_enabled, 'owners': owners, 'members': members } From aee0645718fc93b0b2f6d91f82fc40ef4b553c8f Mon Sep 17 00:00:00 2001 From: Doug Fenstermacher Date: Wed, 23 Sep 2020 15:15:59 -0400 Subject: [PATCH 2/2] correct attribute names in response data for StaffMembers --- msgraph/beta/bookings.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/msgraph/beta/bookings.py b/msgraph/beta/bookings.py index 77b3b22..4cb4f77 100644 --- a/msgraph/beta/bookings.py +++ b/msgraph/beta/bookings.py @@ -228,13 +228,13 @@ def __repr__(self): @classmethod def from_api(cls, data): id = data['id'] - display_name = data['display_name'] - email_address = data['email_address'] + display_name = data['displayName'] + email_address = data['emailAddress'] role = data['role'] - working_hours = [WorkingHours.from_api(item) for item in data['working_hours']] - use_business_hours = data['use_business_hours'] - availability_is_affected_by_personal_calendar = data['availability_is_affected_by_personal_calendar'] - color_index = data['color_index'] + working_hours = [WorkingHours.from_api(item) for item in data['workingHours']] + use_business_hours = data['useBusinessHours'] + availability_is_affected_by_personal_calendar = data['availabilityIsAffectedByPersonalCalendar'] + color_index = data['colorIndex'] return cls(id, display_name, email_address, role, working_hours, use_business_hours, availability_is_affected_by_personal_calendar, color_index) @classmethod