Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Commit f803f1f

Browse files
author
Diane Diaz
committed
Updated readme
Updated links, version table, features list. Removed 'BETA only' subtitle from DELETE Page and PATCH examples.
1 parent 4f27780 commit f803f1f

File tree

3 files changed

+46
-38
lines changed

3 files changed

+46
-38
lines changed

OneNoteServiceSamplesWinUniversal.Shared/DataModel/SampleData.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@
304304
{
305305
"UniqueId": "Group-2-Item-13",
306306
"Title": "Create a new section in a section group",
307+
"Subtitle": "BETA Only",
307308
"ImagePath": "Assets/MediumGray.png",
308309
"Description": "First we get a list of all section groups and then create a new empty section under the selected section group. Please select a specific section group from the drop-down below and also enter the new section's name in the TextBox below",
309310
"RequiresInputComboBox1": "true",
@@ -313,6 +314,7 @@
313314
{
314315
"UniqueId": "Group-2-Item-14",
315316
"Title": "Create a new section group in a notebook",
317+
"Subtitle": "BETA Only",
316318
"ImagePath": "Assets/MediumGray.png",
317319
"Description": "First we get a list of all notebooks and then create a new empty section group under the selected notebook. Please select a specific notebook from the drop-down below and also enter the new section group's name in the TextBox below",
318320
"RequiresInputComboBox1": "true",
@@ -322,6 +324,7 @@
322324
{
323325
"UniqueId": "Group-2-Item-15",
324326
"Title": "Create a new section group in a section group",
327+
"Subtitle": "BETA Only",
325328
"ImagePath": "Assets/MediumGray.png",
326329
"Description": "First we get a list of all section groups and then create a new empty section group under the selected section group. Please select a specific section group from the drop-down below and also enter the new section group's name in the TextBox below",
327330
"RequiresInputComboBox1": "true",
@@ -339,7 +342,6 @@
339342
{
340343
"UniqueId": "Group-3-Item-0",
341344
"Title": "Append to the end of the default outline in the page",
342-
"Subtitle": "BETA Only",
343345
"ImagePath": "Assets/MediumGray.png",
344346
"Description": "Add new trailing content to the default outline in an existing page",
345347
"RequiresInputComboBox1": "true",
@@ -357,7 +359,6 @@
357359
{
358360
"UniqueId": "Group-4-Item-0",
359361
"Title": "Delete Page",
360-
"Subtitle": "BETA Only",
361362
"ImagePath": "Assets/LightGray.png",
362363
"Description": "Delete an existing page",
363364
"RequiresInputComboBox1": "true",

OneNoteServiceSamplesWinUniversal.Shared/OneNoteApi/Pages/DeletePageExample.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
namespace OneNoteServiceSamplesWinUniversal.OneNoteApi.Pages
2626
{
2727
/// <summary>
28-
/// Class to show a selection of examples creating pages via HTTP DELETE to the OneNote API
28+
/// Class to show a selection of examples deleting pages via HTTP DELETE to the OneNote API
2929
/// - Delete a new page is represented via the DELETE HTTP verb.
30-
/// For more info, see http://dev.onenote.com/docs
30+
/// For more info, see http://dev.onenote.com/docs#/reference/delete-pages.
3131
/// </summary>
3232
/// <remarks>
3333
/// NOTE: It is not the goal of this code sample to produce well re-factored, elegant code.
@@ -39,7 +39,7 @@ namespace OneNoteServiceSamplesWinUniversal.OneNoteApi.Pages
3939
/// var client = new HttpClient();
4040
/// client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", await Auth.GetAuthToken());
4141
///
42-
/// var deleteMessage = new HttpRequestMessage(HttpMethod.Delete, "https://www.onenote.com/beta/v1.0/pages");
42+
/// var deleteMessage = new HttpRequestMessage(HttpMethod.Delete, "https://www.onenote.com/api/v1.0/pages");
4343
/// HttpResponseMessage response = await client.SendAsync(deleteMessage);
4444
/// </code>
4545
public static class DeletePagesExample
@@ -53,7 +53,7 @@ public static class DeletePagesExample
5353
/// <param name="pageId"></param>
5454
/// <param name="provider"></param>
5555
/// <param name="apiRoute"></param>
56-
/// <remarks>Create page using a single part text/html content type</remarks>
56+
/// <remarks>Delete a specified page by ID.</remarks>
5757
/// <returns>The converted HTTP response message</returns>
5858
public static async Task<ApiBaseResponse> DeletePage(bool debug, string pageId, AuthProvider provider, string apiRoute)
5959
{

README.md

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Created by Microsoft Corporation, 2014. Provided As-is without warranty. Tradema
66
### Intro
77
* [Universal Windows apps](http://blogs.windows.com/buildingapps/2014/04/02/extending-platform-commonality-through-universal-windows-apps/)
88
* This is a **newer and better** version of the previously released oneNote API [WinStore](https://github.com/OneNoteDev/OneNoteAPISampleWinStore) and [WinPhone](https://github.com/OneNoteDev/OneNoteAPISampleWinPhone) code samples. Use this code sample to build universal Windows 8.1 and above apps.
9-
* As of December 2014, This code sample contains examples of all shipped features as well as most of the beta features released by the OneNote API team.
9+
* As of August 2015, this code sample contains examples of all shipped features as well as most of the beta features released by the OneNote API team.
1010

1111
**If you wish to ignore the app UI/design and directly get to the part that interacts with the OneNote API, you can find the code under the [OneNoteServiceSamplesWinUniversal.Shared/OneNoteApi](https://github.com/OneNoteDev/OneNoteAPISampleWinUniversal/tree/master/OneNoteServiceSamplesWinUniversal.Shared/OneNoteApi) folder**.
1212

@@ -19,54 +19,55 @@ You can find additional documentation at the links below.
1919
[LiveSDK](http://msdn.microsoft.com/EN-US/library/office/dn575435.aspx) to do OAuth against the Microsoft Account service. This code sample, demonstrates an alternative way to do OAuth using the new Windows.Security.Authentication.OnlineId.OnlineIdAuthenticator class. Both the existing Live SDK approach and this alternative will work in Windows 8.1 universal apps
2020
* The usage of the OnlineIdAuthenticator class is based on the [Windows universal code sample](http://code.msdn.microsoft.com/windowsapps/Windows-account-authorizati-7c95e284)
2121
* Create Pages:
22-
* [POST simple HTML to a new OneNote QuickNotes page](http://msdn.microsoft.com/EN-US/library/office/dn575428.aspx)
22+
* [POST simple HTML to a new OneNote Quick Notes page](http://msdn.microsoft.com/EN-US/library/office/dn575428.aspx)
2323
* [POST multi-part message with image data included in the request](http://msdn.microsoft.com/EN-US/library/office/dn575432.aspx)
24-
* POST page with a snapshot of an embedded web page HTML
24+
* [POST page with a snapshot of an embedded web page HTML](http://msdn.microsoft.com/EN-US/library/office/dn575431.aspx)
2525
* [POST page with a URL rendered as an image](http://msdn.microsoft.com/EN-US/library/office/dn575431.aspx)
2626
* [POST page with a file attachment](http://msdn.microsoft.com/en-us/library/office/dn575436.aspx)
2727
* [POST page with a PDF file rendered and attached](http://msdn.microsoft.com/EN-US/library/office/dn655137.aspx)
28-
* POST page with note tags
29-
* POST page with a business card automatically extracted from an image
30-
* POST page with a recipe automatically extracted from a URL
31-
* POST page with a product info automatically extracted from a URL
28+
* [POST page with note tags](https://msdn.microsoft.com/EN-US/library/office/mt159148.aspx)
29+
* [POST page with a business card automatically extracted from an image](https://msdn.microsoft.com/EN-US/library/office/dn600338.aspx#ExtractBusinessCard)
30+
* [POST page with a recipe automatically extracted from a URL](https://msdn.microsoft.com/EN-US/library/office/dn600338.aspx#ExtractRecipe)
31+
* [POST page with a product info automatically extracted from a URL](https://msdn.microsoft.com/EN-US/library/office/dn600338.aspx#ExtractProduct)
3232
* [Extract the returned oneNoteClientURL and oneNoteWebURL links](http://msdn.microsoft.com/EN-US/library/office/dn575433.aspx)
3333
* [POST page in a specific named section](http://msdn.microsoft.com/EN-US/library/office/dn672416.aspx)
34-
* [POST page under a specific notebook and section](http://dev.onenote.com/docs#/reference/post-pages/v10sectionsidpages/post)
34+
* [POST page under a specific notebook and section](http://dev.onenote.com/docs#/reference/post-pages/v10menotessectionsidpages/post)
3535
* Query and Search Pages:
3636
* [GET a paginated list of all pages in OneNote](http://dev.onenote.com/docs#/reference/get-pages)
37-
* [GET metadata for a specific page](http://dev.onenote.com/docs#/reference/get-pages/betapagesid/get)
38-
* [GET pages with title containing a specific substring using the $filter query parameter and contains method](http://dev.onenote.com/docs#/reference/get-pages/betapagesfilterorderbyselecttopskipsearch/get)
39-
* [GET pages using OData v4 query parameters like $skip and $top](http://dev.onenote.com/docs#/reference/get-pages/betapagesfilterorderbyselecttopskipsearch/get)
37+
* [GET metadata for a specific page](http://dev.onenote.com/docs#/reference/get-pages/v10menotespagesid/get)
38+
* [GET pages with title containing a specific substring using the $filter query parameter and contains method](http://dev.onenote.com/docs#/reference/get-pages/v10menotespagesfilterorderbyselecttopskipsearchcount/get)
39+
* [GET pages using OData v4 query parameters like $skip and $top](http://dev.onenote.com/docs#/reference/get-pages/v10menotespagesfilterorderbyselecttopskipsearchcount/get)
4040
* [OData v4](http://docs.oasis-open.org/odata/odata/v4.0/os/part1-protocol/odata-v4.0-os-part1-protocol.html)
41-
* [GET a sorted list of pages using the $orderBy query parameter](http://dev.onenote.com/docs#/reference/get-pages/betapagesfilterorderbyselecttopskipsearch/get)
42-
* [GET selected metadata for pages using the $select query parameter](http://dev.onenote.com/docs#/reference/get-pages/betapagesfilterorderbyselecttopskipsearch/get)
43-
* [GET pages containing the matching search term using the search query parameter](http://dev.onenote.com/docs#/reference/get-pages/betapagesfilterorderbyselecttopskipsearch/get)
44-
* [GET back a specific page's content as HTML](http://dev.onenote.com/docs#/reference/get-pages/betapagesidcontent/get)
41+
* [GET a sorted list of pages using the $orderby query parameter](http://dev.onenote.com/docs#/reference/get-pages/v10menotespagesfilterorderbyselecttopskipsearchcount/get)
42+
* [GET selected metadata for pages using the $select query parameter](http://dev.onenote.com/docs#/reference/get-pages/v10menotespagesfilterorderbyselecttopskipsearchcount/get)
43+
* [GET pages containing the matching search term using the search query parameter](http://dev.onenote.com/docs#/reference/get-pages/v10menotespagesfilterorderbyselecttopskipsearchcount/get)
44+
* [GET back a specific page's content as HTML](http://dev.onenote.com/docs#/reference/get-pages/v10menotespagesidcontentincludeids/get)
4545
* Manage Notebooks and Sections:
4646
* GET all notebooks and sections in one round trip using the $expand query parameter
4747
* [GET a list of all notebooks](http://dev.onenote.com/docs#/reference/get-notebooks)
48-
* [GET metadata for a specific notebook](http://dev.onenote.com/docs#/reference/get-notebooks/v10notebooksid/get)
48+
* [GET metadata for a specific notebook](http://dev.onenote.com/docs#/reference/get-notebooks/v10menotesnotebooksidselectexpand/get)
4949
* [GET a list of all sections](http://dev.onenote.com/docs#/reference/get-sections)
50-
* [GET metadata for a specific section](http://dev.onenote.com/docs#/reference/get-sections/v10sectionsid/get)
51-
* [GET a list of all SectionGroups](http://dev.onenote.com/docs#/reference/get-sectiongroups)
52-
* [GET notebooks and sections with a specific name using the $filter query parameter](http://dev.onenote.com/docs#/reference/get-notebooks/v10notebooksfilterorderbyselect/get)
53-
* [GET notebooks shared by others using the $filter query parameter and useRole property](http://dev.onenote.com/docs#/reference/get-notebooks/v10notebooksfilterorderbyselect/get)
54-
* [GET a sorted list of notebooks using the $orderBy query parameter](http://dev.onenote.com/docs#/reference/get-notebooks/v10notebooksfilterorderbyselect/get)
55-
* [GET selected metadata for notebooks using the $select query parameter](http://dev.onenote.com/docs#/reference/get-notebooks/v10notebooksfilterorderbyselect/get)
56-
* [GET a list of all sections under a specific notebook](http://dev.onenote.com/docs#/reference/get-sections/v10notebooksidsectionsfilterorderbyselect/get)
50+
* [GET metadata for a specific section](http://dev.onenote.com/docs#/reference/get-sections/v10menotessectionsidselectexpand/get)
51+
* [GET a list of all section groups](http://dev.onenote.com/docs#/reference/get-sectiongroups)
52+
* [GET notebooks and sections with a specific name using the $filter query parameter](http://dev.onenote.com/docs#/reference/get-notebooks/v10menotesnotebooksfilterorderbyselectexpandtopskipcount/get)
53+
* [GET notebooks shared by others using the $filter query parameter and userRole property](http://dev.onenote.com/docs#/reference/get-notebooks/v10menotesnotebooksfilterorderbyselectexpandtopskipcount/get)
54+
* [GET a sorted list of notebooks using the $orderby query parameter](http://dev.onenote.com/docs#/reference/get-notebooks/v10menotesnotebooksfilterorderbyselectexpandtopskipcount/get)
55+
* [GET selected metadata for notebooks using the $select query parameter](http://dev.onenote.com/docs#/reference/get-notebooks/v10menotesnotebooksfilterorderbyselectexpandtopskipcount/get)
56+
* [GET a list of all sections under a specific notebook](http://dev.onenote.com/docs#/reference/get-notebooks/v10menotesnotebooksfilterorderbyselectexpandtopskipcount/get)
5757
* [POST a new notebook](http://dev.onenote.com/docs#/reference/post-notebooks)
58-
* [POST a new section under a specific notebook](http://dev.onenote.com/docs#/reference/post-sections)
59-
* Updates Pages:
60-
* Examples of [PATCH Pages](http://dev.onenote.com/docs#/reference/patch-pages)
58+
* [POST a new section group under a specific notebook](http://dev.onenote.com/docs#/reference/post-sectiongroups/betamenotesnotebooksidsectiongroups/post)
59+
* [POST a new section group under a specific section group](http://dev.onenote.com/docs#/reference/post-sectiongroups/betamenotessectiongroupsidsectiongroups/post)
60+
* [POST a new section under a specific notebook](http://dev.onenote.com/docs#/reference/post-sections/v10menotesnotebooksidsections/post)
61+
* [POST a new section under a specific section group](http://dev.onenote.com/docs#/reference/post-sections/betamenotessectiongroupsidsections/post)
62+
* Update Pages:
63+
* Examples of [PATCH Pages](http://dev.onenote.com/docs#/reference/patch-pages)
64+
* Delete Pages:
65+
* [DELETE page](http://dev.onenote.com/docs#/reference/delete-pages)
6166

6267
### O365 based API (only available on beta)
63-
* All the APIs for Microsoft Account (LiveId) are supported in O365 as well except the following:-
64-
*POST ~/me/notes/pages is currently not supported. To create a page, you have to include the section ID: ~/me/notes/sections/{id}/pages.
65-
*Using the ?sectionName filter to create a page under a named section is currently not supported either.
68+
* All the APIs for Microsoft Account (LiveId) are supported in O365 as well except the following:
6669
*$search query option is currently not supported.
6770

68-
Additional features in beta:
69-
* Example of [DELETE Page] (http://dev.onenote.com/docs#/reference/delete-pages) (page is coming soon).
7071

7172
### Prerequisites
7273

@@ -127,7 +128,13 @@ If you get any build or deployment errors related to the Publisher of the app (M
127128

128129
### Version Info
129130

130-
This is the initial public release for this code sample.
131+
| Date | Change |
132+
|------|------|
133+
| August 2015 | Added beta `POST /sectiongroups/{id}/sections`, `POST /notebooks/{id}/sectiongroups`, and `POST /sectiongroups/{id}/sectiongroups` examples.<br/>Changed `DELETE /pages/{id}` from beta to v1.0.<br/>Support for `POST /pages` and `POST /pages?sectionName` in Office 365. |
134+
| April 2015 | Added Office 365 with Azure AD auth support<br/>Added beta `DELETE /pages/{id}` example. |
135+
| March 2015 | Added `PATCH` example |
136+
| January 2015 | Added `GET /sections/{id}/pages` examples. |
137+
| December 2014 | Initial public release for this code sample. |
131138

132139
### Learning More
133140

0 commit comments

Comments
 (0)