Skip to content

Commit 5445a1d

Browse files
committed
2.5.11 release
1 parent 261d42c commit 5445a1d

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Steps to access:
109109
Usage:
110110
```python
111111
from office365.sharepoint.client_context import ClientContext
112-
ctx = ClientContext(site_url).with_interactive(tenant_name_or_id, client_id)
112+
ctx = ClientContext("{site-url}").with_interactive("{tenant-name-or-id}", "{client-id}")
113113
me = ctx.web.current_user.get().execute_query()
114114
print(me.login_name)
115115
```
@@ -142,19 +142,17 @@ print("Web title: {0}".format(web.properties['Title']))
142142
```
143143

144144

145-
2. `RequestOptions class` - where you construct REST queries (and no model is involved)
145+
2. `SharePointRequest class` - where you construct REST queries (and no model is involved)
146146

147147
The example demonstrates how to read `Web` properties:
148148

149149
```python
150150
import json
151151
from office365.runtime.auth.user_credential import UserCredential
152-
from office365.runtime.http.request_options import RequestOptions
153-
from office365.sharepoint.client_context import ClientContext
152+
from office365.sharepoint.request import SharePointRequest
154153
site_url = "https://{your-tenant-prefix}.sharepoint.com"
155-
ctx = ClientContext(site_url).with_credentials(UserCredential("{username}", "{password}"))
156-
request = RequestOptions("{0}/_api/web/".format(site_url))
157-
response = ctx.pending_request().execute_request_direct(request)
154+
request = SharePointRequest(site_url).with_credentials(UserCredential("{username}", "{password}"))
155+
response = request.execute_request("web")
158156
json = json.loads(response.content)
159157
web_title = json['d']['Title']
160158
print("Web title: {0}".format(web_title))
@@ -184,6 +182,7 @@ Refer [examples section](examples/sharepoint) for another scenarios
184182

185183
Example:
186184
```python
185+
from office365.sharepoint.client_context import ClientContext
187186
client_credentials = ClientCredential('{client_id}','{client_secret}')
188187
ctx = ClientContext('{url}').with_credentials(client_credentials, environment='GCCH')
189188
```
@@ -395,7 +394,7 @@ which corresponds to [`Create team` endpoint](https://docs.microsoft.com/en-us/g
395394
```python
396395
from office365.graph_client import GraphClient
397396
client = GraphClient(acquire_token_func)
398-
new_team = client.groups["{group_id}"].add_team().execute_query_retry()
397+
new_team = client.groups["{group-id}"].add_team().execute_query_retry()
399398
```
400399

401400
Additional examples:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name="Office365-REST-Python-Client",
13-
version="2.5.10",
13+
version="2.5.11",
1414
author="Vadim Gremyachev",
1515
author_email="[email protected]",
1616
maintainer="Konrad Gądek, Domenico Di Nicola",

0 commit comments

Comments
 (0)