You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -31,7 +31,7 @@ Add the dependency in `dependencies` in pom.xml
31
31
<dependency>
32
32
<groupId>com.microsoft.graph</groupId>
33
33
<artifactId>microsoft-graph-beta</artifactId>
34
-
<version>0.6.0-SNAPSHOT</version>
34
+
<version>0.7.0-SNAPSHOT</version>
35
35
</dependency>
36
36
```
37
37
@@ -61,14 +61,14 @@ Register your application by following the steps at [Register your app with the
61
61
62
62
An instance of the **GraphServiceClient** class handles building requests, sending them to the Microsoft Graph API, and processing the responses. To create a new instance of this class, you need to provide an instance of `IAuthenticationProvider`, which can authenticate requests to Microsoft Graph.
63
63
64
-
For an example of authentication in a Java desktop client application, see the [Preview msgraph-sdk-java-auth](https://github.com/microsoftgraph/msgraph-sdk-android-msa-auth-for-android-adapter) and for an Android application see [Preview msgraph-sdk-android-auth](https://github.com/microsoftgraph/msgraph-sdk-android-auth).
64
+
For an example of how to get an authentication provider, see [choose a Microsoft Graph authentication provider](https://docs.microsoft.com/graph/sdks/choose-authentication-providers?tabs=Java).
65
65
66
66
### 2.3 Get a GraphServiceClient object
67
67
68
68
After you have set the correct application ID and URL, you must get a **GraphServiceClient** object to make requests against the service. The SDK stores the account information for you, but when a user signs in for the first time, it invokes the UI to get the user's account information.
69
69
70
70
```java
71
-
IGraphServiceClient graphClient =
71
+
GraphServiceClient graphClient =
72
72
GraphServiceClient
73
73
.builder()
74
74
.authenticationProvider(authenticationProvider)
@@ -83,23 +83,28 @@ After you have a GraphServiceClient that is authenticated, you can begin making
83
83
84
84
To retrieve the user's drive:
85
85
86
+
```java
87
+
finalDrive result = graphClient
88
+
.me()
89
+
.drive()
90
+
.buildRequest()
91
+
.get();
92
+
System.out.println("Found Drive "+ result.id);
93
+
```
94
+
95
+
Or with the asynchronous API.
96
+
86
97
```java
87
98
graphClient
88
99
.me()
89
100
.drive()
90
101
.buildRequest()
91
-
.get(newICallback<Drive>() {
92
-
@Override
93
-
publicvoidsuccess(finalDriveresult) {
94
-
System.out.println("Found Drive "+ result.id);
95
-
}
96
-
...
97
-
// Handle failure case
102
+
.futureGet()
103
+
.thenApply(result -> {
104
+
System.out.println("Found Drive "+ result.id);
98
105
});
99
106
```
100
107
101
-
For a general overview of how the SDK is designed, see [overview](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Overview).
102
-
103
108
## 4. Documentation
104
109
105
110
For more detailed documentation, see:
@@ -120,7 +125,9 @@ The Microsoft Graph SDK is open for contribution. To contribute to this project,
120
125
121
126
## 7. Supported Java versions
122
127
123
-
The Microsoft Graph beta SDK for Java library is supported at runtime for Java 8+ and [Android API revision 15](http://source.android.com/source/build-numbers.html) and greater through [desugaring](https://developer.android.com/studio/write/java8-support.html#library-desugaring).
128
+
The Microsoft Graph beta SDK for Java library is supported at runtime for Java 8+ and [Android API revision 26](http://source.android.com/source/build-numbers.html) and greater.
129
+
130
+
Android developers targeting lower android API levels can do so by [enabling desugaring](https://developer.android.com/studio/write/java8-support#library-desugaring) in their project.
124
131
125
132
## 8. License
126
133
@@ -129,7 +136,3 @@ Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the [MI
0 commit comments