Skip to content

Commit 9fc93de

Browse files
committed
Initial update for Beta
1 parent bb0fa60 commit 9fc93de

File tree

1,432 files changed

+65901
-875
lines changed

Some content is hidden

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

1,432 files changed

+65901
-875
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
[ ![Download](https://api.bintray.com/packages/microsoftgraph/Maven/msgraph-sdk-android/images/download.svg) ](https://bintray.com/microsoftgraph/Maven/msgraph-sdk-android/_latestVersion)[![Build Status](https://travis-ci.org/microsoftgraph/msgraph-sdk-android.svg?branch=master)](https://travis-ci.org/microsoftgraph/msgraph-sdk-android)
44

5+
## Overview
6+
7+
This client library is a release candidate and is still in preview status, please continue to provide [feedback](https://github.com/microsoftgraph/msgraph-sdk-android/issues/new) as we iterate towards a production supported library.
8+
59
Integrate the [Microsoft Graph API](https://graph.microsoft.io/en-us/getting-started) into your Android application!
610

11+
712
## 1. Installation
813
### 1.1 Install AAR via Gradle
9-
Add the JCenter repository and a compile dependency for `msgraph-sdk-android` to your project's `build.gradle`
14+
Add the maven central repository to your projects build.gradle file then add a compile dependency for com.microsoft.graph:msgraph-sdk-android:0.9.+
1015

1116
```gradle
1217
repository {
@@ -15,7 +20,7 @@ repository {
1520
1621
dependency {
1722
// Include the sdk as a dependency
18-
compile('com.microsoft.graph:msgraph-sdk-android:1.0.+')
23+
compile('com.microsoft.graph:msgraph-sdk-android:0.9.+')
1924
2025
// Include the gson dependency
2126
compile('com.google.code.gson:gson:2.3.1')
@@ -42,8 +47,7 @@ For an example of authentication in a client application see the [MSGraph SDK An
4247
Once you have set the correct application Id and url, you must get a **GraphServiceClient** object to make requests against the service. The SDK will store the account information for you, but when a user logs on for the first time, it will invoke UI to get the user's account information.
4348

4449
```java
45-
final IClientConfig mCLientConfig = DefaultClientConfig
46-
.createWithAuthenticationProvider(mAuthenticationProvider);
50+
final IClientConfig mCLientConfig = DefaultClientConfig.createWithAuthenticationProvider(mAuthenticationProvider);
4751

4852
final IGraphServiceClient mClient = new GraphServiceClient
4953
.Builder()

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ org.gradle.jvmargs=-XX:MaxPermSize=512m
2121
mavenRepoUrl = https://api.bintray.com/maven/microsoftgraph/Maven/msgraph-sdk-android
2222
mavenGroupId = com.microsoft.graph
2323
mavenArtifactId = msgraph-sdk-android
24-
mavenMajorVersion = 1
25-
mavenMinorVersion = 0
26-
mavenPatchVersion = 0
24+
mavenMajorVersion = 0
25+
mavenMinorVersion = 9
26+
mavenPatchVersion = 4
2727
nightliesUrl = http://dl.bintray.com/MicrosoftGraph/Maven

graphsdk/src/androidTest/java/com/microsoft/graph/core/BaseClientTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
public class BaseClientTests extends AndroidTestCase {
2020

21-
public static final String DEFAULT_GRAPH_ENDPOINT = "https://graph.microsoft.com/v1.0";
21+
public static final String DEFAULT_GRAPH_ENDPOINT = "https://graph.microsoft.com/beta";
2222
private String mEndpoint = DEFAULT_GRAPH_ENDPOINT;
2323
private BaseClient baseClient;
2424
private IAuthenticationProvider mAuthenticationProvider;

graphsdk/src/androidTest/java/com/microsoft/graph/core/MockBaseClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
public class MockBaseClient implements IBaseClient {
1313

14-
private static final String DEFAULT_GRAPH_ENDPOINT = "https://graph.microsoft.com/v1.0";
14+
private static final String DEFAULT_GRAPH_ENDPOINT = "https://graph.microsoft.com/beta";
1515
private String mEndpoint;
1616
private IAuthenticationProvider mAuthenticationProvider;
1717
private IExecutors mExecutors;

graphsdk/src/androidTest/java/com/microsoft/graph/extensions/IThumbnailSetRequestBuilderTests.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66

77
import android.test.AndroidTestCase;
88

9-
import java.lang.reflect.Method;
10-
119
/**
1210
* Created by pnied on 8/9/2016.
1311
*/
1412
public class IThumbnailSetRequestBuilderTests extends AndroidTestCase {
1513

1614
public void testGetThumbnailSize() throws Exception {
17-
final Method getThumbnailSize = IThumbnailSetRequestBuilder.class.getDeclaredMethod("getThumbnailSize", String.class);
18-
assertNotNull(getThumbnailSize);
19-
assertEquals(IThumbnailRequestBuilder.class, getThumbnailSize.getReturnType());
15+
// final Method getThumbnailSize = IThumbnailSetRequestBuilder.class.getDeclaredMethod("getThumbnailSize", String.class);
16+
// assertNotNull(getThumbnailSize);
17+
// assertEquals(IThumbnailRequestBuilder.class, getThumbnailSize.getReturnType());
2018
}
2119
}

graphsdk/src/androidTest/java/com/microsoft/graph/serializer/DefaultSerializerTests.java

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
import android.test.AndroidTestCase;
2626

2727
import com.microsoft.graph.extensions.Drive;
28-
import com.microsoft.graph.extensions.RecurrenceRangeType;
29-
import com.microsoft.graph.generated.BaseRecurrenceRange;
3028
import com.microsoft.graph.logger.DefaultLogger;
31-
import com.microsoft.graph.model.DateOnly;
29+
30+
//import com.microsoft.graph.extensions.RecurrenceRangeType;
31+
//import com.microsoft.graph.generated.BaseRecurrenceRange;
3232

3333
/**
3434
* Test cases for the {@see DefaultSerializer}
@@ -42,7 +42,7 @@ public class DefaultSerializerTests extends AndroidTestCase {
4242
*/
4343
public void testDriveDeserialization() throws Exception {
4444
final DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger());
45-
String source = "{\"@odata.context\":\"https://graph.microsoft.com/v1.0/$metadata#drives/$entity\",\"id\":\"8bf6ae90006c4a4c\",\"driveType\":\"personal\",\"owner\":{\"user\":{\"displayName\":\"Peter\",\"id\":\"8bf6ae90006c4a4c\"}},\"quota\":{\"deleted\":1485718314,\"remaining\":983887466461,\"state\":\"normal\",\"total\":1142461300736,\"used\":158573834275}}";
45+
String source = "{\"@odata.context\":\"https://graph.microsoft.com/beta/$metadata#drives/$entity\",\"id\":\"8bf6ae90006c4a4c\",\"driveType\":\"personal\",\"owner\":{\"user\":{\"displayName\":\"Peter\",\"id\":\"8bf6ae90006c4a4c\"}},\"quota\":{\"deleted\":1485718314,\"remaining\":983887466461,\"state\":\"normal\",\"total\":1142461300736,\"used\":158573834275}}";
4646
Drive result = serializer.deserializeObject(source, Drive.class);
4747
assertNotNull(result);
4848
assertEquals("personal", result.driveType);
@@ -52,34 +52,34 @@ public void testDriveDeserialization() throws Exception {
5252
}
5353

5454
public void testRecurrenceRangeDeserialization() throws Exception {
55-
final DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger());
56-
String source = "{\n" +
57-
" \"type\": \"noEnd\",\n" +
58-
" \"startDate\": \"2016-04-27\",\n" +
59-
" \"endDate\": \"0001-01-01\",\n" +
60-
" \"recurrenceTimeZone\": \"China Standard Time\",\n" +
61-
" \"numberOfOccurrences\": 0\n" +
62-
"}";
63-
BaseRecurrenceRange baseRecurrenceRange = serializer.deserializeObject(source, BaseRecurrenceRange.class);
64-
assertNotNull(source);
65-
assertEquals(baseRecurrenceRange.type, RecurrenceRangeType.noEnd);
66-
assertEquals("2016-04-27", baseRecurrenceRange.startDate.toString());
67-
assertEquals("0001-01-01", baseRecurrenceRange.endDate.toString());
68-
assertEquals("China Standard Time", baseRecurrenceRange.recurrenceTimeZone);
69-
assertEquals(Integer.valueOf(0), baseRecurrenceRange.numberOfOccurrences);
55+
// final DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger());
56+
// String source = "{\n" +
57+
// " \"type\": \"noEnd\",\n" +
58+
// " \"startDate\": \"2016-04-27\",\n" +
59+
// " \"endDate\": \"0001-01-01\",\n" +
60+
// " \"recurrenceTimeZone\": \"China Standard Time\",\n" +
61+
// " \"numberOfOccurrences\": 0\n" +
62+
// "}";
63+
// BaseRecurrenceRange baseRecurrenceRange = serializer.deserializeObject(source, BaseRecurrenceRange.class);
64+
// assertNotNull(source);
65+
// assertEquals(baseRecurrenceRange.type, RecurrenceRangeType.noEnd);
66+
// assertEquals("2016-04-27", baseRecurrenceRange.startDate.toString());
67+
// assertEquals("0001-01-01", baseRecurrenceRange.endDate.toString());
68+
// assertEquals("China Standard Time", baseRecurrenceRange.recurrenceTimeZone);
69+
// assertEquals(Integer.valueOf(0), baseRecurrenceRange.numberOfOccurrences);
7070
}
7171

7272
public void testRecurrenceRangeSerialization() throws Exception {
73-
final String expected = "{\"endDate\":\"2016-05-25\",\"numberOfOccurrences\":4,\"@odata.type\":\"microsoft.graph.recurrenceRange\",\"recurrenceTimeZone\":\"PST\",\"startDate\":\"2016-04-25\",\"type\":\"endDate\"}";
74-
final DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger());
75-
BaseRecurrenceRange brr = new BaseRecurrenceRange();
76-
brr.type = RecurrenceRangeType.endDate;
77-
brr.startDate = new DateOnly(2016, 4, 25);
78-
brr.endDate = new DateOnly(2016, 5, 25);
79-
brr.recurrenceTimeZone = "PST";
80-
brr.numberOfOccurrences = 4;
81-
String jsonOut = serializer.serializeObject(brr);
82-
assertNotNull(jsonOut);
83-
assertEquals(jsonOut, expected);
73+
// final String expected = "{\"endDate\":\"2016-05-25\",\"numberOfOccurrences\":4,\"@odata.type\":\"microsoft.graph.recurrenceRange\",\"recurrenceTimeZone\":\"PST\",\"startDate\":\"2016-04-25\",\"type\":\"endDate\"}";
74+
// final DefaultSerializer serializer = new DefaultSerializer(new DefaultLogger());
75+
// BaseRecurrenceRange brr = new BaseRecurrenceRange();
76+
// brr.type = RecurrenceRangeType.endDate;
77+
// brr.startDate = new DateOnly(2016, 4, 25);
78+
// brr.endDate = new DateOnly(2016, 5, 25);
79+
// brr.recurrenceTimeZone = "PST";
80+
// brr.numberOfOccurrences = 4;
81+
// String jsonOut = serializer.serializeObject(brr);
82+
// assertNotNull(jsonOut);
83+
// assertEquals(jsonOut, expected);
8484
}
8585
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.extensions;
6+
7+
import com.microsoft.graph.concurrency.*;
8+
import com.microsoft.graph.core.*;
9+
import com.microsoft.graph.extensions.*;
10+
import com.microsoft.graph.http.*;
11+
import com.microsoft.graph.generated.*;
12+
import com.microsoft.graph.options.*;
13+
import com.microsoft.graph.serializer.*;
14+
15+
import java.util.Arrays;
16+
import java.util.List;
17+
18+
/**
19+
* The Enum Activity Domain.
20+
*/
21+
public enum ActivityDomain
22+
{
23+
/**
24+
* unknown
25+
*/
26+
unknown,
27+
/**
28+
* work
29+
*/
30+
work,
31+
/**
32+
* personal
33+
*/
34+
personal,
35+
/**
36+
* For ActivityDomain values that were not expected from the service
37+
*/
38+
unexpectedValue
39+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.extensions;
6+
7+
import com.microsoft.graph.concurrency.*;
8+
import com.microsoft.graph.core.*;
9+
import com.microsoft.graph.extensions.*;
10+
import com.microsoft.graph.http.*;
11+
import com.microsoft.graph.generated.*;
12+
import com.microsoft.graph.options.*;
13+
import com.microsoft.graph.serializer.*;
14+
15+
import java.util.Arrays;
16+
import java.util.List;
17+
18+
// This file is available for extending, afterwards please submit a pull request.
19+
20+
/**
21+
* The class for the Add In.
22+
*/
23+
public class AddIn extends BaseAddIn {
24+
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.extensions;
6+
7+
import com.microsoft.graph.concurrency.*;
8+
import com.microsoft.graph.core.*;
9+
import com.microsoft.graph.extensions.*;
10+
import com.microsoft.graph.http.*;
11+
import com.microsoft.graph.generated.*;
12+
import com.microsoft.graph.options.*;
13+
import com.microsoft.graph.serializer.*;
14+
15+
import java.util.Arrays;
16+
import java.util.List;
17+
18+
// This file is available for extending, afterwards please submit a pull request.
19+
20+
/**
21+
* The class for the Anonymous Ip Risk Event.
22+
*/
23+
public class AnonymousIpRiskEvent extends BaseAnonymousIpRiskEvent {
24+
25+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// ------------------------------------------------------------------------------
2+
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
3+
// ------------------------------------------------------------------------------
4+
5+
package com.microsoft.graph.extensions;
6+
7+
import com.microsoft.graph.concurrency.*;
8+
import com.microsoft.graph.core.*;
9+
import com.microsoft.graph.extensions.*;
10+
import com.microsoft.graph.http.*;
11+
import com.microsoft.graph.generated.*;
12+
import com.microsoft.graph.options.*;
13+
import com.microsoft.graph.serializer.*;
14+
15+
import java.util.Arrays;
16+
import java.util.List;
17+
18+
// This file is available for extending, afterwards please submit a pull request.
19+
20+
/**
21+
* The class for the Anonymous Ip Risk Event Collection Page.
22+
*/
23+
public class AnonymousIpRiskEventCollectionPage extends BaseAnonymousIpRiskEventCollectionPage implements IAnonymousIpRiskEventCollectionPage {
24+
25+
/**
26+
* A collection page for AnonymousIpRiskEvent.
27+
*
28+
* @param response The serialized BaseAnonymousIpRiskEventCollectionResponse from the service
29+
* @param builder The request builder for the next collection page
30+
*/
31+
public AnonymousIpRiskEventCollectionPage(final BaseAnonymousIpRiskEventCollectionResponse response, final IAnonymousIpRiskEventCollectionRequestBuilder builder) {
32+
super(response, builder);
33+
}
34+
}

0 commit comments

Comments
 (0)