@@ -343,7 +343,7 @@ var OneNoteApi = (function (_super) {
343343 * GetRecentNotebooks
344344 */
345345 OneNoteApi . prototype . getRecentNotebooks = function ( includePersonal ) {
346- var url = "/notebooks/Microsoft.OneNote.Api.GetRecentNotebooks(includePersonalNotebooks=" + includePersonal + ")" ;
346+ var url = "/me/notes/ notebooks/Microsoft.OneNote.Api.GetRecentNotebooks(includePersonalNotebooks=" + includePersonal + ")" ;
347347 return this . requestPromise ( url ) ;
348348 } ;
349349 /**
@@ -378,14 +378,14 @@ var OneNoteApi = (function (_super) {
378378 * GetPage
379379 */
380380 OneNoteApi . prototype . getPage = function ( pageId ) {
381- var pagePath = "/pages/" + pageId ;
381+ var pagePath = "/me/notes/ pages/" + pageId ;
382382 return this . requestPromise ( pagePath ) ;
383383 } ;
384384 /**
385385 * GetPageContent
386386 */
387387 OneNoteApi . prototype . getPageContent = function ( pageId ) {
388- var pagePath = "/pages/" + pageId + "/content" ;
388+ var pagePath = "/me/notes/ pages/" + pageId + "/content" ;
389389 return this . requestPromise ( pagePath ) ;
390390 } ;
391391 /**
@@ -397,15 +397,15 @@ var OneNoteApi = (function (_super) {
397397 pagePath += "?top=" + options . top ;
398398 }
399399 if ( options . sectionId ) {
400- pagePath = "/sections/" + options . sectionId + pagePath ;
400+ pagePath = "/me/notes/ sections/" + options . sectionId + pagePath ;
401401 }
402402 return this . requestPromise ( pagePath ) ;
403403 } ;
404404 /**
405405 * UpdatePage
406406 */
407407 OneNoteApi . prototype . updatePage = function ( pageId , revisions ) {
408- var pagePath = "/pages/" + pageId ;
408+ var pagePath = "/me/notes/ pages/" + pageId ;
409409 var url = pagePath + "/content" ;
410410 return this . requestPromise ( url , JSON . stringify ( revisions ) , "application/json" , "PATCH" ) ;
411411 } ;
@@ -415,7 +415,15 @@ var OneNoteApi = (function (_super) {
415415 OneNoteApi . prototype . createSection = function ( notebookId , name ) {
416416 var obj = { name : name } ;
417417 var data = JSON . stringify ( obj ) ;
418- return this . requestPromise ( "/notebooks/" + notebookId + "/sections/" , data ) ;
418+ return this . requestPromise ( "/me/notes/notebooks/" + notebookId + "/sections/" , data ) ;
419+ } ;
420+ /**
421+ * CreateSectionUnderSectionGroup
422+ */
423+ OneNoteApi . prototype . createSectionUnderSectionGroup = function ( sectionGroupId , name ) {
424+ var obj = { name : name } ;
425+ var data = JSON . stringify ( obj ) ;
426+ return this . requestPromise ( "/me/notes/sectionGroups/" + sectionGroupId + "/sections/" , data ) ;
419427 } ;
420428 /**
421429 * GetNotebooks
@@ -443,13 +451,13 @@ var OneNoteApi = (function (_super) {
443451 * GetNotebookbyName
444452 */
445453 OneNoteApi . prototype . getNotebookByName = function ( name ) {
446- return this . requestPromise ( "/notebooks?filter=name%20eq%20%27" + encodeURI ( name ) + "%27&orderby=createdTime" ) ;
454+ return this . requestPromise ( "/me/notes/ notebooks?filter=name%20eq%20%27" + encodeURI ( name ) + "%27&orderby=createdTime" ) ;
447455 } ;
448456 /**
449457 * GetDefaultNotebook
450458 */
451459 OneNoteApi . prototype . getDefaultNotebook = function ( ) {
452- return this . requestPromise ( "/notebooks?filter=isDefault%20eq%20true%20" ) ;
460+ return this . requestPromise ( "/me/notes/ notebooks?filter=isDefault%20eq%20true%20" ) ;
453461 } ;
454462 /**
455463 * PagesSearch
@@ -503,13 +511,13 @@ var OneNoteApi = (function (_super) {
503511 // Since this url is most often used to save content to a specific notebook, by default
504512 // it does not include a notebook where user has Read only permissions.
505513 var filter = ( excludeReadOnlyNotebooks ) ? "$filter=userRole%20ne%20Microsoft.OneNote.Api.UserRole'Reader'" : "" ;
506- return "/notebooks?" + filter + ( numExpands ? "&" + this . getExpands ( numExpands ) : "" ) ;
514+ return "/me/notes/ notebooks?" + filter + ( numExpands ? "&" + this . getExpands ( numExpands ) : "" ) ;
507515 } ;
508516 /**
509517 * GetSearchUrl
510518 */
511519 OneNoteApi . prototype . getSearchUrl = function ( query ) {
512- return "/pages?search=" + query ;
520+ return "/me/notes/ pages?search=" + query ;
513521 } ;
514522 /**
515523 * Helper Method to use beta features OR to use beta endpoints
0 commit comments