Skip to content

Commit 7e74ad4

Browse files
committed
New notes to Breaking changes and New section
1 parent 69f8626 commit 7e74ad4

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

README.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ apps and also by some Web apps is the OAuth 2.0 authorization code grant flow.
1111
See https://docs.microsoft.com/en-us/graph/auth-v2-user
1212

1313
## Breaking changes if you're upgrading prior 1.0.0
14-
- Adds API structure to library for e.g. `client.get_me()` => `client.users.get_me()`.
15-
- Renames several methods to match API documentation for e.g. `client.get_me_events()` => `client.calendar.list_events()`.
16-
- Result from calling methods are not longer a dict but a Response obj. To access the dict response as before then call `.data` property for e.g `r = client.users.get_me()` then `r.data`.
17-
14+
- Added API structure to library for e.g. `client.get_me()` => `client.users.get_me()`.
15+
- Renamed several methods to match API documentation for e.g. `client.get_me_events()` => `client.calendar.list_events()`.
16+
- Result from calling a method is not longer a dictionary but a Response object. To access the dict response as before then call `.data` property for e.g `r = client.users.get_me()` then `r.data`.
17+
- Previous API calls made through beta endpoints are now pointing to v1.0 by default. This can be changed to beta if needed with the parameter `api_version` in the client instantiation.
1818
## New in 1.0.0
19-
- You can access to [Requests library's Response obj](https://docs.python-requests.org/en/latest/) for e.g. `r = client.users.get_me()` then `r.original` or the response handled by the library `r.data`.
19+
- You can access to [Requests library's Response Object](https://docs.python-requests.org/en/latest/user/advanced/#request-and-response-objects) for e.g. `r = client.users.get_me()` then `r.original` or the response handled by the library `r.data`.
2020
- New Response properties `r.status_code` and `r.throttling`.
21-
- Better docstrings and type hinting.
21+
- You can pass [Requests library's Event Hooks](https://docs.python-requests.org/en/latest/user/advanced/#event-hooks) with the parameter `requests_hooks` in the client instantiation. If you are using Django and want to log in database every request made through this library, see [django-requests-logger](https://github.com/GearPlug/django-requests-logger).
22+
- Better method docstrings and type hinting.
2223
- Better library structure.
2324
## Installing
2425
```
@@ -39,12 +40,12 @@ url = client.authorization_url(redirect_uri, scope, state=None)
3940

4041
#### Exchange the code for an access token
4142
```
42-
token = client.exchange_code(redirect_uri, code)
43+
response = client.exchange_code(redirect_uri, code)
4344
```
4445

4546
#### Refresh token
4647
```
47-
token = client.refresh_token(redirect_uri, refresh_token)
48+
response = client.refresh_token(redirect_uri, refresh_token)
4849
```
4950

5051
#### Set token
@@ -176,82 +177,82 @@ response = client.files.drive_download_contents(item_id)
176177
### Workbooks
177178
#### Create session for specific item
178179
```
179-
response = client.workbooks.create_session(item_id)
180+
response = client.workbooks.create_session(workbook_id)
180181
```
181182

182183
#### Refresh session for specific item
183184
```
184-
response = client.workbooks.refresh_session(item_id)
185+
response = client.workbooks.refresh_session(workbook_id)
185186
```
186187

187188
#### Close session for specific item
188189
```
189-
response = client.workbooks.close_session(item_id)
190+
response = client.workbooks.close_session(workbook_id)
190191
```
191192

192193
#### Get worksheets
193194
```
194-
response = client.workbooks.list_worksheets(item_id)
195+
response = client.workbooks.list_worksheets(workbook_id)
195196
```
196197

197198
#### Get specific worksheet
198199
```
199-
response = client.workbooks.get_worksheet(item_id, worksheet_id)
200+
response = client.workbooks.get_worksheet(workbook_id, worksheet_id)
200201
```
201202

202203
#### Add worksheets
203204
```
204-
response = client.workbooks.add_worksheet(item_id)
205+
response = client.workbooks.add_worksheet(workbook_id)
205206
```
206207

207208
#### Update worksheet
208209
```
209-
response = client.workbooks.update_worksheet(item_id, worksheet_id)
210+
response = client.workbooks.update_worksheet(workbook_id, worksheet_id)
210211
```
211212

212213
#### Get charts
213214
```
214-
response = client.workbooks.list_charts(item_id, worksheet_id)
215+
response = client.workbooks.list_charts(workbook_id, worksheet_id)
215216
```
216217

217218
#### Add chart
218219
```
219-
response = client.workbooks.add_chart(item_id, worksheet_id)
220+
response = client.workbooks.add_chart(workbook_id, worksheet_id)
220221
```
221222

222223
#### Get tables
223224
```
224-
response = client.workbooks.list_tables(item_id)
225+
response = client.workbooks.list_tables(workbook_id)
225226
```
226227

227228
#### Add table
228229
```
229-
response = client.workbooks.add_table(item_id)
230+
response = client.workbooks.add_table(workbook_id)
230231
```
231232

232233
#### Add column to table
233234
```
234-
response = client.workbooks.create_column(item_id, worksheets_id, table_id)
235+
response = client.workbooks.create_column(workbook_id, worksheet_id, table_id)
235236
```
236237

237238
#### Add row to table
238239
```
239-
response = client.workbooks.create_row(item_id, worksheets_id, table_id)
240+
response = client.workbooks.create_row(workbook_id, worksheet_id, table_id)
240241
```
241242

242243
#### Get table rows
243244
```
244-
response = client.workbooks.list_rows(item_id, table_id)
245+
response = client.workbooks.list_rows(workbook_id, table_id)
245246
```
246247

247248
#### Get range
248249
```
249-
response = client.workbooks.get_range(item_id, worksheets_id)
250+
response = client.workbooks.get_range(workbook_id, worksheet_id)
250251
```
251252

252253
#### Update range
253254
```
254-
response = client.workbooks.update_range(item_id, worksheets_id)
255+
response = client.workbooks.update_range(workbook_id, worksheet_id)
255256
```
256257

257258
### Webhooks

0 commit comments

Comments
 (0)