Skip to content

Commit 901e94f

Browse files
authored
Merge pull request #4 from cassidylaidlaw/master
Switch old beta URL to self.base_url for subscription endpoints
2 parents 9ab2117 + 5a13e13 commit 901e94f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

microsoftgraph/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def create_subscription(self, change_type, notification_url, resource, expiratio
184184
'expirationDateTime': expiration_datetime,
185185
'clientState': client_state
186186
}
187-
return self._post('https://graph.microsoft.com/beta/' + 'subscriptions', json=data)
187+
return self._post(self.base_url + 'subscriptions', json=data)
188188

189189
@token_required
190190
def renew_subscription(self, subscription_id, expiration_datetime):
@@ -203,7 +203,7 @@ def renew_subscription(self, subscription_id, expiration_datetime):
203203
data = {
204204
'expirationDateTime': expiration_datetime
205205
}
206-
return self._patch('https://graph.microsoft.com/beta/' + 'subscriptions/{}'.format(subscription_id), json=data)
206+
return self._patch(self.base_url + 'subscriptions/{}'.format(subscription_id), json=data)
207207

208208
@token_required
209209
def delete_subscription(self, subscription_id):
@@ -216,7 +216,7 @@ def delete_subscription(self, subscription_id):
216216
None.
217217
218218
"""
219-
return self._delete('https://graph.microsoft.com/beta/' + 'subscriptions/{}'.format(subscription_id))
219+
return self._delete(self.base_url + 'subscriptions/{}'.format(subscription_id))
220220

221221
# Onenote
222222
@token_required

0 commit comments

Comments
 (0)