Skip to content

Commit 187f7c7

Browse files
author
Caitlin Bales (MSFT)
committed
Merge branch 'master' into planner-helpers
2 parents 3625c22 + 884c295 commit 187f7c7

File tree

3,657 files changed

+4617
-5811
lines changed

Some content is hidden

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

3,657 files changed

+4617
-5811
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- Read me before you submit this issue
2+
3+
First off, thank you for taking the time to open this issue! We do appreciate it. Please bear with us if we don't get to this right away.
4+
5+
If this is a question about the Microsoft Graph service API, or a question about how to use this SDK, please post your question to StackOverflow with the [microsoftgraph] tag.
6+
https://stackoverflow.com/questions/tagged/microsoft-graph
7+
8+
This repo is for the Microsoft Graph Java SDK. Issues opened in this repo should only target this SDK.
9+
10+
Before you open this issue, did you:
11+
- Search the issues to determine whether someone already opened this issue?
12+
- Search StackOverflow for an answer?
13+
- Capture the repro steps and gather the information requested in the steps below to reproduce your scenario?
14+
- Review the samples under github.com/microsoftgraph? They can help for some scenarios.
15+
- Take a look at the functional tests in this repo? They may have an example for you. See the [functional tests](https://github.com/microsoftgraph/msgraph-sdk-java/tree/master/src/test/java/com/microsoft/graph/functional)
16+
17+
-->
18+
19+
Please provide the following (and please check them off the list with [x]) before submitting this issue:
20+
- [ ] Expected behavior. Please provide **links to the specific [Microsoft Graph documentation](https://developer.microsoft.com/en-us/graph/docs/concepts/overview)** you used to determine the expected behavior.
21+
- [ ] Actual behavior. Provide error codes, stack information, and a [Fiddler](http://www.telerik.com/fiddler) capture of the request and response (please remove personally identifiable information before posting).
22+
- [ ] Steps to reproduce the behavior. Include your code, IDE versions, client library versions, and any other information that might be helpful to understand your scenario.
23+
24+
### Expected behavior
25+
26+
27+
28+
29+
### Actual behavior
30+
31+
32+
33+
34+
### Steps to reproduce the behavior
35+
36+
37+
38+

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Read me before you submit this pull request
2+
3+
First off, thank you for opening this pull request! We do appreciate it.
4+
5+
The requests and models for this client library are generated. We won't be accepting pull requests for those code files. With that said, we do appreciate
6+
it when you open pull requests with the proposed file changes, as we'll use that to help guide us in updating our template files.
7+
8+
-->
9+
10+
<!-- Optional. Set the issues that this pull request fixes. Delete 'Fixes #' if there isn't an issue associated with this pull request. -->
11+
Fixes #
12+
13+
<!-- Required. Provide specifics about what the changes are and why you're proposing these changes. -->
14+
### Changes proposed in this pull request
15+
-
16+
17+
<!-- Optional. Provide related links. This might be other pull requests, code files, StackOverflow posts. Delete this section if it is not used. -->
18+
### Other links
19+
-

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@ hs_err_pid*
2828
.project
2929
.classpath
3030
.settings
31+
32+
# Maven
33+
/target/
34+
/pom.xml

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
language: java
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to the Microsoft Graph SDK for Android
1+
# Contributing to the Microsoft Graph SDK for Java
22

33
The Microsoft Graph SDK is available for all manner of contribution. There are a couple of different recommended paths to get contributions into the released version of this SDK.
44

@@ -10,7 +10,7 @@ The best way to get started with a contribution is to start a dialog with the ow
1010

1111
## Submit pull requests for trivial changes
1212

13-
If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __master__ branch. The master branch will be updated frequently, and the gradle dependency will be kept closely inline with it.
13+
If you are making a change that does not affect the interface components and does not affect other downstream callers, feel free to make a pull request against the __dev__ branch. The dev branch will be updated frequently.
1414

1515
Revisions of this nature will result in a 0.0.X change of the version number.
1616

@@ -19,3 +19,6 @@ Revisions of this nature will result in a 0.0.X change of the version number.
1919
If major functionality is being added, or there will need to be gestation time for a change, it should be submitted against the __feature__ branch.
2020

2121
Revisions of this nature will result in a 0.X.X change of the version number.
22+
23+
## Submit pull requests for model or request files
24+
You can revise code in the extension folders of these folders. See [Extending the Library](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Extending-the-Library) for more information on how to work with the generated parts of the library.

README.md

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ We welcome your feedback as we drive the quality of this to general availability
1212
Integrate the [Microsoft Graph API](https://graph.microsoft.io/en-us/getting-started) into your Java application!
1313

1414
## 1. Installation
15-
### 1.1 Install AAR via Gradle
16-
Add the JCenter repository and a compile dependency for `msicrosoft-graph` to your project's `build.gradle`
15+
### 1.1 Install via Gradle
16+
*This package will not be available via Gradle until it hits public preview. You will need to download the source and reference the package locally.*
17+
18+
Add the JCenter repository and a compile dependency for `microsoft-graph` to your project's `build.gradle`
1719

1820
```gradle
1921
repository {
@@ -22,10 +24,7 @@ repository {
2224
2325
dependency {
2426
// Include the sdk as a dependency
25-
compile('com.microsoft.graph:1.0.+')
26-
27-
// Include the gson dependency
28-
compile('com.google.code.gson:gson:2.3.1')
27+
compile('com.microsoft.graph:msgraph-sdk-java:1.0.+')
2928
}
3029
```
3130

@@ -41,76 +40,75 @@ Register your application by following [these](https://developer.microsoft.com/e
4140
### 2.2 Create an IAuthenticationProvider object
4241

4342
An instance of the **GraphServiceClient** class handles building requests,
44-
sending them to Microsoft Graph API, and processing the responses. To create a
43+
sending them to the Microsoft Graph API, and processing the responses. To create a
4544
new instance of this class, you need to provide an instance of
4645
`IAuthenticationProvider` which can authenticate requests to Microsoft Graph.
4746

4847
For an example of authentication in a client application see the [MSGraph SDK Android MSA Auth for Android Adapter](https://github.com/microsoftgraph/msgraph-sdk-android-msa-auth-for-android-adapter).
4948

5049
### 2.3 Get a GraphServiceClient object
5150

51+
TODO: the para below needs expansion or removal. Would need to mention the different flows (authorization code flow, implicit flow, client credential flow) and give pointers on where to get sample code. Dave Moten can provide link for client credentials flow.
52+
5253
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.
5354

5455
```java
55-
final IClientConfig mCLientConfig = DefaultClientConfig
56-
.createWithAuthenticationProvider(mAuthenticationProvider);
56+
IClientConfig clientConfig =
57+
DefaultClientConfig.createWithAuthenticationProvider(mAuthenticationProvider);
5758

58-
final IGraphServiceClient mClient = new GraphServiceClient
59-
.Builder()
60-
.fromConfig(mClientConfig)
61-
.buildClient();
59+
IGraphServiceClient graphClient =
60+
GraphServiceClient.builder()
61+
.fromConfig(mClientConfig)
62+
.buildClient();
6263
```
6364

6465
## 3. Make requests against the service
6566

66-
Once you have an GraphServiceClient that is authenticated you can begin making calls against the service. The requests against the service look like our [REST API](https://developer.microsoft.com/en-us/graph/docs/concepts/overview).
67+
Once you have a GraphServiceClient that is authenticated you can begin making calls against the service. The requests against the service look like our [REST API](https://developer.microsoft.com/en-us/graph/docs/concepts/overview).
6768

68-
### Get the drive
69+
### Get the user's drive
6970

70-
To retrieve a user's drive:
71+
To retrieve the user's drive:
7172

7273
```java
7374
graphClient
74-
.me()
75-
.drive()
76-
.buildRequest()
77-
.get(new ICallback<Drive>() {
78-
@Override
79-
public void success(final Drive result) {
80-
final String msg = "Found Drive " + result.id;
81-
Toast.makeText(getActivity(), msg, Toast.LENGTH_SHORT)
82-
.show();
83-
}
84-
...
85-
// Handle failure case
86-
});
75+
.me()
76+
.drive()
77+
.buildRequest()
78+
.get(new ICallback<Drive>() {
79+
@Override
80+
public void success(final Drive result) {
81+
System.out.println("Found Drive " + result.id);
82+
}
83+
...
84+
// Handle failure case
85+
});
8786
```
8887

89-
For a general overview of how the SDK is designed, see [overview](docs/overview.md).
88+
For a general overview of how the SDK is designed, see [overview](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Overview).
9089

9190
## 4. Documentation
9291

9392
For a more detailed documentation see:
9493

95-
* [Overview](docs/overview.md)
96-
* [Extensibility](docs/extensibility.md)
97-
* [Handling Open Types, PATCH support with `null` values](docs/opentypes.md)
98-
* [Collections](docs/collections.md)
99-
* [Errors](docs/errors.md)
100-
* [Making Custom Requests](docs/custom-queries.md)
101-
* [Known Issues](docs/known-issues.md)
102-
* [Contributions](docs/contributions.md)
94+
* [Overview](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Overview)
95+
* [Extending the library](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Extending-the-Library)
96+
* [Handling Open Types, PATCH support with `null` values](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Working-with-Open-Types)
97+
* [Collections](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Working-with-Collections)
98+
* [Making Custom Requests](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Custom-Requests)
99+
* [Known Issues](https://github.com/microsoftgraph/msgraph-sdk-java/wiki/Known-Issues)
100+
* [Contributions](https://github.com/microsoftgraph/msgraph-sdk-java/blob/master/CONTRIBUTING.md)
103101

104102
## 5. Issues
105103

106104
For known issues, see [issues](https://github.com/MicrosoftGraph/msgraph-sdk-java/issues).
107105

108106
## 6. Contributions
109107

110-
The Microsoft Graph SDK is open for contribution. Please read how to contribute to this project [here](docs/contributions.md).
108+
The Microsoft Graph SDK is open for contribution. Please read how to contribute to this project [here](https://github.com/microsoftgraph/msgraph-sdk-java/blob/master/CONTRIBUTING.md).
111109

112110
## 7. Supported Java Versions
113-
The Microsoft Graph SDK for Java library is supported at runtime for Java 6+ and [Android API revision 15](http://source.android.com/source/build-numbers.html) and greater.
111+
The Microsoft Graph SDK for Java library is supported at runtime for Java 7+ and [Android API revision 15](http://source.android.com/source/build-numbers.html) and greater.
114112

115113
## 8. License
116114

build.gradle

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
apply plugin: 'java-library'
1111
apply plugin: 'java'
1212
apply plugin: 'eclipse'
13+
apply plugin: 'maven-publish'
14+
1315
// In this section you declare where to find the dependencies of your project
1416
repositories {
1517
// Use jcenter for resolving your dependencies.
@@ -27,11 +29,27 @@ dependencies {
2729
// Use JUnit test framework
2830
testImplementation 'junit:junit:4.12'
2931

30-
compile 'com.google.code.gson:gson:2.2.4'
31-
compile 'org.json:json:20141113'
32-
compile group: 'javax.ws.rs', name: 'javax.ws.rs-api', version: '2.0-m02'
32+
compile 'com.google.code.gson:gson:2.8.2'
3333

34-
// https://mvnrepository.com/artifact/com.sun.jersey/jersey-server
35-
compile group: 'com.sun.jersey', name: 'jersey-server', version: '1.19.4'
34+
compile 'com.sun.jersey:jersey-server:1.19.4'
35+
}
36+
37+
publishing {
38+
publications {
39+
maven(MavenPublication) {
40+
groupId 'com.microsoft.graph'
41+
artifactId 'msgraph-sdk-java'
42+
version '0.1-SNAPSHOT'
43+
44+
from components.java
45+
46+
artifact sourceJar
47+
}
48+
}
49+
}
50+
51+
task sourceJar(type: Jar) {
52+
classifier = 'sources'
53+
from sourceSets.main.allJava
3654
}
3755

docs/Generator.png

24.4 KB
Loading

0 commit comments

Comments
 (0)