Skip to content

Commit 1b94255

Browse files
authored
Merge pull request #1676 from paulhennell/update-examples
docs: Updating links to examples
2 parents f6ba283 + 82d2ab4 commit 1b94255

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $tokenRequestContext = new AuthorizationCodeContext(
6161
```
6262
Note that your application will need to handle redirecting the user to the Microsoft Identity login page to get the `authorization_code` that's passed into the `AuthorizationCodeContext`.
6363
[See](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow) for more on the `authorization_code` grant flow.
64-
To keep your user signed in across multiple requests within a session, see section on [access token management](docs/Examples.md#access-token-management)
64+
To keep your user signed in across multiple requests within a session, see section on [access token management](docs/authentication_samples.md#access-token-management)
6565

6666

6767
### Initialize a GraphServiceClient
@@ -79,9 +79,9 @@ $scopes = ['User.Read', 'Mail.ReadWrite'];
7979
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
8080
```
8181

82-
To initialize the `GraphServiceClient` with an already acquired access token or to retrieve the access token that the SDK fetches on your behalf, see section on [access token management](docs/Examples.md#access-token-management).
82+
To initialize the `GraphServiceClient` with an already acquired access token or to retrieve the access token that the SDK fetches on your behalf, see section on [access token management](docs/authentication_samples.md#access-token-management).
8383

84-
For more on Graph client configuration, see [more examples](docs/Examples.md#creating-a-graph-client)
84+
For more on Graph client configuration, see [more examples](docs/authentication_samples.md#creating-a-graph-client)
8585

8686
### Call Microsoft Graph using the v1.0 endpoint and models
8787

@@ -142,7 +142,7 @@ try {
142142

143143
* [Documentation](docs/README.md)
144144

145-
* [Examples](docs/Examples.md)
145+
* [Examples](docs/README.md#using-the-sdk)
146146

147147
* [Microsoft Graph website](https://aka.ms/graph)
148148

UPGRADING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,22 @@ respects the `Retry-After` header values. It also exponentially backs-off should
6767

6868
This would be mostly helpful for handling [throttling scenarios](https://docs.microsoft.com/en-us/graph/throttling) on the Microsoft Graph API.
6969

70-
See [this example](docs/Examples.md#customizing-middleware-configuration) on how to customize middleware.
70+
See [this example](docs/general_samples.md#customizing-middleware-configuration) on how to customize middleware.
7171

7272
## Improved support for paged collections
7373
For performance reasons, collections of entities are often split into pages and each page is returned with a URL to the next page. The `PageIterator` class simplifies consuming of paged collections. `PageIterator` handles enumerating the current page and requesting subsequent pages automatically.
7474

75-
See [this example](docs/Examples.md#paging-through-a-collection)
75+
See [this example](docs/general_samples.md#paging-through-a-collection)
7676

7777
## Support for Batch Requests
7878
Combine multiple requests in a single call with ease. Up to 20 individual requests can be batched together to reduce network latency of making each request separately. The `BatchRequestBuilder` allows you to make requests to the `/$batch` endpoint of the Microsoft Graph API.
7979

80-
See [this example](docs/Examples.md#batching-requests)
80+
See [this example](docs/general_samples.md#batching-requests)
8181

8282
## Support for resumable large file uploads
8383
To upload files larger than 3MB, Microsoft Graph API supports uploads using resumable upload sessions where several bytes are uploaded at a time. The SDK provides a LargeFileUpload task that slices your file into chunks and progressively uploads them until completion.
8484

85-
See [this example](docs/Examples.md#uploading-large-files)
85+
See [this example](docs/uploads_samples.md#uploading-large-files)
8686

8787
# Breaking Changes
8888
The following breaking changes were introduced in v2.0.0 with more detailed upgrade steps in the following section:
@@ -128,7 +128,7 @@ $graphServiceClient = new GraphServiceClient($tokenRequestContext);
128128
```
129129
With version 2's configuration, all your requests are authenticated without additional effort.
130130

131-
See [this example](docs/Examples.md#creating-a-graph-client) on how to customise the Guzzle HTTP client configuration.
131+
See [this example](docs/general_samples.md#creating-a-graph-client) on how to customise the Guzzle HTTP client configuration.
132132

133133
## Changes to Graph request functionality
134134

@@ -152,7 +152,7 @@ $requestConfig->top = 5;
152152
$messages = $graphClient->me()->messages()->get($requestConfig)->wait();
153153
```
154154

155-
See [the examples](docs/Examples.md) on how to pass headers and query parameters in your requests.
155+
See [the examples](docs/general_samples.md#passing-request-headers) on how to pass headers and query parameters in your requests.
156156

157157
## Exception Handling
158158

docs/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,18 @@ Users can begin developing immediately by connecting with the REST API directly
1414
View the [getting started steps](../README.md#get-started-with-microsoft-graph) to make your first request with Graph.
1515

1616
## Using the SDK
17-
- [Usage Examples](Examples.md)
17+
### Common Examples
18+
- [General](/docs/general_samples.md) - General usage examples and common patterns.
19+
- [Authentication](/docs/authentication_samples.md) - Detailed examples of different authentication methods and token
20+
- [FAQ](/docs/FAQ.md) - Frequently asked questions and troubleshooting common problems.
21+
### More Examples
22+
- [Users](/docs/users_samples.md) - Examples of working with user-related Graph API endpoints.
23+
- [Application](/docs/application_samples.md) - Examples of working with application-level Graph API operations.
24+
- [Drives](/docs/drives_samples.md) - Examples for working with OneDrive and SharePoint drives.
25+
- [Groups](/docs/groups_samples.md) - Code samples for managing Microsoft 365 groups.
26+
- [Uploads](/docs/uploads_samples.md) - Examples showing how to upload files, including large file upload support.
27+
- [Sharepoint](/docs/sharepoint_samples.md) - Samples demonstrating SharePoint-specific functionality.
28+
1829

1930
To make calls to the Beta Microsoft Graph API, check out our [Microsoft Graph Beta SDK](https://packagist.org/packages/microsoft/microsoft-graph-beta).
2031
## Support

docs/general_samples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Usage Examples
1+
# Usage Examples
22

33
## Creating a Graph client
44
This creates a default Graph client that uses `https://graph.microsoft.com` as the default base URL and default configured Guzzle HTTP client to make the requests.

0 commit comments

Comments
 (0)