Skip to content

Commit 7094f7f

Browse files
authored
Merge branch 'main' into task/update-samples
2 parents db5882d + 8ea9729 commit 7094f7f

2,981 files changed

Lines changed: 33149 additions & 26795 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/auto-merge-dependabot.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
- name: Dependabot metadata
1919
id: metadata
20-
uses: dependabot/fetch-metadata@v1.3.6
20+
uses: dependabot/fetch-metadata@v1.4.0
2121
with:
2222
github-token: "${{ secrets.GITHUB_TOKEN }}"
2323

‎CHANGELOG.md‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,23 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## ["1.0.0a11] - 2023-04-05
8+
## [1.0.0a12] - 2023-04-19
9+
10+
### Added
11+
12+
### Changed
13+
14+
- Changed the request builders api to include indexers as part of the path. [#2528](https://github.com/microsoft/kiota/issues/2528)
15+
16+
## [1.0.0a11] - 2023-04-05
917

1018
### Added
1119

1220
### Changed
1321

1422
- Fixed a bug where UUIDs were being passed as u_u_i_d to desrialization methods.
1523

16-
## ["1.0.0a10] - 2023-03-28
24+
## [1.0.0a10] - 2023-03-28
1725

1826
### Added
1927

@@ -24,7 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2432
- Fixed a bug where the date and guid types were improperly mapped.
2533
- Re-ordered method hierarchy to match python conventions
2634

27-
## ["1.0.0a9] - 2023-01-25
35+
## [1.0.0a9] - 2023-01-25
2836

2937
### Added
3038

‎Pipfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ setuptools = "==67.6.1"
1717
build = "==0.10.0"
1818
bumpver = "==2022.1120"
1919
pylint = "==2.17.2"
20-
mypy = "==1.1.1"
21-
yapf = "==0.32.0"
20+
mypy = "==1.2.0"
21+
yapf = "==0.33.0"
2222
isort = "==5.12.0"

‎Pipfile.lock‎

Lines changed: 81 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ request_adapter = GraphRequestAdapter(auth_provider)
101101
client = GraphServiceClient(request_adapter)
102102

103103
async def get_user():
104-
user = await client.users_by_id('userPrincipalName').get()
104+
user = await client.users.by_user_id('userPrincipalName').get()
105105
if user:
106-
print(user.display_name)
106+
print(user.display_name)
107107

108108
asyncio.run(get_user())
109109
```
@@ -138,7 +138,7 @@ Failed requests raise `APIError` exceptions. You can handle these exceptions usi
138138
from kiota_abstractions.api_error import APIError
139139
async def get_user():
140140
try:
141-
user = await client.users_by_id('userID').get()
141+
user = await client.users.by_user_id('userID').get()
142142
print(user.user_principal_name, user.display_name, user.id)
143143
except APIError as e:
144144
print(f'Error: {e.error.message}')

‎UPGRADING.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This package (`msgraph-sdk`) will only contain models that match the [Microsoft
3434
resp =client.get('/users/userId/messages')
3535

3636
# msgraph-sdk
37-
req = client.users_by_id('userId').messages().get()
37+
req = client.users.by_user_id('userId').messages.get()
3838
resp = asyncio.run(req)
3939
```
4040

@@ -120,7 +120,7 @@ request_config = MessagesRequestBuilder.MessagesRequestBuilderGetRequestConfigur
120120
query_parameters=query_params,
121121
)
122122

123-
messages = asyncio.run(client.users_by_id('userId').messages().get(request_configuration=request_config))
123+
messages = asyncio.run(client.users.by_user_id('userId').messages.get(request_configuration=request_config))
124124
for msg in messages.value:
125125
print(msg.subject)
126126
```
@@ -129,15 +129,15 @@ See [the examples](docs/Examples.md) on how to pass headers in your requests.
129129

130130
## Exception handling
131131

132-
Any `4xx` or `5xx` responses from the Graph API will result in an `ApiException` being thrown.
132+
Any `4xx` or `5xx` responses from the Graph API will result in an `APIError` being thrown.
133133

134134
```py
135-
135+
from kiota_abstractions.api_error import APIError
136136
try:
137137
users = asyncio.run(client.users().get())
138138

139-
except ApiException as e {
140-
return f"Exception occurred: {repr(e)}"
139+
except APIError as e {
140+
return f"Exception occurred: {e.error.message}"
141141
}
142142
```
143143
## Dependency changes

‎msgraph/_version.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION: str = '1.0.0a11'
1+
VERSION: str = '1.0.0a12'

0 commit comments

Comments
 (0)