9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/raw-en/create_page_with_note_tags.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | A page created with note tags
4 |
5 |
6 |
7 |
Paragraphs with predefined note tags
8 |
Paragraph with note tag to-do (data-tag="to-do")
9 |
Paragraph with note tag important (data-tag="important")
10 |
Paragraph with note tag question (data-tag="question")
11 |
Paragraph with note tag definition (data-tag="definition")
12 |
Paragraph with note tag highlight (data-tag="contact")
13 |
Paragraph with note tag contact (data-tag="contact")
14 |
Paragraph with note tag address (data-tag="address")
15 |
Paragraph with note tag phone-number (data-tag="phone-number")
16 |
Paragraph with note tag web-site-to-visit (data-tag="web-site-to-visit")
17 |
Paragraph with note tag idea (data-tag="idea")
18 |
Paragraph with note tag password (data-tag="password")
19 |
Paragraph with note tag critical (data-tag="critical")
20 |
Paragraph with note tag project-a (data-tag="project-a")
21 |
Paragraph with note tag project-b (data-tag="project-b")
22 |
Paragraph with note tag remember-for-later (data-tag="remember-for-later")
23 |
Paragraph with note tag movie-to-see (data-tag="movie-to-see")
24 |
Paragraph with note tag book-to-read (data-tag="book-to-read")
25 |
Paragraph with note tag music-to-listen-to (data-tag="music-to-listen-to")
26 |
Paragraph with note tag source-for-article (data-tag="source-for-article")
27 |
Paragraph with note tag remember-for-blog (data-tag="remember-for-blog")
28 |
Paragraph with note tag discuss-with-person-a (data-tag="discuss-with-person-a")
29 |
Paragraph with note tag discuss-with-person-b (data-tag="discuss-with-person-a")
30 |
Paragraph with note tag discuss-with-manager (data-tag="discuss-with-manager")
31 |
Paragraph with note tag send-in-email (data-tag="send-in-email")
32 |
Paragraph with note tag schedule-meeting (data-tag="schedule-meeting")
33 |
Paragraph with note tag call-back (data-tag="call-back")
34 |
Paragraph with note tag to-do-priority-1 (data-tag="to-do-priority-1")
35 |
Paragraph with note tag to-do-priority-2 (data-tag="to-do-priority-2")
36 |
Paragraph with note tag client-request (data-tag="client-request")
37 |
38 |
Paragraphs with note tag status
39 |
Paragraph with note tag status completed
40 |
Paragraph with note tag status completed
41 |
42 |
Paragraph with multiple note tags
43 |
Paragraph with two note tags
44 |
Multiple note tags
45 |
List Item with a note tag
46 |
Build a todo app with OneNote APIs
47 |
Image with note tag
48 |
49 |
50 |
--------------------------------------------------------------------------------
/app/src/main/res/raw-en/create_page_with_pdf.html:
--------------------------------------------------------------------------------
1 |
2 | A page created with a file attachment
3 |
4 |
5 |
6 |
This is a page with a PDF file attachment
7 |
8 |
9 | "
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/raw-en/create_page_with_product_info.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | A page with auto-extracted product info from a URL
4 |
5 |
6 |
7 |
This is a page with extracted product info from a URL: http://www.amazon.com/Xbox-One/dp/B00KAI3KW2
8 |
9 |
This is a screenshot of the original URL from which the recipe was extracted:
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/raw-en/create_page_with_recipe.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | A page with auto-extracted recipe from a URL
4 |
5 |
6 |
7 |
This is a page with an extracted recipe from a URL: http://allrecipes.com/Recipe/Homemade-Mac-and-Cheese
8 |
9 |
This is a screenshot of the original URL from which the product was extracted:
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/raw-en/create_page_with_url_snapshot.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | A page created with an image from a URL on it
4 |
5 |
6 |
This is a page with an image of an HTML page rendered from a URL on it.
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/raw-en/create_page_with_web_snap.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | A page created with an image of an HTML page on it
4 |
5 |
6 |
7 |
This is a page with an image of an HTML page on it.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vehicula magna quis mauris accumsan,
8 | nec imperdiet nisi tempus. Suspendisse potenti. Duis vel nulla sit amet turpis venenatis elementum.
9 | Cras laoreet quis nisi et sagittis. Donec euismod at tortor ut porta. Duis libero urna, viverra id
10 | aliquam in, ornare sed orci. Pellentesque condimentum gravida felis, sed pulvinar erat suscipit sit
11 | amet. Nulla id felis quis sem blandit dapibus. Ut viverra auctor nisi ac egestas. Quisque ac neque
12 | nec velit fringilla sagittis porttitor sit amet quam.
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/raw-en/simple_page.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | A simple page created from basic HTML-formatted text
4 |
5 |
6 |
This is a page that contains some simple formattedtext.
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FF67217B
4 | #FF481756
5 | #8800FF00
6 | #88FFFF00
7 | #88FF0000
8 | #00FFFFFF
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/notebook_snippets.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /notebooks
5 |
6 |
7 | GET: Get list of all notebooks
8 | Queries for all notebooks in OneNote and returns a list
9 | http://dev.onenote.com/docs#/reference/get-notebooks
10 | beta
11 | v1.0
12 |
13 |
14 |
15 | GET: Get notebooks and sections using $expand
16 | This is one example to demonstrate how the $expand query parameter can be used to return all notebooks and their descendant sections, sectionGroups in one roundtrip. In this case we are going to make a GET request on ~/notebooks?$expand=sections,sectionGroups($expand=sections)
17 | http://dev.onenote.com/docs#/reference/get-notebooks
18 | beta
19 | v1.0
20 |
21 |
22 |
23 | GET: Get a specific notebook by id
24 | Choose a notebook from the list above. We\'ll use the id of the notebook you select for the query.
25 | http://dev.onenote.com/docs#/reference/get-notebooks
26 | beta
27 | v1.0
28 |
29 |
30 |
31 | GET: Get metadata of a specific notebook
32 | Following the previous example, first we get a list of all notebooks and then query the metadata for one of the selected notebooks. Please select a specific notebook from the drop-down above
33 | http://dev.onenote.com/docs#/reference/get-notebooks
34 | beta
35 | v1.0
36 |
37 |
38 |
39 | GET: Get notebooks with a specific name
40 | Query for a list of all notebooks with a given name. This example shows how to use the \'$filter=name eq \'<term>\' query parameter. Please enter the case-sensitive full notebook name to look for in the TextBox above
41 | http://dev.onenote.com/docs#/reference/get-notebooks
42 | beta
43 | v1.0
44 |
45 |
46 |
47 | GET: Get sorted list of notebooks with selected metadata
48 | Get a sorted list of notebooks using the $orderBy=name asc query parameter and only specific metadata in the response using the $select=id,name query parameter. $orderBy can be used to specify your custom sort order
49 | http://dev.onenote.com/docs#/reference/get-notebooks
50 | beta
51 | v1.0
52 |
53 |
54 |
55 | GET: Get notebooks shared by others
56 | Query for a list of all notebooks where the current user is not an Owner (i.e. the notebooks are owned by someone else and were shared with the current user with either a Reader or Contributor access level). This example shows how to use the \'$filter=userRole ne Microsoft.OneNote.Api.UserRole\'Owner\'\' query parameter and will return non-zero results only if the current user has access to shared notebooks
57 | http://dev.onenote.com/docs#/reference/get-notebooks
58 | beta
59 | v1.0
60 |
61 |
62 |
63 | POST: Create a new notebook
64 | Create a new empty notebook. Please enter the new notebook\'s name in the TextBox above
65 | http://dev.onenote.com/docs#/reference/get-notebooks
66 | beta
67 | v1.0
68 |
69 |
70 |
71 |
--------------------------------------------------------------------------------
/app/src/main/res/values/pages_snippets.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /pages
5 |
6 |
7 | POST: Create a simple page using HTML
8 | Create a simple page using HTML to describe the page content (under default section)
9 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
10 | beta
11 | v1.0
12 |
13 |
14 |
15 | POST: Create a page with an image
16 | Create a page with some formatted text and an image
17 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
18 | beta
19 | v1.0
20 |
21 |
22 |
23 | POST: Create a page with a snapshot of an embedded web page
24 | Create a page with a snapshot of the HTML of a web page on it
25 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
26 | beta
27 | v1.0
28 |
29 |
30 |
31 | POST: Create a page with a snapshot of a URL
32 | Create a page with a snapshot of the OneNote.com homepage on it.
33 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
34 | beta
35 | v1.0
36 |
37 |
38 |
39 | GET: Get metadata of a specific page
40 | Following the previous example, first we get a paginated list of all pages and then query for the selected page. Please select a specific page from the drop-down above
41 | http://dev.onenote.com/docs#/reference/get-pages
42 | beta
43 | v1.0
44 |
45 |
46 |
47 | GET: Get pages with a specific title
48 | Query for a paginated list of pages that contain a given title substring. This example shows how to use the $filter=contains(title, \'<term>\') query parameter. Please enter a case-sensitive title substring in the TextBox above.
49 | http://dev.onenote.com/docs#/reference/get-pages
50 | beta
51 | v1.0
52 |
53 |
54 |
55 | GET: Get a sorted list of pages with selected metadata
56 | Get a sorted list of pages using the $orderBy=title asc query parameter and only specific metadata in the response using the $select=id,title query parameter. $orderBy can be used to specify your custom sort order
57 | http://dev.onenote.com/docs#/reference/get-pages
58 | beta
59 | v1.0
60 |
61 |
62 |
63 | DELETE: Delete a page
64 | Delete an existing page
65 | http://dev.onenote.com/docs#/reference/delete-pages
66 | beta
67 | v1.0
68 |
69 |
70 |
71 | PATCH: Append to the end of the default outline in the page
72 | Add new trailing content to the default outline in an existing page
73 | http://dev.onenote.com/docs#/reference/patch-pages
74 | beta
75 | v1.0
76 |
77 |
78 |
79 | GET: Get a list of all pages under a specific section
80 | Queries for all the pages that belong to a specific section
81 | http://dev.onenote.com/docs#/reference/get-pages
82 | beta
83 | v1.0
84 |
85 |
86 |
87 | POST: Create a page with a PDF attachment rendered
88 | Create a page with a PDF file attachment rendered
89 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
90 | beta
91 | v1.0
92 |
93 |
94 |
95 | POST: Create a page with note tags
96 | Create a page with examples of note tags. For example build a to do list
97 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
98 | beta
99 | v1.0
100 |
101 |
102 |
103 | POST: Create a page with a business card
104 | Create a page with a business card info automatically extracted from an image
105 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
106 | beta
107 | v1.0
108 |
109 |
110 |
111 | POST: Create a page with a recipe
112 | Create a page with a cooking recipe automatically extracted from an example webpage
113 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
114 | beta
115 | v1.0
116 |
117 |
118 |
119 | POST: Create a page with product info
120 | Create a page with a product info automatically extracted from an example amazon.com webpage
121 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
122 | beta
123 | v1.0
124 |
125 |
126 |
127 | POST: Create a page under a named section
128 | Create a page under a given section name using the \'sectionName\' query parameter. Please choose a section in the list above. Note: If a specified section doesn\'t exist, the API creates it.
129 | http://dev.onenote.com/docs#/reference/post-pages/v10pages
130 | beta
131 | v1.0
132 |
133 |
134 |
135 | GET: Get a list of all pages
136 | Queries for all pages in OneNote and returns a paginated list. By default, paging returns the first 20 pages ordered by last modified time descending (default sort order). The @odata.nextLink in the Response or $skip and $top query parameters can be used to retrieve the next set of pages
137 | http://dev.onenote.com/docs#/reference/get-pages
138 | beta
139 | v1.0
140 |
141 |
142 |
143 | GET: Get pages using query with $skip and $top params
144 | Since the list of pages returned is paginated, this example shows how to use the $skip=20&$top=3 query parameters to get up to 3 additional pages after the first 20 pages
145 | http://dev.onenote.com/docs#/reference/get-pages/v10pagesfilterorderbyselecttopskipsearch
146 | beta
147 | v1.0
148 |
149 |
150 |
151 | GET: Search all pages
152 | Search all pages and return the paginated list of matching pages that contain the given search term (case-insensitive search)
153 | http://dev.onenote.com/docs#/reference/get-pages
154 | beta
155 | v1.0
156 |
157 |
158 |
159 | GET: Recall a page\'s content as HTML
160 | First we get a paginated list of all pages and then return back the content of one of the selected pages as HTML
161 | http://dev.onenote.com/docs#/reference/get-pages/v10menotespagesidcontentincludeids
162 | beta
163 | v1.0
164 |
165 |
166 |
167 |
--------------------------------------------------------------------------------
/app/src/main/res/values/section_snippets.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /sections
5 |
6 |
7 | GET: Get list of all sections under a specific notebook
8 | First we get a list of all notebooks and then query for a list of all sections under the selected notebook. Please select a specific notebook from the drop-down above
9 | http://dev.onenote.com/docs#/reference/get-sections
10 | beta
11 | v1.0
12 |
13 |
14 |
15 | GET: Get sections with a specific name
16 | Query for a list of all sections with a given name. This example shows how to use the \'$filter=name eq \'<term>\' query parameter. Please enter the case-sensitive full section name to look for in the TextBox above
17 | http://dev.onenote.com/docs#/reference/get-sections
18 | beta
19 | v1.0
20 |
21 |
22 | GET: Get list of all sections
23 | Queries for all sections under all notebooks in OneNote and returns a list
24 | http://dev.onenote.com/docs#/reference/get-sections
25 | beta
26 | v1.0
27 |
28 |
29 |
30 | GET: Get metadata of a specific section
31 | Following the previous example, first we get a list of all sections and then query for the selected section. Please select a specific section from the drop-down above
32 | http://dev.onenote.com/docs#/reference/get-sections
33 | beta
34 | v1.0
35 |
36 |
37 |
38 | POST: Create a section in a notebook
39 | First we get a list of all notebooks and then create an empty section in the selected notebook. Please select a notebook from the drop-down above and enter the new section\'s name in the text box.
40 | http://dev.onenote.com/docs#/reference/post-sections/v10menotesnotebooksidsections
41 | beta
42 | v1.0
43 |
44 |
45 |
46 | POST: Create a section in a section group
47 | First we get a list of all section groups and then create an empty section group in the selected section group. Please select a section group from the drop-down above and enter the new section group\'s name in the text box.
48 | http://dev.onenote.com/docs#/reference/post-sections/betamenotessectiongroupsidsections
49 | beta
50 | beta
51 |
52 |
53 |
--------------------------------------------------------------------------------
/app/src/main/res/values/sectiongroups_snippets.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | /sectiongroups
5 |
6 |
7 | GET: Get list of all SectionGroups
8 | Queries for all sectionGroups under all notebooks in OneNote and returns a list. SectionGroups are not very common, so you may see 0 results
9 | http://dev.onenote.com/docs#/reference/get-sectiongroups
10 | beta
11 | v1.0
12 |
13 |
14 | GET: Get list of all SectionGroups in a notebook
15 | Queries for all sectionGroups under a notebook in OneNote and returns a list. SectionGroups are not very common, so you may see 0 results
16 | http://dev.onenote.com/docs#/reference/get-sectiongroups
17 | beta
18 | v1.0
19 |
20 |
21 | POST: Create a SectionGroup in a notebook
22 | First we get a list of all notebooks and then create an empty SectionGroup in the selected notebook. Please select a notebook from the drop-down above and enter the new SectionGroup\'s name in the text box.
23 | http://dev.onenote.com/docs#/reference/post-sectiongroups/betamenotesnotebooksidsectiongroups
24 | beta
25 | beta
26 |
27 |
28 | POST: Create a SectionGroup in a SectionGroup
29 | First we get a list of all section groups and then create an empty section group in the selected section group. Please select a section group from the drop-down above and enter the new SectionGroup\'s name in the text box.
30 | http://dev.onenote.com/docs#/reference/post-sectiongroups/betamenotessectiongroupsidsectiongroups
31 | beta
32 | beta
33 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | OneNote REST API Explorer
3 | Snippet Detail
4 | BETA
5 | Run
6 | Request URL
7 | Request Headers
8 | Request Body
9 | Response
10 | Response Headers
11 | Response Body
12 | Documentation
13 | HTTP Status Code
14 | Sign in with the account you use for OneDrive, Xbox Live, Outlook.com, or other Microsoft services
15 | Sign in with the account provided by your work or school to use with Office 365 or other Microsoft services
16 | Organizational Account
17 | Microsoft Account
18 | Open in OneNote
19 | Open in browser
20 | Quick Links
21 | Dismiss
22 | copied to clipboard
23 | Failed to acquire api token
24 | Office 365 has either failed to refresh the access token or is unavailable. To view the extended stacktrace, click \'Dismiss\' then view the Response Body section
25 | Disconnect
26 | Single sign-in behavior. With single sign-in, users who are already signed in to Live Connect are also signed in to your website.
27 | The ability of an app to read and update a user\'s info at any time. Without this scope, an app can access the user\'s info only while the user is signed in to Live Connect and is using your app.
28 | Permission to view a list of the user’s OneNote notebooks and create new pages, but not to view or edit existing pages. Gives an app the ability to enumerate the user’s notebook hierarchy and create pages in any location.
29 | Permission to create, view, and modify any content in the user’s OneNote notebooks and pages.
30 | Permission to view OneNote notebooks and pages but not to modify them.
31 | unavailable
32 | Error preparing snippet
33 | This snippet requires a notebook, section, group, or page before it will run. For example if you are deleting a page, you must first have a page to delete. Check that the appropriate item exists before running this snippet.
34 | <Your text here>
35 | The client ID or redirect URI is not valid. Enter a valid client ID and redirect URI in the ServiceConstants.java file and run again
36 | An error signing in has occurred. Check LogCat for details.
37 |
38 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
15 |
16 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | jcenter()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/onenoteapi/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/onenoteapi/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | minSdkVersion 15
9 | targetSdkVersion 22
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | lintOptions {
20 | // Normally this would throw an error
21 | // https://github.com/square/okio/issues/58
22 | warning 'InvalidPackage'
23 | }
24 | }
25 |
26 | dependencies {
27 | // Retrofit + custom HTTP
28 | compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
29 | compile 'com.squareup.okhttp:okhttp:2.0.0'
30 | compile 'com.squareup.retrofit:retrofit:1.9.0'
31 | // VOs
32 | compile(project(':onenotevos'))
33 | }
34 |
--------------------------------------------------------------------------------
/onenoteapi/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/brianmel/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/onenoteapi/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeDeserializer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenoteapi.service;
5 |
6 | import com.google.gson.JsonDeserializationContext;
7 | import com.google.gson.JsonDeserializer;
8 | import com.google.gson.JsonElement;
9 | import com.google.gson.JsonParseException;
10 |
11 | import org.joda.time.DateTime;
12 |
13 | import java.lang.reflect.Type;
14 |
15 | public class DateTimeDeserializer implements JsonDeserializer {
16 | public DateTime deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
17 | throws JsonParseException {
18 | return new DateTime(json.getAsJsonPrimitive().getAsString());
19 | }
20 | }
21 |
22 | // *********************************************************
23 | //
24 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
25 | //
26 | // Copyright (c) Microsoft Corporation
27 | // All rights reserved.
28 | //
29 | // MIT License:
30 | // Permission is hereby granted, free of charge, to any person obtaining
31 | // a copy of this software and associated documentation files (the
32 | // "Software"), to deal in the Software without restriction, including
33 | // without limitation the rights to use, copy, modify, merge, publish,
34 | // distribute, sublicense, and/or sell copies of the Software, and to
35 | // permit persons to whom the Software is furnished to do so, subject to
36 | // the following conditions:
37 | //
38 | // The above copyright notice and this permission notice shall be
39 | // included in all copies or substantial portions of the Software.
40 | //
41 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
42 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
43 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
44 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
45 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
46 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
47 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
48 | //
49 | // *********************************************************
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/DateTimeSerializer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenoteapi.service;
5 |
6 | import com.google.gson.JsonElement;
7 | import com.google.gson.JsonPrimitive;
8 | import com.google.gson.JsonSerializationContext;
9 | import com.google.gson.JsonSerializer;
10 |
11 | import org.joda.time.DateTime;
12 |
13 | import java.lang.reflect.Type;
14 |
15 | public class DateTimeSerializer implements JsonSerializer {
16 | public JsonElement serialize(DateTime src, Type typeOfSrc, JsonSerializationContext context) {
17 | return new JsonPrimitive(src.toString());
18 | }
19 | }
20 |
21 | // *********************************************************
22 | //
23 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
24 | //
25 | // Copyright (c) Microsoft Corporation
26 | // All rights reserved.
27 | //
28 | // MIT License:
29 | // Permission is hereby granted, free of charge, to any person obtaining
30 | // a copy of this software and associated documentation files (the
31 | // "Software"), to deal in the Software without restriction, including
32 | // without limitation the rights to use, copy, modify, merge, publish,
33 | // distribute, sublicense, and/or sell copies of the Software, and to
34 | // permit persons to whom the Software is furnished to do so, subject to
35 | // the following conditions:
36 | //
37 | // The above copyright notice and this permission notice shall be
38 | // included in all copies or substantial portions of the Software.
39 | //
40 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
42 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
44 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
45 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
46 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
47 | //
48 | // *********************************************************
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/GsonDateTime.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenoteapi.service;
5 |
6 | import com.google.gson.GsonBuilder;
7 |
8 | import org.joda.time.DateTime;
9 |
10 | public class GsonDateTime {
11 |
12 | public static GsonBuilder getOneNoteBuilder() {
13 | GsonBuilder gsonBuilder = new GsonBuilder();
14 | gsonBuilder.registerTypeAdapter(DateTime.class, new DateTimeSerializer());
15 | gsonBuilder.registerTypeAdapter(DateTime.class, new DateTimeDeserializer());
16 | return gsonBuilder;
17 | }
18 |
19 | }
20 | // *********************************************************
21 | //
22 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
23 | //
24 | // Copyright (c) Microsoft Corporation
25 | // All rights reserved.
26 | //
27 | // MIT License:
28 | // Permission is hereby granted, free of charge, to any person obtaining
29 | // a copy of this software and associated documentation files (the
30 | // "Software"), to deal in the Software without restriction, including
31 | // without limitation the rights to use, copy, modify, merge, publish,
32 | // distribute, sublicense, and/or sell copies of the Software, and to
33 | // permit persons to whom the Software is furnished to do so, subject to
34 | // the following conditions:
35 | //
36 | // The above copyright notice and this permission notice shall be
37 | // included in all copies or substantial portions of the Software.
38 | //
39 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
40 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
43 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
44 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
45 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46 | //
47 | // *********************************************************
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/NotebooksService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 |
5 | package com.microsoft.onenoteapi.service;
6 |
7 | import com.microsoft.onenotevos.Envelope;
8 | import com.microsoft.onenotevos.Notebook;
9 |
10 | import retrofit.Callback;
11 | import retrofit.http.Body;
12 | import retrofit.http.GET;
13 | import retrofit.http.Header;
14 | import retrofit.http.POST;
15 | import retrofit.http.Path;
16 | import retrofit.http.Query;
17 | import retrofit.mime.TypedString;
18 |
19 | public interface NotebooksService {
20 |
21 | /**
22 | * Gets all of the user's notebooks
23 | *
24 | * @param filter
25 | * @param order
26 | * @param select
27 | * @param expand
28 | * @param top
29 | * @param skip
30 | * @param callback
31 | */
32 | @GET("/{version}/me/notes/notebooks")
33 | void getNotebooks(
34 | @Path("version") String version,
35 | @Query("$filter") String filter,
36 | @Query("$orderby") String order,
37 | @Query("$select") String select,
38 | @Query("$expand") String expand,
39 | @Query("$top") Integer top,
40 | @Query("$skip") Integer skip,
41 | Callback> callback
42 | );
43 |
44 | /**
45 | * Gets all of the notebooks owned by other users and shared
46 | * with the signed in user
47 | *
48 | * @param version
49 | * @param filter
50 | * @param order
51 | * @param select
52 | * @param expand
53 | * @param top
54 | * @param skip
55 | * @param callback
56 | */
57 | @GET("/{version}/me/notes/notebooks")
58 | void getSharedNotebooks(
59 | @Path("version") String version,
60 | @Query("$filter") String filter,
61 | @Query("$orderby") String order,
62 | @Query("$select") String select,
63 | @Query("$expand") String expand,
64 | @Query("$top") Integer top,
65 | @Query("$skip") Integer skip,
66 | Callback> callback
67 | );
68 |
69 | /**
70 | * Gets a notebook by notebook id
71 | *
72 | * @param version
73 | * @param id
74 | * @param callback
75 | */
76 | @GET("/{version}/me/notes/notebooks/{id}")
77 | void getNotebookById(
78 | @Path("version") String version,
79 | @Path("id") String id,
80 | @Query("$select") String select,
81 | Callback> callback
82 | );
83 |
84 | /**
85 | * Creates a new notebook under the user's OneDrive for Business notebooks folder
86 | *
87 | * @param version
88 | * @param contentTypeHeader
89 | * @param body
90 | * @param callback
91 | */
92 | @POST("/{version}/me/notes/notebooks")
93 | void postNotebook(
94 | @Path("version") String version,
95 | @Header("Content-type") String contentTypeHeader,
96 | @Body TypedString body,
97 | Callback> callback
98 | );
99 | }
100 | // *********************************************************
101 | //
102 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
103 | //
104 | // Copyright (c) Microsoft Corporation
105 | // All rights reserved.
106 | //
107 | // MIT License:
108 | // Permission is hereby granted, free of charge, to any person obtaining
109 | // a copy of this software and associated documentation files (the
110 | // "Software"), to deal in the Software without restriction, including
111 | // without limitation the rights to use, copy, modify, merge, publish,
112 | // distribute, sublicense, and/or sell copies of the Software, and to
113 | // permit persons to whom the Software is furnished to do so, subject to
114 | // the following conditions:
115 | //
116 | // The above copyright notice and this permission notice shall be
117 | // included in all copies or substantial portions of the Software.
118 | //
119 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
120 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
121 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
122 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
123 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
124 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
125 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
126 | //
127 | // *********************************************************
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/OneNotePartsMap.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenoteapi.service;
5 |
6 | import java.util.HashMap;
7 |
8 | import retrofit.mime.TypedInput;
9 |
10 |
11 | public class OneNotePartsMap extends HashMap {
12 |
13 | private static final String MANDATORY_PART_NAME = "Presentation";
14 |
15 | public OneNotePartsMap(TypedInput initValue) {
16 | put(MANDATORY_PART_NAME, initValue);
17 | }
18 |
19 | }
20 | // *********************************************************
21 | //
22 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
23 | //
24 | // Copyright (c) Microsoft Corporation
25 | // All rights reserved.
26 | //
27 | // MIT License:
28 | // Permission is hereby granted, free of charge, to any person obtaining
29 | // a copy of this software and associated documentation files (the
30 | // "Software"), to deal in the Software without restriction, including
31 | // without limitation the rights to use, copy, modify, merge, publish,
32 | // distribute, sublicense, and/or sell copies of the Software, and to
33 | // permit persons to whom the Software is furnished to do so, subject to
34 | // the following conditions:
35 | //
36 | // The above copyright notice and this permission notice shall be
37 | // included in all copies or substantial portions of the Software.
38 | //
39 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
40 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
43 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
44 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
45 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46 | //
47 | // *********************************************************
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PagesService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 |
5 | package com.microsoft.onenoteapi.service;
6 |
7 | import com.microsoft.onenotevos.Envelope;
8 | import com.microsoft.onenotevos.Page;
9 |
10 | import retrofit.Callback;
11 | import retrofit.client.Response;
12 | import retrofit.http.Body;
13 | import retrofit.http.DELETE;
14 | import retrofit.http.GET;
15 | import retrofit.http.Header;
16 | import retrofit.http.Multipart;
17 | import retrofit.http.PATCH;
18 | import retrofit.http.POST;
19 | import retrofit.http.PartMap;
20 | import retrofit.http.Path;
21 | import retrofit.http.Query;
22 | import retrofit.mime.TypedString;
23 |
24 | public interface PagesService {
25 |
26 | /**
27 | * Gets the collection of a users OneNote pages
28 | * Allows for query parameters to filter, order, sort... etc
29 | *
30 | * @param filter
31 | * @param order
32 | * @param select
33 | * @param top
34 | * @param skip
35 | * @param search
36 | * @param callback
37 | */
38 | @GET("/{version}/me/notes/pages")
39 | void getPages(
40 | @Path("version") String version,
41 | @Query("filter") String filter,
42 | @Query("orderby") String order,
43 | @Query("select") String select,
44 | @Query("top") Integer top,
45 | @Query("skip") Integer skip,
46 | @Query("search") String search,
47 | Callback> callback
48 | );
49 |
50 |
51 | /**
52 | * Gets a page specified by page id
53 | *
54 | * @param version
55 | * @param id
56 | * @param callback
57 | */
58 | @GET("/{version}/me/notes/pages/{id}")
59 | void getPageById(
60 | @Path("version") String version,
61 | @Path("id") String id,
62 | Callback> callback
63 | );
64 |
65 | /**
66 | * @param version
67 | * @param id
68 | * @param callback
69 | */
70 | @GET("/{version}/me/notes/pages/{id}/content")
71 | void getPageContentById(
72 | @Path("version") String version,
73 | @Path("id") String id,
74 | @Header("Accept") String acceptType,
75 | Callback callback
76 | );
77 |
78 | /**
79 | * Gets the pages in a give OneNote section and
80 | * provides query parameters for sorting, ordering...
81 | * on the page collection
82 | *
83 | * @param version
84 | * @param sectionId
85 | * @param order
86 | * @param select
87 | * @param top
88 | * @param skip
89 | * @param search
90 | * @param callback
91 | */
92 | @GET("/{version}/me/notes/sections/{sectionId}/pages")
93 | void getSectionPages(
94 | @Path("version") String version,
95 | @Path("sectionId") String sectionId,
96 | @Query("orderby") String order,
97 | @Query("select") String select,
98 | @Query("top") Integer top,
99 | @Query("skip") Integer skip,
100 | @Query("search") String search,
101 | Callback> callback
102 | );
103 |
104 | /**
105 | * Creates a new page in a specified OneNote section
106 | *
107 | * @param contentTypeHeader
108 | * @param version
109 | * @param id
110 | * @param content
111 | * @param callback
112 | */
113 | @POST("/{version}/me/notes/sections/{id}/pages")
114 | void postPages(
115 | @Header("Content-type") String contentTypeHeader,
116 | @Path("version") String version,
117 | @Path("id") String id,
118 | @Body TypedString content,
119 | Callback callback
120 | );
121 |
122 | /**
123 | * Creates a new page in a section specified by section title
124 | *
125 | * @param version
126 | * @param name
127 | * @param content
128 | * @param callback
129 | */
130 | @POST("/{version}/me/notes/pages")
131 | void postPagesInSection(
132 | @Header("Content-type") String contentTypeHeader,
133 | @Path("version") String version,
134 | @Query("sectionName") String name,
135 | @Body TypedString content,
136 | Callback> callback
137 | );
138 |
139 | /**
140 | * Creates a new page with a multi-part content body
141 | * in a section specified by section id
142 | *
143 | * @param version
144 | * @param sectionId
145 | * @param partMap
146 | * @param callback
147 | */
148 | @Multipart
149 | @POST("/{version}/me/notes/sections/{sectionId}/pages")
150 | void postMultiPartPages(
151 | @Path("version") String version,
152 | @Path("sectionId") String sectionId,
153 | @PartMap OneNotePartsMap partMap,
154 | Callback> callback
155 | );
156 |
157 | /**
158 | * Deletes the specified page
159 | *
160 | * @param version
161 | * @param pageId
162 | * @param callback
163 | */
164 | @DELETE("/{version}/me/notes/pages/{pageId}")
165 | void deletePage(
166 | @Path("version") String version,
167 | @Path("pageId") String pageId,
168 | Callback> callback
169 | );
170 |
171 | /**
172 | * Appends new content to an existing page
173 | * specified by page id
174 | *
175 | * Note: This passes a blank Accept-Encoding header to
176 | * work around a known issue with the PATCH on this OneNote API
177 | *
178 | * @param encoding
179 | * @param version
180 | * @param pageId
181 | * @param body
182 | * @param callback
183 | */
184 | @PATCH("/{version}/me/notes/pages/{pageId}/content")
185 | void patchPage(
186 | @Header("Accept-Encoding") String encoding,
187 | @Path("version") String version,
188 | @Path("pageId") String pageId,
189 | @Body TypedString body,
190 | Callback> callback
191 | );
192 | }
193 | // *********************************************************
194 | //
195 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
196 | //
197 | // Copyright (c) Microsoft Corporation
198 | // All rights reserved.
199 | //
200 | // MIT License:
201 | // Permission is hereby granted, free of charge, to any person obtaining
202 | // a copy of this software and associated documentation files (the
203 | // "Software"), to deal in the Software without restriction, including
204 | // without limitation the rights to use, copy, modify, merge, publish,
205 | // distribute, sublicense, and/or sell copies of the Software, and to
206 | // permit persons to whom the Software is furnished to do so, subject to
207 | // the following conditions:
208 | //
209 | // The above copyright notice and this permission notice shall be
210 | // included in all copies or substantial portions of the Software.
211 | //
212 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
213 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
214 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
215 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
216 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
217 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
218 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
219 | //
220 | // *********************************************************
221 |
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/PatchCommand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenoteapi.service;
5 |
6 | import android.util.Log;
7 |
8 | import com.google.gson.GsonBuilder;
9 | import com.google.gson.JsonElement;
10 | import com.google.gson.JsonSerializationContext;
11 | import com.google.gson.JsonSerializer;
12 | import com.google.gson.annotations.SerializedName;
13 |
14 | import java.lang.reflect.Type;
15 |
16 | public class PatchCommand implements JsonSerializer {
17 |
18 | @SerializedName("Target")
19 | public String mTarget;
20 | @SerializedName("Action")
21 | public String mAction;
22 | @SerializedName("Content")
23 | public String mContent;
24 | @SerializedName("Position")
25 | public String mPosition;
26 |
27 | @Override
28 | public JsonElement serialize(PatchCommand patchCommand,
29 | Type typeOfSrc,
30 | JsonSerializationContext context) {
31 | JsonElement result = new GsonBuilder().create().toJsonTree(patchCommand);
32 | Log.i(getClass().getSimpleName(), result.toString());
33 | return result;
34 | }
35 | }
36 | // *********************************************************
37 | //
38 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
39 | //
40 | // Copyright (c) Microsoft Corporation
41 | // All rights reserved.
42 | //
43 | // MIT License:
44 | // Permission is hereby granted, free of charge, to any person obtaining
45 | // a copy of this software and associated documentation files (the
46 | // "Software"), to deal in the Software without restriction, including
47 | // without limitation the rights to use, copy, modify, merge, publish,
48 | // distribute, sublicense, and/or sell copies of the Software, and to
49 | // permit persons to whom the Software is furnished to do so, subject to
50 | // the following conditions:
51 | //
52 | // The above copyright notice and this permission notice shall be
53 | // included in all copies or substantial portions of the Software.
54 | //
55 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
56 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
57 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
58 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
59 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
60 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
61 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
62 | //
63 | // *********************************************************
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionGroupsService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 |
5 | package com.microsoft.onenoteapi.service;
6 |
7 | import com.microsoft.onenotevos.Envelope;
8 | import com.microsoft.onenotevos.SectionGroup;
9 |
10 | import retrofit.Callback;
11 | import retrofit.http.Body;
12 | import retrofit.http.GET;
13 | import retrofit.http.Header;
14 | import retrofit.http.POST;
15 | import retrofit.http.Path;
16 | import retrofit.http.Query;
17 | import retrofit.mime.TypedString;
18 |
19 | public interface SectionGroupsService {
20 |
21 | /**
22 | * @param version
23 | * @param filter
24 | * @param order
25 | * @param select
26 | * @param top
27 | * @param skip
28 | * @param search
29 | * @param callback
30 | */
31 | @GET("/{version}/me/notes/sectionGroups")
32 | void getSectionGroups(
33 | @Path("version") String version,
34 | @Query("filter") String filter,
35 | @Query("orderby") String order,
36 | @Query("select") String select,
37 | @Query("top") Integer top,
38 | @Query("skip") Integer skip,
39 | @Query("search") String search,
40 | Callback> callback
41 | );
42 |
43 | @GET("/{version}/me/notes/notebooks/{id}/sectionGroups")
44 | void getSectionGroupsForNotebook(
45 | @Path("version") String version,
46 | @Path("id") String id,
47 | @Query("filter") String filter,
48 | @Query("orderby") String order,
49 | @Query("select") String select,
50 | @Query("top") Integer top,
51 | @Query("skip") Integer skip,
52 | @Query("search") String search,
53 | Callback> callback
54 |
55 | );
56 |
57 | /**
58 | * POST to the sectiongroups resource of a notebook
59 | *
60 | * @param contentTypeHeader
61 | * @param version
62 | * @param id
63 | * @param content
64 | * @param callback
65 | */
66 | @POST("/{version}/me/notes/notebooks/{id}/sectiongroups")
67 | void postSectionGroupInNotebook(
68 | @Path("version") String version,
69 | @Header("Content-type") String contentTypeHeader,
70 | @Path("id") String id,
71 | @Body TypedString content,
72 | Callback> callback
73 | );
74 |
75 |
76 | /**
77 | * POST to the sectiongroups resource of a section group
78 | *
79 | * @param contentTypeHeader
80 | * @param version
81 | * @param id
82 | * @param content
83 | * @param callback
84 | */
85 | @POST("/{version}/me/notes/sectiongroups/{id}/sectiongroups")
86 | void postSectionGroupInSectionGroup(
87 | @Path("version") String version,
88 | @Header("Content-type") String contentTypeHeader,
89 | @Path("id") String id,
90 | @Body TypedString content,
91 | Callback> callback
92 | );
93 | }
94 | // *********************************************************
95 | //
96 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
97 | //
98 | // Copyright (c) Microsoft Corporation
99 | // All rights reserved.
100 | //
101 | // MIT License:
102 | // Permission is hereby granted, free of charge, to any person obtaining
103 | // a copy of this software and associated documentation files (the
104 | // "Software"), to deal in the Software without restriction, including
105 | // without limitation the rights to use, copy, modify, merge, publish,
106 | // distribute, sublicense, and/or sell copies of the Software, and to
107 | // permit persons to whom the Software is furnished to do so, subject to
108 | // the following conditions:
109 | //
110 | // The above copyright notice and this permission notice shall be
111 | // included in all copies or substantial portions of the Software.
112 | //
113 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
114 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
115 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
116 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
117 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
118 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
119 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
120 | //
121 | // *********************************************************
--------------------------------------------------------------------------------
/onenoteapi/src/main/java/com/microsoft/onenoteapi/service/SectionsService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 |
5 |
6 | package com.microsoft.onenoteapi.service;
7 |
8 | import com.microsoft.onenotevos.Envelope;
9 | import com.microsoft.onenotevos.Section;
10 |
11 | import retrofit.Callback;
12 | import retrofit.http.Body;
13 | import retrofit.http.DELETE;
14 | import retrofit.http.GET;
15 | import retrofit.http.Header;
16 | import retrofit.http.POST;
17 | import retrofit.http.Path;
18 | import retrofit.http.Query;
19 | import retrofit.mime.TypedString;
20 |
21 | public interface SectionsService {
22 |
23 | /**
24 | * Performs GET requests against the sections resource.
25 | *
26 | * @param filter
27 | * @param order
28 | * @param select
29 | * @param top
30 | * @param skip
31 | * @param search
32 | * @param callback
33 | */
34 | @GET("/{version}/me/notes/sections")
35 | void getSections(
36 | @Path("version") String version,
37 | @Query("filter") String filter,
38 | @Query("orderby") String order,
39 | @Query("select") String select,
40 | @Query("top") Integer top,
41 | @Query("skip") Integer skip,
42 | @Query("search") String search,
43 | Callback> callback
44 | );
45 |
46 | /**
47 | * Get a section specified by id
48 | *
49 | * @param version
50 | * @param id
51 | * @param callback
52 | */
53 | @GET("/{version}/me/notes/sections/{id}")
54 | void getSectionById(
55 | @Path("version") String version,
56 | @Path("id") String id,
57 | Callback> callback
58 | );
59 |
60 | @GET("/{version}/me/notes/notebooks/{notebookId}/sections")
61 | void getNotebookSections(
62 | @Path("version") String version,
63 | @Path("notebookId") String Id,
64 | @Query("filter") String filter,
65 | @Query("orderby") String order,
66 | @Query("select") String select,
67 | @Query("top") Integer top,
68 | @Query("skip") Integer skip,
69 | @Query("search") String search,
70 | Callback> callback
71 | );
72 |
73 | /**
74 | * POST to the sections resource of a notebook
75 | *
76 | * @param contentTypeHeader
77 | * @param version
78 | * @param id
79 | * @param content
80 | * @param callback
81 | */
82 | @POST("/{version}/me/notes/notebooks/{id}/sections")
83 | void postSection(
84 | @Path("version") String version,
85 | @Header("Content-type") String contentTypeHeader,
86 | @Path("id") String id,
87 | @Body TypedString content,
88 | Callback> callback
89 | );
90 |
91 | /**
92 | * POST to the sections resource of a section group
93 | *
94 | * @param contentTypeHeader
95 | * @param version
96 | * @param id
97 | * @param content
98 | * @param callback
99 | */
100 | @POST("/{version}/me/notes/sectiongroups/{id}/sections")
101 | void postSectionInSectionGroup(
102 | @Path("version") String version,
103 | @Header("Content-type") String contentTypeHeader,
104 | @Path("id") String id,
105 | @Body TypedString content,
106 | Callback> callback
107 | );
108 |
109 | /**
110 | * DELETE a section
111 | *
112 | * @param version
113 | * @param sectionId
114 | * @param callback
115 | */
116 | @DELETE("/{version}/me/notes/sections/{sectionId}")
117 | void deleteSection(
118 | @Path("version") String version,
119 | @Path("sectionId") String sectionId,
120 | Callback callback
121 | );
122 |
123 | }
124 | // *********************************************************
125 | //
126 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
127 | //
128 | // Copyright (c) Microsoft Corporation
129 | // All rights reserved.
130 | //
131 | // MIT License:
132 | // Permission is hereby granted, free of charge, to any person obtaining
133 | // a copy of this software and associated documentation files (the
134 | // "Software"), to deal in the Software without restriction, including
135 | // without limitation the rights to use, copy, modify, merge, publish,
136 | // distribute, sublicense, and/or sell copies of the Software, and to
137 | // permit persons to whom the Software is furnished to do so, subject to
138 | // the following conditions:
139 | //
140 | // The above copyright notice and this permission notice shall be
141 | // included in all copies or substantial portions of the Software.
142 | //
143 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
144 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
145 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
146 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
147 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
148 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
149 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
150 | //
151 | // *********************************************************
--------------------------------------------------------------------------------
/onenotevos/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/onenotevos/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 22
5 | buildToolsVersion "22.0.1"
6 |
7 | defaultConfig {
8 | minSdkVersion 15
9 | targetSdkVersion 22
10 | versionCode 1
11 | versionName "1.0"
12 | }
13 | buildTypes {
14 | release {
15 | minifyEnabled false
16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17 | }
18 | }
19 | }
20 |
21 | dependencies {
22 | //Joda-Time for calendar time
23 | compile 'joda-time:joda-time:2.7'
24 |
25 | //GSON
26 | compile 'com.google.code.gson:gson:2.3.1'
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/onenotevos/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/brianmel/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/onenotevos/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/onenotevos/src/main/java/com/microsoft/onenotevos/BaseVO.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 |
5 | package com.microsoft.onenotevos;
6 |
7 | import com.google.gson.annotations.SerializedName;
8 |
9 | import org.joda.time.DateTime;
10 |
11 | public abstract class BaseVO {
12 |
13 | public Boolean isDefault;
14 |
15 | public Boolean isShared;
16 |
17 | public DateTime createdTime;
18 |
19 | public DateTime lastModifiedTime;
20 |
21 | public Links links;
22 |
23 | public String createdBy;
24 |
25 | public String createdByAppId;
26 |
27 | public String id;
28 |
29 | public String lastModifiedBy;
30 |
31 | public String name;
32 |
33 | @SerializedName("@odata.context")
34 | public String odataContext;
35 |
36 | public String self;
37 |
38 | public String userRole;
39 | }
40 | // *********************************************************
41 | //
42 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
43 | //
44 | // Copyright (c) Microsoft Corporation
45 | // All rights reserved.
46 | //
47 | // MIT License:
48 | // Permission is hereby granted, free of charge, to any person obtaining
49 | // a copy of this software and associated documentation files (the
50 | // "Software"), to deal in the Software without restriction, including
51 | // without limitation the rights to use, copy, modify, merge, publish,
52 | // distribute, sublicense, and/or sell copies of the Software, and to
53 | // permit persons to whom the Software is furnished to do so, subject to
54 | // the following conditions:
55 | //
56 | // The above copyright notice and this permission notice shall be
57 | // included in all copies or substantial portions of the Software.
58 | //
59 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
60 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
61 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
62 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
63 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
64 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
65 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
66 | //
67 | // *********************************************************
--------------------------------------------------------------------------------
/onenotevos/src/main/java/com/microsoft/onenotevos/Envelope.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 |
5 | package com.microsoft.onenotevos;
6 |
7 | public class Envelope extends BaseVO {
8 | public T[] value;
9 | }
10 | // *********************************************************
11 | //
12 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
13 | //
14 | // Copyright (c) Microsoft Corporation
15 | // All rights reserved.
16 | //
17 | // MIT License:
18 | // Permission is hereby granted, free of charge, to any person obtaining
19 | // a copy of this software and associated documentation files (the
20 | // "Software"), to deal in the Software without restriction, including
21 | // without limitation the rights to use, copy, modify, merge, publish,
22 | // distribute, sublicense, and/or sell copies of the Software, and to
23 | // permit persons to whom the Software is furnished to do so, subject to
24 | // the following conditions:
25 | //
26 | // The above copyright notice and this permission notice shall be
27 | // included in all copies or substantial portions of the Software.
28 | //
29 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
33 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
34 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
35 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 | //
37 | // *********************************************************
--------------------------------------------------------------------------------
/onenotevos/src/main/java/com/microsoft/onenotevos/Links.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenotevos;
5 |
6 | public class Links {
7 |
8 | // todo Is this a bug??
9 | public static class Url {
10 | public String href;
11 | }
12 |
13 | public static class OneNoteClientUrl extends Url {}
14 |
15 | public static class OneNoteWebUrl extends Url {}
16 |
17 | public OneNoteClientUrl oneNoteClientUrl;
18 | public OneNoteWebUrl oneNoteWebUrl;
19 | }
20 | // *********************************************************
21 | //
22 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
23 | //
24 | // Copyright (c) Microsoft Corporation
25 | // All rights reserved.
26 | //
27 | // MIT License:
28 | // Permission is hereby granted, free of charge, to any person obtaining
29 | // a copy of this software and associated documentation files (the
30 | // "Software"), to deal in the Software without restriction, including
31 | // without limitation the rights to use, copy, modify, merge, publish,
32 | // distribute, sublicense, and/or sell copies of the Software, and to
33 | // permit persons to whom the Software is furnished to do so, subject to
34 | // the following conditions:
35 | //
36 | // The above copyright notice and this permission notice shall be
37 | // included in all copies or substantial portions of the Software.
38 | //
39 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
40 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
43 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
44 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
45 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46 | //
47 | // *********************************************************
48 |
--------------------------------------------------------------------------------
/onenotevos/src/main/java/com/microsoft/onenotevos/Notebook.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenotevos;
5 |
6 | public class Notebook extends BaseVO {
7 |
8 | public String sectionGroupsUrl;
9 | public String sectionsUrl;
10 |
11 | }
12 | // *********************************************************
13 | //
14 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
15 | //
16 | // Copyright (c) Microsoft Corporation
17 | // All rights reserved.
18 | //
19 | // MIT License:
20 | // Permission is hereby granted, free of charge, to any person obtaining
21 | // a copy of this software and associated documentation files (the
22 | // "Software"), to deal in the Software without restriction, including
23 | // without limitation the rights to use, copy, modify, merge, publish,
24 | // distribute, sublicense, and/or sell copies of the Software, and to
25 | // permit persons to whom the Software is furnished to do so, subject to
26 | // the following conditions:
27 | //
28 | // The above copyright notice and this permission notice shall be
29 | // included in all copies or substantial portions of the Software.
30 | //
31 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
35 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
36 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
37 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 | //
39 | // *********************************************************
--------------------------------------------------------------------------------
/onenotevos/src/main/java/com/microsoft/onenotevos/Page.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenotevos;
5 |
6 | public class Page extends BaseVO {
7 | public String title;
8 | public String contentUrl;
9 | }
10 | // *********************************************************
11 | //
12 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
13 | //
14 | // Copyright (c) Microsoft Corporation
15 | // All rights reserved.
16 | //
17 | // MIT License:
18 | // Permission is hereby granted, free of charge, to any person obtaining
19 | // a copy of this software and associated documentation files (the
20 | // "Software"), to deal in the Software without restriction, including
21 | // without limitation the rights to use, copy, modify, merge, publish,
22 | // distribute, sublicense, and/or sell copies of the Software, and to
23 | // permit persons to whom the Software is furnished to do so, subject to
24 | // the following conditions:
25 | //
26 | // The above copyright notice and this permission notice shall be
27 | // included in all copies or substantial portions of the Software.
28 | //
29 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
30 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
31 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
32 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
33 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
34 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
35 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 | //
37 | // *********************************************************
--------------------------------------------------------------------------------
/onenotevos/src/main/java/com/microsoft/onenotevos/Section.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenotevos;
5 |
6 | import com.google.gson.annotations.SerializedName;
7 |
8 | public class Section extends BaseVO {
9 |
10 | public String pagesUrl;
11 | public Notebook parentNotebook;
12 | public SectionGroup parentSectionGroup;
13 |
14 | @SerializedName("parentSectionGroup@odata.context")
15 | public String parentSectionGroup_odata_context;
16 |
17 | @SerializedName("parentNotebook@odata.context")
18 | public String parentNotebook_odata_context;
19 |
20 | }
21 | // *********************************************************
22 | //
23 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
24 | //
25 | // Copyright (c) Microsoft Corporation
26 | // All rights reserved.
27 | //
28 | // MIT License:
29 | // Permission is hereby granted, free of charge, to any person obtaining
30 | // a copy of this software and associated documentation files (the
31 | // "Software"), to deal in the Software without restriction, including
32 | // without limitation the rights to use, copy, modify, merge, publish,
33 | // distribute, sublicense, and/or sell copies of the Software, and to
34 | // permit persons to whom the Software is furnished to do so, subject to
35 | // the following conditions:
36 | //
37 | // The above copyright notice and this permission notice shall be
38 | // included in all copies or substantial portions of the Software.
39 | //
40 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
42 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
44 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
45 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
46 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
47 | //
48 | // *********************************************************
--------------------------------------------------------------------------------
/onenotevos/src/main/java/com/microsoft/onenotevos/SectionGroup.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
3 | */
4 | package com.microsoft.onenotevos;
5 |
6 | public class SectionGroup extends BaseVO {
7 | public String pagesUrl;
8 | }
9 | // *********************************************************
10 | //
11 | // Android-REST-API-Explorer, https://github.com/OneNoteDev/Android-REST-API-Explorer
12 | //
13 | // Copyright (c) Microsoft Corporation
14 | // All rights reserved.
15 | //
16 | // MIT License:
17 | // Permission is hereby granted, free of charge, to any person obtaining
18 | // a copy of this software and associated documentation files (the
19 | // "Software"), to deal in the Software without restriction, including
20 | // without limitation the rights to use, copy, modify, merge, publish,
21 | // distribute, sublicense, and/or sell copies of the Software, and to
22 | // permit persons to whom the Software is furnished to do so, subject to
23 | // the following conditions:
24 | //
25 | // The above copyright notice and this permission notice shall be
26 | // included in all copies or substantial portions of the Software.
27 | //
28 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35 | //
36 | // *********************************************************
37 |
--------------------------------------------------------------------------------
/readme-images/AADPermissions.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneNoteDev/Android-REST-API-Explorer/a3436b1f0a4df87df541a592fb3b118915827e00/readme-images/AADPermissions.jpg
--------------------------------------------------------------------------------
/readme-images/OneNotePermissions.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneNoteDev/Android-REST-API-Explorer/a3436b1f0a4df87df541a592fb3b118915827e00/readme-images/OneNotePermissions.jpg
--------------------------------------------------------------------------------
/readme-images/create_page.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneNoteDev/Android-REST-API-Explorer/a3436b1f0a4df87df541a592fb3b118915827e00/readme-images/create_page.png
--------------------------------------------------------------------------------
/readme-images/detail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneNoteDev/Android-REST-API-Explorer/a3436b1f0a4df87df541a592fb3b118915827e00/readme-images/detail.png
--------------------------------------------------------------------------------
/readme-images/list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneNoteDev/Android-REST-API-Explorer/a3436b1f0a4df87df541a592fb3b118915827e00/readme-images/list.png
--------------------------------------------------------------------------------
/readme-images/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OneNoteDev/Android-REST-API-Explorer/a3436b1f0a4df87df541a592fb3b118915827e00/readme-images/login.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':O365-auth', ':onenoteapi', ':onenotevos'
2 |
--------------------------------------------------------------------------------