Skip to content

Commit f9bf637

Browse files
committed
update doc strings
1 parent e98f7e3 commit f9bf637

File tree

6 files changed

+122
-107
lines changed

6 files changed

+122
-107
lines changed

ms_graph/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def _silent_sso(self) -> bool:
214214
"""Attempts a Silent Authentication using the Access Token and Refresh Token.
215215
216216
Returns
217-
-------
217+
----
218218
(bool)
219219
`True` if it was successful and `False` if it failed.
220220
"""

ms_graph/drive_items.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -327,18 +327,3 @@ def get_user_drive_item_by_path(self, user_id: str, item_path: str) -> Dict:
327327
)
328328

329329
return content
330-
331-
332-
# GET /drives/{drive-id}/items/{item-id}
333-
# GET /drives/{drive-id}/root:/{item-path}
334-
# GET /groups/{group-id}/drive/items/{item-id}
335-
# GET /groups/{group-id}/drive/root:/{item-path}
336-
# GET /me/drive/items/{item-id}
337-
# GET /me/drive/root:/{item-path}
338-
339-
# GET /sites/{site-id}/drive/items/{item-id}
340-
# GET /sites/{site-id}/drive/root:/{item-path}
341-
# GET /sites/{site-id}/lists/{list-id}/items/{item-id}/driveItem
342-
343-
# GET /users/{user-id}/drive/items/{item-id}
344-
# GET /users/{user-id}/drive/root:/{item-path}

ms_graph/groups.py

Lines changed: 18 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
class Groups():
66

77
def __init__(self, session: object) -> None:
8+
"""Initializes the `Group` service.
9+
10+
### Parameters
11+
----
12+
session : object
13+
An authenticated session for our Microsoft Graph Client.
14+
"""
815

916
# Set the session.
1017
self.graph_session: GraphSession = session
@@ -14,55 +21,21 @@ def __init__(self, session: object) -> None:
1421
self.collections_endpoint = 'groups'
1522

1623
def list_groups(self) -> Dict:
24+
"""List all the groups in an organization, including but
25+
not limited to Microsoft 365 groups.
26+
27+
### Returns
28+
-------
29+
Dict
30+
If successful, this method returns a 200 OK
31+
response code and collection of group objects in
32+
the response body. The response includes only the
33+
default properties of each group.
34+
"""
1735

1836
content = self.graph_session.make_request(
1937
method='get',
2038
endpoint=self.collections_endpoint
2139
)
2240

2341
return content
24-
25-
def get_root_drive_children(self) -> Dict:
26-
27-
content = self.graph_session.make_request(
28-
method='get',
29-
endpoint=self.endpoint + "/root/children"
30-
)
31-
32-
return content
33-
34-
def get_root_drive_delta(self) -> Dict:
35-
36-
content = self.graph_session.make_request(
37-
method='get',
38-
endpoint=self.endpoint + "/root/delta"
39-
)
40-
41-
return content
42-
43-
def get_root_drive_followed(self) -> Dict:
44-
45-
content = self.graph_session.make_request(
46-
method='get',
47-
endpoint=self.endpoint + "/root/followed"
48-
)
49-
50-
return content
51-
52-
def get_drive_by_id(self, drive_id: str) -> Dict:
53-
54-
content = self.graph_session.make_request(
55-
method='get',
56-
endpoint=self.collections_endpoint + "/{id}".format(id=drive_id)
57-
)
58-
59-
return content
60-
61-
def get_group_drives(self, group_id: str) -> Dict:
62-
63-
content = self.graph_session.make_request(
64-
method='get',
65-
endpoint="groups/{group_id}/drives".format(group_id=group_id)
66-
)
67-
68-
return content

0 commit comments

Comments
 (0)